Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost Build Error With --enable-proton #3816

Closed
defuse opened this issue Jan 30, 2019 · 3 comments
Closed

Boost Build Error With --enable-proton #3816

defuse opened this issue Jan 30, 2019 · 3 comments
Assignees
Labels
A-build Area: Build system C-bug Category: This is a bug

Comments

@defuse
Copy link
Contributor

defuse commented Jan 30, 2019

While working on #3786 I noticed my build fails with --enable-proton, in AX_BOOST_SYSTEM, in a fresh clone without any of the #3786 updates. It succeeds without --enable-proton. There's clearly another problem that the -lqpid-proton-cpp check fails but in that case configure.ac looks like it should just continue building without Proton. Instead, it makes the Boost::System check right below it fail somehow.

Commit: beb465d

Output:

...
checking for Berkeley DB C++ headers... default
checking for main in -ldb_cxx-6.2... yes
checking proton/connection.hpp usability... yes
checking proton/connection.hpp presence... yes
checking for proton/connection.hpp... yes
checking for main in -lqpid-proton-cpp... no
configure: WARNING: Proton libraries not found, disabling Proton support
checking for boostlib >= 1.62... yes
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the boost_system library!

config.log:

configure:18913: checking for proton/connection.hpp
configure:18913: result: yes
configure:18927: checking for main in -lqpid-proton-cpp
configure:18946: g++ -m64 -std=c++11 -o conftest -pipe -O1 -g -I/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -L/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../lib  conftest.cpp -lqpid-proton-cpp  -lanl  >&5
/bin/ld: cannot find -lqpid-proton-cpp
collect2: error: ld returned 1 exit status
configure:18946: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Zcash"
| #define PACKAGE_TARNAME "zcash"
| #define PACKAGE_VERSION "2.0.2"
| #define PACKAGE_STRING "Zcash 2.0.2"
| #define PACKAGE_BUGREPORT "https://github.com/zcash/zcash/issues"
| #define PACKAGE_URL ""
| #define HAVE_CXX11 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_PTHREAD_PRIO_INHERIT 1
| #define HAVE_PTHREAD 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_STRERROR_R 1
| #define STRERROR_R_CHAR_P 1
| #define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
| #define HAVE_ENDIAN_H 1
| #define HAVE_BYTESWAP_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_GETADDRINFO_A 1
| #define HAVE_INET_PTON 1
| #define HAVE_DECL_STRNLEN 1
| #define HAVE_DECL_LE16TOH 1
| #define HAVE_DECL_LE32TOH 1
| #define HAVE_DECL_LE64TOH 1
| #define HAVE_DECL_HTOLE16 1
| #define HAVE_DECL_HTOLE32 1
| #define HAVE_DECL_HTOLE64 1
| #define HAVE_DECL_BE16TOH 1
| #define HAVE_DECL_BE32TOH 1
| #define HAVE_DECL_BE64TOH 1
| #define HAVE_DECL_HTOBE16 1
| #define HAVE_DECL_HTOBE32 1
| #define HAVE_DECL_HTOBE64 1
| #define HAVE_DECL_BSWAP_16 1
| #define HAVE_DECL_BSWAP_32 1
| #define HAVE_DECL_BSWAP_64 1
| #define HAVE_MSG_NOSIGNAL 1
| #define HAVE_VISIBILITY_ATTRIBUTE 1
| #define HAVE_PROTON_CONNECTION_HPP 1
| /* end confdefs.h.  */
| 
| 
| int
| main ()
| {
| return main ();
|   ;
|   return 0;
| }
configure:18955: result: no
configure:18960: WARNING: Proton libraries not found, disabling Proton support
configure:19032: checking for boostlib >= 1.62
configure:19117: g++ -m64 -std=c++11 -c -pipe -O1 -g -I/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -I/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../include conftest.cpp >&5
configure:19117: $? = 0
configure:19119: result: yes
configure:19306: checking whether the Boost::System library is available
configure:19331: g++ -m64 -std=c++11 -c  -I/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -I/home/firexware/zcash/zfreshagain/depends/x86_64-unknown-linux-gnu/share/../include conftest.cpp >&5
configure:19331: $? = 0
configure:19346: result: yes
configure:19506: error: Could not find a version of the boost_system library!
@defuse
Copy link
Contributor Author

defuse commented Jan 30, 2019

Looks like the problem is the depends system build failing silently, not in configure.ac, because commenting out the line proton_packages_$(NO_PROTON) = $(proton_packages) in depends/Makefile makes the --enable-proton build succeed (of course without Proton, per the rules to fallback to not building with Proton in configure.ac when it isn't found).

@defuse
Copy link
Contributor Author

defuse commented Jan 30, 2019

Ah, the problem is a lib64 directory the Proton build puts into x86_64-unknown-linux-gnu...

$ diff -ur depends/ good-depends/
Only in depends/x86_64-unknown-linux-gnu/include: proton
Only in depends/x86_64-unknown-linux-gnu: lib64
Only in depends/x86_64-unknown-linux-gnu/share: proton-0.17.0
Only in good-depends/x86_64-unknown-linux-gnu: .stamp_518feda2592
Only in depends/x86_64-unknown-linux-gnu: .stamp_c478dfbaa42

Deleting the lib64 directory made configure succeed. Re-creating it (empty) made configure fail again. Moving everything in lib64 over to lib makes configure and the full build (with proton) succeed.

checking for main in -ldb_cxx-6.2... yes
checking proton/connection.hpp usability... yes
checking proton/connection.hpp presence... yes
checking for proton/connection.hpp... yes
checking for main in -lqpid-proton-cpp... yes
checking for boostlib >= 1.62... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Filesystem library is available... yes

So I just have to figure out why it's creating lib64 instead of installing into lib or add lib64 to the right search paths.

Adding -DLIB_SUFFIX= in depends/packages/proton.mk fixed it.

@defuse defuse added the C-bug Category: This is a bug label Jan 30, 2019
defuse added a commit to defuse/zcash that referenced this issue Jan 30, 2019
@defuse
Copy link
Contributor Author

defuse commented Feb 26, 2019

#3809 fixed this.

@defuse defuse closed this as completed Feb 26, 2019
bitcartel added a commit to bitcartel/zcash that referenced this issue Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build system C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant