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 586675 - Runtime library location
Runtime library location
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-06-22 19:35 UTC by David Zeuthen (not reading bugmail)
Modified: 2009-06-23 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (5.04 KB, patch)
2009-06-22 19:37 UTC, David Zeuthen (not reading bugmail)
committed Details | Review
Installed tree with this patch (26.63 KB, text/plain)
2009-06-22 19:39 UTC, David Zeuthen (not reading bugmail)
  Details

Description David Zeuthen (not reading bugmail) 2009-06-22 19:35:40 UTC
Some distros, such as Fedora (and probably others), installs the runtime libraries (e.g. libglib-2.0.so.0 and libglib-2.0.so.0.2103.0) from the GLib tarball into /lib instead of /usr/lib (while keeping libglib-2.0.so used for development in /usr/lib). This is because programs running before /usr is mounted are using GLib.

Anyway, this makes it hard to hack on GLib the usual way we all know and love, e.g.

 1. CFLAGS="-O0 -g" ./autogen.sh --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --libdir=/usr/lib64

 2. make && sudo make install

I will attach a patch that introduces a --with-runtime-libdir option so you can pass a (relative) path to the location where to install the runtime libraries, e.g.

 1. CFLAGS="-O0 -g" ./autogen.sh --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --libdir=/usr/lib64 \
    --with-runtime-libdir=../../lib64
Comment 1 David Zeuthen (not reading bugmail) 2009-06-22 19:37:46 UTC
Created attachment 137199 [details] [review]
Proposed patch
Comment 2 David Zeuthen (not reading bugmail) 2009-06-22 19:39:10 UTC
Created attachment 137200 [details]
Installed tree with this patch

Sources were configured this way

./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
             --libdir=/usr/lib64 --with-runtime-libdir=../../lib64
Comment 3 David Zeuthen (not reading bugmail) 2009-06-22 19:43:12 UTC
Btw, the reason we're asking for a relative path instead of an absolute path is that

 - We want the symlink in /usr/lib64/libglib-2.0.so -> TARGET
   to be relative (otherwise some build systems might complain
   when installing to DESTDIR)

 - I don't know of any good portable equivalent (e.g. sh(1)) of Python's 
   os.path.relpath() function


Comment 4 Daniel Macks 2009-06-22 20:19:15 UTC
This feels like a generic autoconf->automake->libtool idea. Do they have any thoughts about it before going ahead with a home-grown solution?
Comment 5 David Zeuthen (not reading bugmail) 2009-06-23 00:31:43 UTC
(In reply to comment #4)
> This feels like a generic autoconf->automake->libtool idea. Do they have any
> thoughts about it before going ahead with a home-grown solution?

All other projects (udev, glibc etc) with these needs roll their own. If autoconf/automake/libtool can do this in the future, we can always switch to it. For now, it solves a very real (and annoying) problem.

Comment 6 Matthias Clasen 2009-06-23 00:51:20 UTC
Looks very good to me. Thanks for doing that.

Note that we have a section explaining all non-standard configure options in docs/reference/glib/building.sgml. Can you add a paragraph about the new option there when you commit this ?
Comment 7 Daniel Macks 2009-06-23 01:50:04 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > This feels like a generic autoconf->automake->libtool idea. Do they have any
> > thoughts about it before going ahead with a home-grown solution?
> 
> All other projects (udev, glibc etc) with these needs roll their own. If
> autoconf/automake/libtool can do this in the future, we can always switch to
> it. For now, it solves a very real (and annoying) problem.
> 

Makes good sense. Hadn't looked at others.
Comment 8 David Zeuthen (not reading bugmail) 2009-06-23 17:04:21 UTC
(In reply to comment #6)
> Looks very good to me. Thanks for doing that.
> 
> Note that we have a section explaining all non-standard configure options in
> docs/reference/glib/building.sgml. Can you add a paragraph about the new option
> there when you commit this ?
> 

Sure, I added some docs before committing:

http://git.gnome.org/cgit/glib/commit/?id=0ccd18bc83c5e6eff77940a61cc9b31a88dd1851

Thanks for the review.