Boost logo

Boost-Build :

Subject: Re: [Boost-build] Adding an -lboost_system works, but why?
From: Kuhl, Brian (brian.kuhl_at_[hidden])
Date: 2016-04-20 19:06:30


libboost_random.so.1.59.0 is present in -L/opt/vx7/workspace/VsbSim32/usr/lib/common

gcc.compile.c++ ../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/link-static/random_device.o
gcc.archive ../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/link-static/libboost_random.a
gcc.link ../bin.v2/libs/random/test/test_random_device.test/gcc-4.8.1/debug/cross-compile-vxworks/link-static/test_random_device
testing.capture-output ../bin.v2/libs/random/test/test_random_device.test/gcc-4.8.1/debug/cross-compile-vxworks/link-static/test_random_device.run
**passed** ../bin.v2/libs/random/test/test_random_device.test/gcc-4.8.1/debug/cross-compile-vxworks/link-static/test_random_device.test
common.mkdir ../bin.v2/libs/random/test/test_random_device_dll.test
common.mkdir ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1
common.mkdir ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug
common.mkdir ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks
gcc.compile.c++ ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks/test_random_device.o
gcc.compile.c++ ../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/random_device.o
gcc.link.dll ../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/libboost_random.so.1.59.0
gcc.link ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks/test_random_device_dll
/opt/vx7/compilers/gnu-4.8.1.6/x86-linux2/bin/../../lib/gcc/i586-wrs-vxworks/4.8.1/../../../../x86-linux2/i586-wrs-vxworks/bin/ld: warning: libboost_system.so.1.59.0, needed by ../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/libboost_random.so.1.59.0, not found (try using -rpath or -rpath-link)
../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/libboost_random.so.1.59.0: undefined reference to `boost::system::system_category()'
../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/libboost_random.so.1.59.0: undefined reference to `boost::system::generic_category()'
collect2: error: ld returned 1 exit status
    "/opt/vx7/compilers/gnu-4.8.1.6/x86-linux2/bin/c++pentium" -o "../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks/test_random_device_dll" "../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks/test_random_device.o" "../bin.v2/libs/random/build/gcc-4.8.1/debug/cross-compile-vxworks/libboost_random.so.1.59.0" -g -m32 -mfpmath=387 -fno-implicit-fp -fno-omit-frame-pointer -fno-builtin -ansi -mrtp -fno-strict-aliasing -O2 -fno-defer-pop -Wall -Wno-comment -Wno-parentheses -Wno-reorder -Wno-narrowing -Wno-error=unused-parameter -isystem/opt/vx7/workspace/VsbSim32/usr/h -isystem/opt/vx7/workspace/VsbSim32/usr/h/system -isystem/opt/vx7/workspace/VsbSim32/usr/h/public -Wl,--defsym,__wrs_rtp_base=0x68000000 -mrtp -L/opt/vx7/workspace/VsbSim32/usr/lib/common -Wl,-lunix -Wl,-lstdc++ -non-static -Wl,-lc -march=i686 -m32
...failed gcc.link ../bin.v2/libs/random/test/test_random_device_dll.test/gcc-4.8.1/debug/cross-compile-vxworks/test_random_device_dll...
...failed updating 1 target...
...updated 59 targets...

-----Original Message-----
From: Boost-build [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Steven Watanabe
Sent: April-20-16 3:39 PM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Adding an -lboost_system works, but why?

AMDG

On 04/20/2016 04:31 PM, Kuhl, Brian wrote:
> In libs/random/test/Jamfile.v2 I added an explicit library reference to get the link to succeed, but I'm not sure why it was necessary for 'random' and not for other libraries.
>
> run test_random_device.cpp /boost//random : : : <link>shared
> <target-os>vxworks:<linkflags>-lboost_system
> : test_random_device_dll ;
>
> I'm sure this is NOT the best solution anyhow, so I curious what a more correct approach would be?
>

  What exactly is the command line and error message
without this change?

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


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