为什么 ./configure libbitcoin-system 在 Raspian Butch 上找不到 boost 库?
Why is ./configure libbitcoin-system not finding boost library on Raspian Butch?
tl;dr:Boost
在那里,但有问题。 ./configure
不知道 boost
的路径。
我克隆了 libbitcoin-system
,克隆了 git checkout v3.6.0
并遵循了 this(日志如下):
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
./configure
以
退出
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
configure: error: Could not find a version of the library!
我是 运行 RP3B 上的 Raspbian Buster。我确实安装了 bitcoin core 并且运行良好。我没有安装 boost
但它在我的系统上。
首先我认为 boost
有问题。在我发现 sudo find /usr -type f -name "libboost*.so*"
:
的评论之后
/usr/lib/arm-linux-gnueabihf/libboost_iostreams.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_program_options.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_prg_exec_monitor.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_unit_test_framework.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_date_time.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_atomic.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_iostreams.so.1.58.0
/usr/lib/arm-linux-gnueabihf/libboost_system.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_thread.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_locale.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_chrono.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_timer.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_regex.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_wserialization.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_filesystem.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_serialization.so.1.67.0
所以我怀疑 boost
一切正常,对吧?(编辑:不,不是。)
这是 ./configure
之后的完整日志:
pi@raspberrypi:~/libbitcoin-system $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for a sed that does not truncate output... (cached) /bin/sed
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether g++ supports C++11 features by default... yes
checking --with-pkgconfigdir option... ${exec_prefix}/lib/pkgconfig
checking --with-tests option... yes
checking --with-examples option... yes
checking --with-icu option... no
checking --with-png option... no
checking --with-qrencode option... no
checking --enable-ndebug option... yes
checking --enable-isystem option... no
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
configure: error: Could not find a version of the library!
$ ./autogen.sh
的输出:
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:36: installing 'build-aux/ar-lib'
configure.ac:36: installing 'build-aux/compile'
configure.ac:39: installing 'build-aux/config.guess'
configure.ac:39: installing 'build-aux/config.sub'
configure.ac:30: installing 'build-aux/install-sh'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
在我第一次从 source 安装 libbitcoin-secp256k1
时遇到错误后,效果很好。
编辑:在评论之后我告诉 ./configure
在哪里可以找到 boost
这有点帮助但现在它正在退出 boost_iostreams
:
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib/arm-linux-gnueabihf
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono... yes
configure: boost_chrono_LIBS : -lboost_chrono
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time... yes
configure: boost_date_time_LIBS : -lboost_date_time
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
configure: boost_filesystem_LIBS : -lboost_filesystem
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... no
checking for exit in -lboost_iostreams... (cached) no
configure: error: Could not link against boost_iostreams !
编辑:根据另一条评论,我将 boost_iostreams
从 here 更新为 sudo apt install libboost-iostreams1.67-dev
,从而在正确的位置安装了 armhf
文件。
现在 ./configure
正在退出
checking whether the Boost::Locale library is available... yes
checking for exit in -lboost_locale... no
configure: error: Could not link against boost_locale !
我用 sudo apt install libboost-dev
解决了它。 我不愿意这样做,因为我阅读了其他人这样做的评论,但它仍然不起作用,我想找出我在我的 Raspian Butch 上(预)安装 boost
的具体问题。
鉴于您在 /usr/lib/arm-linux-gnueabihf/
中找到了 boost 共享对象(使用 find /usr -type f -name "libboost*.so*"
),您必须让配置脚本知道在该位置查找 boost 库:
./configure --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
后面是其余的构建命令(make 等)。
tl;dr:Boost
在那里,但有问题。 ./configure
不知道 boost
的路径。
我克隆了 libbitcoin-system
,克隆了 git checkout v3.6.0
并遵循了 this(日志如下):
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
./configure
以
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
configure: error: Could not find a version of the library!
我是 运行 RP3B 上的 Raspbian Buster。我确实安装了 bitcoin core 并且运行良好。我没有安装 boost
但它在我的系统上。
首先我认为 boost
有问题。在我发现 sudo find /usr -type f -name "libboost*.so*"
:
/usr/lib/arm-linux-gnueabihf/libboost_iostreams.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_program_options.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_prg_exec_monitor.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_unit_test_framework.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_date_time.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_atomic.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_iostreams.so.1.58.0
/usr/lib/arm-linux-gnueabihf/libboost_system.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_thread.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_locale.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_chrono.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_timer.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_regex.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_wserialization.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_filesystem.so.1.67.0
/usr/lib/arm-linux-gnueabihf/libboost_serialization.so.1.67.0
所以我怀疑 boost
一切正常,对吧?(编辑:不,不是。)
这是 ./configure
之后的完整日志:
pi@raspberrypi:~/libbitcoin-system $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for a sed that does not truncate output... (cached) /bin/sed
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether g++ supports C++11 features by default... yes
checking --with-pkgconfigdir option... ${exec_prefix}/lib/pkgconfig
checking --with-tests option... yes
checking --with-examples option... yes
checking --with-icu option... no
checking --with-png option... no
checking --with-qrencode option... no
checking --enable-ndebug option... yes
checking --enable-isystem option... no
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
configure: error: Could not find a version of the library!
$ ./autogen.sh
的输出:
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:36: installing 'build-aux/ar-lib'
configure.ac:36: installing 'build-aux/compile'
configure.ac:39: installing 'build-aux/config.guess'
configure.ac:39: installing 'build-aux/config.sub'
configure.ac:30: installing 'build-aux/install-sh'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
在我第一次从 source 安装 libbitcoin-secp256k1
时遇到错误后,效果很好。
编辑:在评论之后我告诉 ./configure
在哪里可以找到 boost
这有点帮助但现在它正在退出 boost_iostreams
:
checking for boostlib >= 1.62.0... yes
configure: boost_CPPFLAGS : -I/usr/include
configure: boost_ISYS_CPPFLAGS : -isystem/usr/include
configure: boost_LDFLAGS : -L/usr/lib/arm-linux-gnueabihf
configure: boost_BUILD_CPPFLAGS : -I/usr/include
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono... yes
configure: boost_chrono_LIBS : -lboost_chrono
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time... yes
configure: boost_date_time_LIBS : -lboost_date_time
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
configure: boost_filesystem_LIBS : -lboost_filesystem
checking whether the Boost::IOStreams library is available... yes
checking for exit in -lboost_iostreams... no
checking for exit in -lboost_iostreams... (cached) no
configure: error: Could not link against boost_iostreams !
编辑:根据另一条评论,我将 boost_iostreams
从 here 更新为 sudo apt install libboost-iostreams1.67-dev
,从而在正确的位置安装了 armhf
文件。
现在 ./configure
正在退出
checking whether the Boost::Locale library is available... yes
checking for exit in -lboost_locale... no
configure: error: Could not link against boost_locale !
我用 sudo apt install libboost-dev
解决了它。 我不愿意这样做,因为我阅读了其他人这样做的评论,但它仍然不起作用,我想找出我在我的 Raspian Butch 上(预)安装 boost
的具体问题。
鉴于您在 /usr/lib/arm-linux-gnueabihf/
中找到了 boost 共享对象(使用 find /usr -type f -name "libboost*.so*"
),您必须让配置脚本知道在该位置查找 boost 库:
./configure --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
后面是其余的构建命令(make 等)。