alus-it / AirspaceConverter

Tool to convert airspace files between different formats: OpenAir, openAIP, KML/KMZ, Polish and Garmin
https://www.alus.it/AirspaceConverter
GNU General Public License v3.0
37 stars 10 forks source link

Rpath #121

Closed efa closed 4 years ago

efa commented 4 years ago

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

efa commented 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

efa commented 4 years ago

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

efa commented 4 years ago

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

efa commented 4 years ago

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