--with-boost=no requires boost #10826

Open
janstary opened this Issue Jul 14, 2017 · 5 comments

Comments

Projects
None yet
4 participants

This is 0.14.2 being built on OpenBSD 6.1-current.
If I don't mention boost at all in ./configure, it gets detected and compiled in.
Strangely, ./configure --with-boost=no fails and complains boost was not found.

 env AUTOCONF_VERSION=2.69  AUTOMAKE_VERSION=1.15 sh autogen.sh
./configure --prefix=$HOME --mandir=$HOME/man --disable-tests --disable-gui-tests --disable-wallet --with-gui=no --with-boost=no CC=egcc CXX=eg++

...
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the boost_system library!

Even more confusingly, it reports Boost::System as available,
only to complain it could not find it a line later.

Contributor

TheBlueMatt commented Jul 14, 2017

If building without boost is not supported, then --with-boost=no
shouldn't even exist as a documented option in ./configure

Member

theuni commented Jul 14, 2017

boost isn't needed for building libbitcoinconsensus. The issue here is that we don't fail if --without-boost is specified but something needs it.

Member

theuni commented Jul 14, 2017

potential fix, though I'm not sure how to make the error any less cryptic. I'd rather not copy/paste all of the things that do require boost.

diff --git a/configure.ac b/configure.ac
index a90063d..02379df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,6 +691,11 @@ define(MINIMUM_REQUIRED_BOOST, 1.47.0)
 
 dnl Check for boost libs
 AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
+
+if test x$want_boost = xno; then
+    AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]])
+fi
+
 AX_BOOST_SYSTEM
 AX_BOOST_FILESYSTEM
 AX_BOOST_PROGRAM_OPTIONS

It would be IMHO less confusing to just require boost in any case.

janstary changed the title from --with=boost=no requires boost to --with-boost=no requires boost Jul 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment