Comments (5)
From the previous dynamic build.
$ ldd bx
linux-vdso.so.1 => (0x00007fff4edfe000)
libboost_program_options.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.54.0 (0x00007f0818adb000)
libbitcoin-client.so.0 => /home/eric/Packages/lib/libbitcoin-client.so.0 (0x00007f08188bb000)
libbitcoin.so.0 => /home/eric/Packages/lib/libbitcoin.so.0 (0x00007f08185ae000)
libboost_filesystem.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0 (0x00007f0818398000)
libboost_system.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0 (0x00007f0818194000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0817f75000)
libczmq++.so.0 => /home/eric/Packages/lib/libczmq++.so.0 (0x00007f0817d6f000)
libczmq.so.1 => /home/eric/Packages/lib/libczmq.so.1 (0x00007f0817aec000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f08177e7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08175d1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f081720b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0818d65000)
libbitcoin-protocol.so.0 => /home/eric/Packages/lib/libbitcoin-protocol.so.0 (0x00007f0816fc7000)
libprotobuf.so.9 => /home/eric/Packages/lib/libprotobuf.so.9 (0x00007f0816ccf000)
libsecp256k1.so.0 => /home/eric/Packages/lib/libsecp256k1.so.0 (0x00007f0816ac5000)
libzmq.so.4 => /home/eric/Packages/lib/libzmq.so.4 (0x00007f0816878000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0816572000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0816358000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f08160e4000)
libsodium.so.13 => /home/eric/Packages/lib/libsodium.so.13 (0x00007f0815e92000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0815c89000)
Build static
$ ./configure LDFLAGS="-static" PKG_CONFIG="pkg-config --static"
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -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 a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/bash: /home/eric/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
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 for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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 whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu 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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
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 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 -m elf_x86_64) 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 -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) 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 -m elf_x86_64) 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 whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking whether make supports nested variables... (cached) yes
checking for boostlib >= 1.49... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono... yes
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking pkg-config is at least version 0.9.0... yes
checking for bitcoin... yes
checking for bitcoin_client... yes
checking for sodium... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libbitcoin-explorer.pc
config.status: executing depfiles commands
config.status: executing libtool commands
$ make LDFLAGS="-all-static"
CXXLD bx
/home/eric/Packages/lib/libzmq.a(libzmq_la-ipc_listener.o): In function `zmq::ipc_listener_t::filter(int)':
ipc_listener.cpp:(.text+0x636): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/eric/Packages/lib/libczmq.a(zsys.o): In function `zsys_run_as':
/home/eric/Source/libbitcoin-explorer/bx-build/czmq/src/zsys.c:1013: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/eric/Source/libbitcoin-explorer/bx-build/czmq/src/zsys.c:1022: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/eric/Packages/lib/libzmq.a(libzmq_la-ipc_listener.o): In function `zmq::ipc_listener_t::filter(int)':
ipc_listener.cpp:(.text+0x616): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/eric/Packages/lib/libbitcoin.a(src_libbitcoin_la-network.o): In function `boost::asio::detail::resolve_op<boost::asio::ip::tcp, std::_Bind<std::_Mem_fn<void (libbitcoin::network::network::*)(boost::system::error_code const&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>, std::function<void (std::error_code const&, std::shared_ptr<libbitcoin::network::channel>)>, std::shared_ptr<boost::asio::ip::basic_resolver<boost::asio::ip::tcp, boost::asio::ip::resolver_service<boost::asio::ip::tcp> > >, std::shared_ptr<boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp> >)> (libbitcoin::network::network*, std::_Placeholder<1>, std::_Placeholder<2>, std::function<void (std::error_code const&, std::shared_ptr<libbitcoin::network::channel>)>, std::shared_ptr<boost::asio::ip::basic_resolver<boost::asio::ip::tcp, boost::asio::ip::resolver_service<boost::asio::ip::tcp> > >, std::shared_ptr<boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp> >)> >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long)':
network.cpp:(.text._ZN5boost4asio6detail10resolve_opINS0_2ip3tcpESt5_BindIFSt7_Mem_fnIMN10libbitcoin7network7networkEFvRKNS_6system10error_codeENS3_23basic_resolver_iteratorIS4_EESt8functionIFvRKSt10error_codeSt10shared_ptrINS8_7channelEEEESK_INS3_14basic_resolverIS4_NS3_16resolver_serviceIS4_EEEEESK_INS3_20basic_resolver_queryIS4_EEEEEPS9_St12_PlaceholderILi1EES11_ILi2EESO_ST_SW_EEE11do_completeEPNS1_15task_io_serviceEPNS1_25task_io_service_operationESD_m[_ZN5boost4asio6detail10resolve_opINS0_2ip3tcpESt5_BindIFSt7_Mem_fnIMN10libbitcoin7network7networkEFvRKNS_6system10error_codeENS3_23basic_resolver_iteratorIS4_EESt8functionIFvRKSt10error_codeSt10shared_ptrINS8_7channelEEEESK_INS3_14basic_resolverIS4_NS3_16resolver_serviceIS4_EEEEESK_INS3_20basic_resolver_queryIS4_EEEEEPS9_St12_PlaceholderILi1EES11_ILi2EESO_ST_SW_EEE11do_completeEPNS1_15task_io_serviceEPNS1_25task_io_service_operationESD_m]+0xd4): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/eric/Packages/lib/libczmq.a(zsys.o): In function `zsys_hostname':
/home/eric/Source/libbitcoin-explorer/bx-build/czmq/src/zsys.c:906: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
$ ldd bx
not a dynamic executable
$ ./bx fetch-height
Connection timed out
$ ./bx fetch-header -t 0
Connection timed out
$ ./bx fetch-header -s 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Connection timed out
from libbitcoin-explorer.
Interestingly, an exception from boost still causes a crash dump even from a static build.
$ ./bx fetch-header foobar
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::too_many_positional_options_error> >'
what(): too many positional options have been specified on the command line
Aborted (core dumped)
See #118
from libbitcoin-explorer.
This appears to be related to an outstanding czmq
issue.
from libbitcoin-explorer.
We now have successful command execution with built-libraries statically-linked.
from libbitcoin-explorer.
Thanks @pmienk!
from libbitcoin-explorer.
Related Issues (20)
- newbee issue with installation - tips welcome HOT 3
- New release? HOT 1
- Can't build bx on ubuntu server following instructions. HOT 2
- 'fetch-block' is not a bx command HOT 5
- Fail to do install.sh on reproducible Docker build HOT 3
- Installation Debian/Ubuntu fails , missing library libprotokit.a HOT 13
- building error on OS X HOT 6
- Add bitcoin as a topic to this repository
- Connecting the Bitcoin node to the libbitcoin explorer HOT 1
- 🔥 💀 [ Critical ] bx seed generates insecure seed phrases for bx 3.x HOT 6
- Wiki Improvement (Strengthen warnings about `bx seed`) HOT 4
- `bx seed` warning can be ignored HOT 20
- libbitcoin-explorer 3.7.0 build issue HOT 10
- Single executable file HOT 5
- Question: Which library to install to connect to a node? HOT 3
- Cant build clear Ubuntu 22.04 both install and install-cmake fail for different reasons HOT 22
- 404 error on portable executable for Linux, OSX or Windows HOT 2
- angelisab1:revert-745-version3
- windows, mac & linux exe builds are 404 when clicked. HOT 2
- Since Boost 1.82, C++14 is minimum requirement for Boost.Math HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libbitcoin-explorer.