Makefile.am: error: C++ source seen but 'CXX' is undefined

xiaoxiao2021-02-28  144

背景

在Linux下编译 bitcoin 时所遇到的一些问题

背景错误关键字内容解决方法效果

错误关键字

Makefile.am: error: C++ source seen but 'CXX' is undefined Makefile.am: The usual way to define 'CXX' is to add 'AC_PROG_CXX' Makefile.am: to 'configure.ac' and run 'autoconf' again. autoreconf: automake failed with exit status: 1

内容

在执行 ./autogen.sh 时遇到的错误

cly@admin:~/project/bitcoin/bitcoin-master$ ./autogen.sh Makefile.am:8: error: Libtool library used but 'LIBTOOL' is undefined Makefile.am:8: The usual way to define 'LIBTOOL' is to add 'LT_INIT' Makefile.am:8: to 'configure.ac' and run 'aclocal' and 'autoconf' again. Makefile.am:8: If 'LT_INIT' is in 'configure.ac', make sure Makefile.am:8: its definition is in aclocal's search path. /usr/share/automake-1.15/am/depend2.am: error: am__fastdepCXX does not appear in AM_CONDITIONAL /usr/share/automake-1.15/am/depend2.am: The usual way to define 'am__fastdepCXX' is to add 'AC_PROG_CXX' /usr/share/automake-1.15/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again /usr/share/automake-1.15/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.15/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests /usr/share/automake-1.15/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX, /usr/share/automake-1.15/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC /usr/share/automake-1.15/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again Makefile.am: error: C++ source seen but 'CXX' is undefined Makefile.am: The usual way to define 'CXX' is to add 'AC_PROG_CXX' Makefile.am: to 'configure.ac' and run 'autoconf' again. autoreconf: automake failed with exit status: 1

解决方法

sudo apt-get install libtool

效果

cly@admin:~/project/bitcoin/bitcoin-master$ sudo apt-get install libtool [sudo] password for cly: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libltdl-dev Suggested packages: libtool-doc gfortran | fortran95-compiler gcj-jdk The following NEW packages will be installed: libltdl-dev libtool 0 upgraded, 2 newly installed, 0 to remove and 346 not upgraded. Need to get 356 kB of archives. After this operation, 2,202 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu yakkety/main amd64 libltdl-dev amd64 2.4.6-1 [162 kB] Get:2 http://us.archive.ubuntu.com/ubuntu yakkety/main amd64 libtool all 2.4.6-1 [194 kB] Fetched 356 kB in 2s (149 kB/s) Selecting previously unselected package libltdl-dev:amd64. (Reading database ... 182730 files and directories currently installed.) Preparing to unpack .../0-libltdl-dev_2.4.6-1_amd64.deb ... Unpacking libltdl-dev:amd64 (2.4.6-1) ... Selecting previously unselected package libtool. Preparing to unpack .../1-libtool_2.4.6-1_all.deb ... Unpacking libtool (2.4.6-1) ... Setting up libtool (2.4.6-1) ... Setting up libltdl-dev:amd64 (2.4.6-1) ... Processing triggers for man-db (2.7.5-1) ...
转载请注明原文地址: https://www.6miu.com/read-20689.html

最新回复(0)