-
Notifications
You must be signed in to change notification settings - Fork 123
Alternatives for RPATH #1275
Comments
Here some applications running widely used plugin systems since quite some time: |
Thanks for your feedback, extending 2., and suggesting 6. |
In #2593 the problem appeared again. I would be in favor of using option 5. for the upcoming release. Maintainers can then still use |
Using the second option for Linux and FreeBSD makes sense. I think we should keep |
None of those issues mention macOS. I think some simple if (UNIX)
if (APPLE)
# Use `RPATH` on macOS
else (APPLE)
# Use something different for Linux & FreeBSD
endif (APPLE)
endif (UNIX) should be enough to handle the different options. |
I'll also use the TARGET_PLUGIN_FOLDER for Debian. But I think this is more my personal preference and not something specific to Debian. Don't you think it is the same for macOS? (That it is your preference and not specific to macOS?) |
Btw. furthermore it is possible that macOS (or Debian) will drop their support for RPATH. Then it is better that the maintainer used TARGET_PLUGIN_FOLDER on purpose (and will be aware of potential regressions in future.) |
I am certainly not an expert about this stuff, but as far as I know, using
I did not hear anything about Apple dropping |
At the moment, however, our RPATH solution is not relocatable as we do not use @rpath (MacOS), $ORIGIN (glibc) or similar. So if we keep RPATH as default, we should also fix this. |
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. |
I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. |
Thus in some modern distros RPATH fails both in build-tree (#1255) and after installation (#1233) we should reconsider the default, or at least use a different method when
-DCMAKE_SKIP_INSTALL_RPATH=ON
is set. We have following possibilities:-DTARGET_PLUGIN_FOLDER=""
/etc/ld.so.conf.d/elektra.conf
with whatever was set as plugin path (wont work whenINSTALL_SYSTEM_FILES
is off)RUNPATH
instead (does not work on openwrt, to investigate if it works on all problematic distros. It is, however, less suited for our needs: using different plugins can be configured withkdb mount
, thus there is no need to honorLD_LIBRARY_PATH
)-DTARGET_PLUGIN_FOLDER=""
as default, maybe together with @beku recommendation to group plugins according to their dependency.We should consider:
TARGET_PLUGIN_FOLDER
as empty is, or when using$ORIGIN
inRPATH
orRUNPATH
)$ORIGIN
we would get into troubles, at least the ELF specification recommends to ignore$ORIGIN
in that case)The text was updated successfully, but these errors were encountered: