-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make: add -rpath to LD_SEARCH_FLAGS #2280
Conversation
Re: runstatedir, this could be the source : https://sources.debian.org/src/amoebax/0.2.1+dfsg-5/debian/patches/support-runstatedir-option.patch/ |
Discovered similar “addition” happen with #2225 . |
The runstatedir option was added to autoconf back in 2013: GRASS did not support autoconf newer than 2.13 until recently (7.8.6). |
The GRASS´ |
With unpatched autoconf 2.69, the result is: --- configure.orig
+++ configure
@@ -4032,7 +4032,7 @@
SHLIB_SUFFIX=".so"
SHLIB_LD="${CC} -shared"
LDFLAGS="-Wl,--export-dynamic"
- LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
;;
*-pc-cygwin) The macOS build has, as you may have noticed, a similar set of flags for rpath based linking, so it looks sound in my eyes. Cannot test though. |
As a general note regarding autoconf version. Presently with GRASS, with a readily generated configure, it might be worth considering bumping to 2.71, as this dependency is only restricted for actual updating of the |
Yes, but the BSD builds were missing this rpath setting, in case of netbsd it was wrong, now fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the changes related to the main issue, but I advice you to remove the runstatedir additions. They will be removed after next regeneration by a non-patched autoconf.
OK, the runstatedir additions have been removed. |
@metzm May I suggest to backport this to G8.0.x? Otherwise we'll not see this change for a while, as it takes time for the various distros to pick up the upcoming G8.2.x. |
* Make: add -rpath to LD_SEARCH_FLAGS
Backport done to 8.0.x as discussed with @metzm |
* Make: add -rpath to LD_SEARCH_FLAGS
Backport done to 7.8.x as discussed with @metzm |
* Make: add -rpath to LD_SEARCH_FLAGS
* Make: add -rpath to LD_SEARCH_FLAGS
* Make: add -rpath to LD_SEARCH_FLAGS
Currently, the GDAL-GRASS plugin works only if the directory with GRASS libraries is added to
LD_LIBRARY_PATH
, otherwise GRASS libraries don't find each other. This PR, together with the corresponding GDAL PR 5503, avoids the need to setLD_LIBRARY_PATH
or add an entry to/etc/ld.so.conf.d/
, instead the GDAL-GRASS plugin works out of the box without further adjustments to the system's paths with libraries in non-standard locations.The crucial change is in
aclocal.m4
. Runningautoconf
version 2.69 resulted in more changes toconfigure
than expected, I am not sure if the addedrunstatedir
could cause any harm. My tests succeeded so far.How to test
Failure with:
ogrinfo -so /path/to/grassdata/nc_spm_08/PERMANENT/vector/boundary_county/head
The GDAL error is that some shared GRASS libraries are not found.
Success with:
ogrinfo -so /path/to/grassdata/nc_spm_08/PERMANENT/vector/boundary_county/head
No GDAL errors.