Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Shared libraries reference dependencies with absolute paths #11

Open
arrrow-pk opened this issue Sep 30, 2014 · 0 comments
Open

Shared libraries reference dependencies with absolute paths #11

arrrow-pk opened this issue Sep 30, 2014 · 0 comments

Comments

@arrrow-pk
Copy link

Not too sure of the scope of this problem but I am building on Mac OSX for QNX and I noticed that the generated shared object files referenced their dependencies with absolute paths. I.e. ntoarmv7-objdump on libboost_thread.so lists "bin.v2/libs/system/build/qcc/release/target-os-qnxnto/threading-multi/libboost_system.so.1.52.0" in the dependencies section irrespective of the hardcode-dll-path option. This caused problems when trying to deploy the lib to a device. On digging further it seems that HAVE_SONAME is missing from qcc.jam which is causing the -Wl flag to be excluded from the link command in the "actions link.dll bind LIBRARIES" section. Removing HAVE_SONAME solves the problem, i.e:

--- a/tools/build/v2/tools/qcc.jam
+++ b/tools/build/v2/tools/qcc.jam
@@ -232,5 +232,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 "$(<)" -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(OPTIONS)
    }

Hopefully this helps someone else save some time :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant