Closed efa closed 4 years ago
I tryed to manually add '-Wl,-rpath,$$ORIGIN' to LIB line of 'buildQt/Makefile' and work, 'airspaceconverter-gui' can find .so it its executable path and not only in CWD.
But I do not know the syntax to fix 'AirspaceConverterQt/AirspaceConverterQt.pro', adding '-Wl,-rpath,$$ORIGIN' to 'unix: LIBS' line does not generate a right Makefile
found a way, adding the line with escaped ' and $:
unix: LIBS += -L$$PWD/../Release/ -lairspaceconverter \'-Wl,-rpath=\$$ORIGIN\'
in AirspaceConverterQt/AirspaceConverterQt.pro
generate the right Makefile
and the binary has the right RPATH:
$ chrpath -l airspaceconverter-gui
airspaceconverter-gui: RUNPATH=$ORIGIN
now it can find the .so
I will do another pull request after this one is in
I noticed now that with this pull request on RPATH branch, it is included the pull request on master branch about space trim reading Cup files. Will try to fix this
This happened because I created the RPATH branch after the pull of space trim on master branch in my repo. I deleted the RPATH branch, I think I had to wait the space trim pull be included in upstream repo, and then re-create the branch and re-create this pull request for RPATH
With this patch now RPATH is set to executable path: $ chrpath -l airspaceconverter airspaceconverter: RUNPATH=$ORIGIN This should solve: https://github.com/alus-it/AirspaceConverter/issues/119
Has to be fixed for 'airspaceconverter-gui' too