|
Boost-Build : |
Subject: Re: [Boost-build] recursively call unit test executable
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-11-04 17:48:24
AMDG
On 11/04/2018 01:59 AM, Tim Blechmann via Boost-build wrote:
> 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?
>
The executable runs because DYLD_LIBRARY_PATH is set.
Is this somehow not being inherited or is system() not
respecting it?
Possible workarounds:
- <hardcode-dll-paths>on or,
- <link>static
In Christ,
Steven Watanabe
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