After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606872 - Incorrect ABS_GLIB_RUNTIME_LIBDIR setting
Incorrect ABS_GLIB_RUNTIME_LIBDIR setting
Status: RESOLVED DUPLICATE of bug 744772
Product: glib
Classification: Platform
Component: build
2.22.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on: 744772
Blocks:
 
 
Reported: 2010-01-13 16:49 UTC by Daniel Macks
Modified: 2018-02-15 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2010-01-13 16:49:32 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.
Comment 1 Daniel Macks 2013-05-11 13:58:04 UTC
Related Bug #640834 (note, still same configure code-block as of glib-2.36.1)
Comment 2 Philip Withnall 2016-01-22 19:28:59 UTC
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.
Comment 3 Philip Withnall 2018-02-15 14:57:46 UTC
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 ***