GNOME Bugzilla – Bug 606872
Incorrect ABS_GLIB_RUNTIME_LIBDIR setting
Last modified: 2018-02-15 14:57:46 UTC
On OS X 10.4 glib-2.22.4, I'm getting Makefiles that have: ABS_GLIB_RUNTIME_LIBDIR = /sw/build.build/glib2-shlibs-2.22.4-1/glib-2.22.4/${exec_prefix} But that's the *buildtime* dir. Doesn't matter whether I pass --prefix=/sw and/or --exec_prefix=/sw. I see documention that I can override using --with-runtime-libdir, but that doesn't make sense...I am installing directly at $prefix with no other symlinks. And even if I pass --with-runtime-libdir, I don't see any change to ABS_GLIB_RUNTIME_LIBDIR. Anyway, seems unusual for the default to be so wrong. I tried instrumenting configure to see what was happening. Here: ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`" First, -f is not available on OSX 10.4's /usr/sbin/readlink. But if I have fink installed, I get the more standard one that accepts the -f flag. Not sure how badly things go if readlink completely fails here (i.e., no fink). But anyway $libdir is defined in terms of $exec_prefix, *unexpanded*: readlink is being called literally: readlink -f ${exec_prefix}/lib/ rather than having variable-substitution done. 'readlink -f NOSUCH' (i.e., on a directory that does not exist) returns $PWD/NOSUCH, which is exactly the behavior I see: I am building from within the extracted tarball at /sw/build.build/glib2-shlibs-2.22.4-1/glib-2.22.4 Passing --libdir=/sw/lib solves it, but that's the default value; I shouldn't have to pass flags to assign variables to their default values:) Need to pre-expand runtime_libdir: rld=`eval echo $libdir/$with_runtime_libdir` ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $rld`" But that's still bugged: $exec_prefix is "NONE" at this point in ./configure unless it is explicitly set with --exec_prefix (and likewise with $prefix). Again, I am forced to use flags to set variables to their default values just to get things to work at all:( Need to do this whole configure block much later in the script.
Related Bug #640834 (note, still same configure code-block as of glib-2.36.1)
Marking as depends-on bug #744772 due to the patch there which I think should fix this problem, although I can’t test on OS X.
I’m going to assume that bug #744772 has fixed this problem on OS X (as it has done on Linux). Please reopen this bug report if that’s not the case. Thanks. *** This bug has been marked as a duplicate of bug 744772 ***