Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 647740

Summary: >=net-libs/nghttp2-1.30.0 - configure:20181: error: Could not find a version of [Boost::ASIO]!
Product: Gentoo Linux Reporter: Gábor VIDA <vidagabor>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED OBSOLETE    
Severity: normal CC: herrtimson, prefix
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=683368
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: config.log
emerge --info

Description Gábor VIDA 2018-02-15 16:18:24 UTC
Created attachment 519604 [details]
config.log

I'm trying to install nghttp2, which fails to find Boost::ASIO's version. The config.log is not really descriptive:

configure:20043: checking whether the Boost::ASIO library is available
configure:20074: x86_64-pc-linux-gnu-g++ -c -O2 -pipe -O2 -pipe  -I/home/evidgbo/usr/roots/gentoo/include conftest.cpp >&5
configure:20074: $? = 0
configure:20088: result: yes
configure:20181: error: Could not find a version of the library!

After debugging the configure script, I ended up that if configure gets --with-boost=${EPREFIX}, then it properly finds Boost::ASIO, as it can set BOOST_ROOT and BOOST_LDFLAGS.
Comment 1 Gábor VIDA 2018-02-15 16:18:57 UTC
Created attachment 519606 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-15 09:57:51 UTC
oops
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-15 10:03:35 UTC
  --with-boost[=ARG]      use Boost library from a standard location
                          (ARG=yes), from the specified location (ARG=<path>),
                          or disable it (ARG=no) [ARG=yes]
  --with-boost-libdir=LIB_DIR
                          Force given directory for boost libraries. Note that
                          this will override library path detection, so use
                          this parameter only if default library detection
                          fails and you know exactly where your boost
                          libraries are located.
  --with-boost-asio[=special-lib]
                          use the ASIO library from boost - it is possible to
                          specify a certain library for the linker e.g.
                          --with-boost-asio=boost_system-gcc41-mt-1_34
  --with-boost-system[=special-lib]
                          use the System library from boost - it is possible
                          to specify a certain library for the linker e.g.
                          --with-boost-system=boost_system-gcc-mt
  --with-boost-thread[=special-lib]
                          use the Thread library from boost - it is possible
                          to specify a certain library for the linker e.g.
                          --with-boost-thread=boost_thread-gcc-mt

While fixing this bug, support for boost should probably be made optional. USE=cxx is causing some confusion in the ebuild as well: USE=cxx enables asio-lib, which requires boost, but boost can be disabled independently, so that calls for a REQUIRED_USE=".. cxx? ( boost )". But building libnghttp2_asio does not imply C++ so why have USE=cxx in the first place and not USE=asio?
Comment 4 Gábor VIDA 2018-04-16 12:31:24 UTC
As I'm updating to net-libs/nghttp2-1.31.1, it turned out that myeconfargs variable in the ebuild should be extended by --with-boost=${EPREFIX}/usr. Previously I did not mention the extra "/usr" at the end.
Comment 5 tt_1 2019-01-04 16:14:38 UTC
This is a problem if cross-emerging the package, to armv6j-unknown-linux-gnueabihf in my case. 

Did you encounter additional problems? passing --with-boost=${EPREFIX}/usr seems reasonable to me?
Comment 6 tt_1 2019-01-04 16:26:55 UTC
Hmm, cross emerging with that fix passes, but it doesn't install the corresponding libnghttp2_asio.so libraries.
Comment 7 Andreas Sturmlechner gentoo-dev 2019-07-02 09:37:58 UTC
net-libs/nghttp2-1.39.1 should work fine.