Boost logo

Boost-Build :

Subject: [Boost-build] recursively call unit test executable
From: Tim Blechmann (tim_at_[hidden])
Date: 2018-11-04 07:59:45


hi all,

i'm currently having some trouble with b2: to test lockfree with
interprocess, i'm calling the executable itself:

https://github.com/boostorg/lockfree/blob/master/test/queue_interprocess_test.cpp#L38

`std::system()` isn't able to resolve the dynamic libraries, so it fails
with:
> dyld: Library not loaded: libboost_chrono.dylib
> Referenced from: /Users/tim/dev/boost/libs/lockfree/test/../../../bin.v2/libs/lockfree/test/queue_interprocess_test.test/darwin-4.2.1/debug/threadapi-pthread/threading-multi/visibility-hidden/queue_interprocess_test
> Reason: image not found

this seems to be the case because the binaries lack the rpath:
> 13:36 $ otool -L ../../../bin.v2/libs/lockfree/test/queue_interprocess_test.test/darwin-4.2.1/debug/threadapi-pthread/threading-multi/visibility-hidden/queue_interprocess_test
> ../../../bin.v2/libs/lockfree/test/queue_interprocess_test.test/darwin-4.2.1/debug/threadapi-pthread/threading-multi/visibility-hidden/queue_interprocess_test:
> libboost_chrono.dylib (compatibility version 0.0.0, current version 0.0.0)
> libboost_unit_test_framework.dylib (compatibility version 0.0.0, current version 0.0.0)
> libboost_thread.dylib (compatibility version 0.0.0, current version 0.0.0)
> libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
> libboost_atomic.dylib (compatibility version 0.0.0, current version 0.0.0)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)

any idea how to make this work?

tia,
tim


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