Boost logo

Boost-Build :

Subject: Re: [Boost-build] LSB (Linux standard base)
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-10-23 04:32:31


On Tuesday, October 19, 2010 00:18:55 k h wrote:
> I wondered if someone could help me with compiling/using boost under lsb
> (Linux standard base). This is what I have tried so far:
>
> unpack boost 43
>
> bootstrap.sh
>
> Add the following line to project-config.jam:
>
> using gcc : : /opt/lsb/bin/lsbc++ : <cflags>-U_GNU_SOURCE
> <cxxflags>-U_GNU_SOURCE <cflags> --lsb-verbose <cxxflags>--lsb-verbose ;
>
>
> Compile just the test library for now:
>
> bjam cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC --with-test --link-static
> -d+2 --verbose
>
>
> This appears to work fine. Now a trivial bit of testcode:
>
> #define BOOST_AUTO_TEST_MAIN
> #include <boost/test/auto_unit_test.hpp>
> #include <boost/test/unit_test.hpp>
>
>
> BOOST_AUTO_TEST_CASE (blah)
> {
> BOOST_CHECK (1);
> }
>
> Build the example, and die trying :-) The command-line passed to the
> backend compiler does include -lstdc++ . I have checked the same example
> works fine when everything is compiled using plain g++. My default gcc
> version is gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5). I am fairly sure the
> problem is not specific to the test library :
>
> /opt/lsb/bin/lsbc++ -o linktest_executable linktest.cpp -I boost_1_43_0
> boost_1_43_0/stage/lib/libboost_unit_test_framework.a --lsb-verbose
>
> (....)
>
> test_tools.cpp:(.text+0x3c72): undefined reference to
> `std::basic_istream<char, std::char_traits<char> >::ignore(int)'

Is this the only undefined reference? If so, this might suggest the library LSB
is linking against does not have this symbol indeed. Can you determine the
exact .so for libstdc++? Use -Wl,-t option to g++ for some debugging.

Then, use 'nm' to check if that symbols is present in the library.
Then, use 'nm' to check if that symbol is present in system libstdc++.
If there's mismatch, this is LSB's problem.

HTH,

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk