Anton Indrawan(deleted)
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
|
Anton Indrawan(deleted)
05/26/2016 4:15 PM
post116346
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
Hi Alexander,
Typically, that entire values can be solved by adding the following option to the linker
"-Wl,-rpath,$ORIGIN,-rpath,$ORIGIN/../lib".
If you use CMake:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ORIGIN,-rpath,$ORIGIN/../lib")
Hope this helps.
|
|
|
Michael Daniels(deleted)
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
|
Michael Daniels(deleted)
05/27/2016 11:19 AM
post116353
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
Two possibilities come to mind, the libraries so name is set incorrectly, or the soname is not set at all and the lib
was passed to the linker with the full path you are seeing.
You can use something like this to check what the soname is:
ntox86-readelf -d libboost_system-qcc-mt-1_60.so.1.60.0 | grep SONAME
Your build logs should show how things were passed to the linker, and whatever build system boost uses will hopefully
tell you why the options were used.
|
|
|
Will Miles
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
|
Will Miles
05/27/2016 2:20 PM
post116354
|
Re: Include<boost/shared_ptr> doesn't compile with QNX 6.6 QCC and c++11
Hi,
Some relevant links:
https://github.com/boostorg/build/issues/85
https://github.com/blackberry/Boost/issues/11
I ended up using a slightly simpler solution - simply adding a space
after $(HAVE_SONAME) seemed to resolve it for me.
-Will
diff --git a/src/tools/qcc.jam b/src/tools/qcc.jam
index 8edd995..d07ec74 100644
--- a/src/tools/qcc.jam
+++ b/src/tools/qcc.jam
@@ -235,5 +235,5 @@ rule link.dll ( targets * : sources * : properties * )
#
actions link.dll bind LIBRARIES
{
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o
"$(<)" $(HAVE_SONAME)-Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)"
"$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o
"$(<)" $(HAVE_SONAME) -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)"
"$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
}
On 2016-05-26 7:40 AM, Alexander Fagrell wrote:
> I actually found the issue but I don't have a good solution (just a very awkward solution):
>
> Doing an objdump on the unit-test-framework resulted in:
>
> Dynamic Section:
> NEEDED bin.v2\libs\timer\build\qcc\release\target-os-qnx\threadapi-pthread\threading-multi\
libboost_timer-qcc-mt-1_60.so.1.60.0
> NEEDED bin.v2\libs\system\build\qcc\release\target-os-qnx\threadapi-pthread\threading-multi\
libboost_system-qcc-mt-1_60.so.1.60.0
> NEEDED libm.so.2
> NEEDED libc.so.3
>
> As you can see there is a ridiculous path to link to both the timer and the system library. I've manually edited the
library's binary-file and removed the path (this is the awkward part...) to:
>
> Dynamic Section:
> NEEDED libboost_timer-qcc-mt-1_60.so.1.60.0
> NEEDED libboost_system-qcc-mt-1_60.so.1.60.0
> NEEDED libm.so.2
> NEEDED libc.so.3
>
> Which works. Is it possible to force Boost to not include the entire path into the library? Is this a boost issue or a
qcc toolchain issue? I really don't want to edit each library's binary file manually...
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post116343
> To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com
>
|
|
|