[Boost.Build, Coroutine2] /usr/bin/ld: cannot find -lboost_coroutine2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Boost.Build, Coroutine2] /usr/bin/ld: cannot find -lboost_coroutine2

Boost - Users mailing list
Hello.

My Jamroot looks like this:

local BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
project my_project
    : requirements <define>BOOST_ALL_NO_LIB=1
    : build-dir bin.v2 ;
use-project /boost : $(BOOST_ROOT) ;
exe my : my_source.cpp /boost//thread /boost//coroutine2 ;

Command line:

b2 --build-dir=whatever -sBOOST_ROOT=/path/to/boost_1_63_0

I'm getting the following error:

/usr/bin/ld: cannot find -lboost_coroutine2

This happens because a library without sources:

https://github.com/boostorg/coroutine2/blob/develop/build/Jamfile.v2#L29

is a pre-built library.

Header-only library should use alias -
http://www.boost.org/build/doc/html/bbv2/faq/header-only-libraries.html

After changing "lib boost_coroutine2..." to "alias boost_coroutine2 ;"
I had to add <library>/boost//context to usage-requirements of
boost/coroutine2 project. Apparently reference to Context from
"requirements" (at line 13) is not enough in this case. Can this be a
bug in Boost.Build?

But the problem with alias is that "b2 --with-coroutine2" does not
build anything at all. My question: is it supported scenario by
Boost.Build - header-only library depending on not-header-only
library?

Bonus question: can those BOOST_DISABLE_ASSERTS be removed from
Jamfiles building Context, Coroutine2 and Fiber?

Thanks.
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users