[opensuse-packaging] location of devel symlinks for libraries
Hi, A library required during system boot lives in /lib. Therefore one runs configure --lib=/%_lib which means all files get installed into /%_lib including the devel symlink *.so that point to the SONAME. Some packages manually move that symlink to /usr. Does that have any technical or cosmetic advantage? cu Ludwig -- (o_ Ludwig Nussel //\ SUSE LINUX Products GmbH, Development V_/_ http://www.suse.de/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi,
Ludwig Nussel
A library required during system boot lives in /lib. Therefore one runs configure --lib=/%_lib which means all files get installed into /%_lib including the devel symlink *.so that point to the SONAME. Some packages manually move that symlink to /usr. Does that have any technical or cosmetic advantage?
Yes, there has been a technical problem I've been running into when moving the libs of of libgpg-error and libgcrypt. The static libs are not allowed to reside in /%_lib they have to be in %_libdir (Also the libtools .la files). Since the linker seems to search first in %_libdir and then in /%lib, it does not find the .so link when linking and links against the static lib, which is not what we want. Richard Guenther and Michael Matz also acknowledged that the .so devel link has to reside in /usr/%_lib. Maybe they know more about this. Matthias --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Matthias Koenig wrote:
Ludwig Nussel
writes: A library required during system boot lives in /lib. Therefore one runs configure --lib=/%_lib which means all files get installed into /%_lib including the devel symlink *.so that point to the SONAME. Some packages manually move that symlink to /usr. Does that have any technical or cosmetic advantage?
Yes, there has been a technical problem I've been running into when moving the libs of of libgpg-error and libgcrypt. The static libs are not allowed to reside in /%_lib they have to be in %_libdir (Also the libtools .la files). Since the linker seems to search first in %_libdir and then in /%lib, it does not find the .so link when linking and links against the static lib, which is not what we want. Richard Guenther and Michael Matz also acknowledged that the .so devel link has to reside in /usr/%_lib. Maybe they know more about this.
Ok. However, pkgconfig files typically specify -L${libdir} in their linker flags which would result in -L/lib. So I guess it would actually make more sense to run configure with %_libdir and then move non-devel files to /lib instead of the other way around. cu Ludwig -- (o_ Ludwig Nussel //\ SUSE LINUX Products GmbH, Development V_/_ http://www.suse.de/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wed, Jan 17, 2007 at 11:31:15AM +0100, Ludwig Nussel wrote:
Ok. However, pkgconfig files typically specify -L${libdir} in their linker flags which would result in -L/lib. So I guess it would actually make more sense to run configure with %_libdir and then move non-devel files to /lib instead of the other way around.
It depends on what your package actually contains: - If your package only contains a library you might be right: If you install to /lib first, then you have to move only the include files, the static libs (if any) to /usr/lib and recreate symlinks in /usr/lib. If you install in /usr/lib first then you have to move the shared libs to /lib and also recreate the symlinks in /usr/lib (because they have to point to a different location then). So in this case you might save a bit of moving but the most complex part (recreating the symlinks) did not change. - If your package does contain executables or data es well, everything turns the other way around: First you have to move the binaries as well with your proposal and second there is the problem that the build might encode the (wrong!) path to the binaries where the data is found, leading to the result that the tool can no longer find it's data after moving it. Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@gmail.com "Quidquid latine dictum sit, altum sonatur."
Robert Schiele wrote:
On Wed, Jan 17, 2007 at 11:31:15AM +0100, Ludwig Nussel wrote:
Ok. However, pkgconfig files typically specify -L${libdir} in their linker flags which would result in -L/lib. So I guess it would actually make more sense to run configure with %_libdir and then move non-devel files to /lib instead of the other way around.
It depends on what your package actually contains:
- If your package only contains a library you might be right: [...] - If your package does contain executables or data es well, [...]
If the package uses autotools or if the makefiles are written with some care, then the two cases don't make much difference: you set --prefix to /usr and only handle --libdir one way or another (or --exec-prefix if you want also the binaries to be on the root partition). Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tue, Jan 16, Ludwig Nussel wrote:
Hi,
A library required during system boot lives in /lib. Therefore one runs configure --lib=/%_lib which means all files get installed into /%_lib including the devel symlink *.so that point to the SONAME. Some packages manually move that symlink to /usr. Does that have any technical or cosmetic advantage?
Technical: /usr/%_lib is the place where the linker searches, it does not need to search in /lib cosmetical: Don't clobber /lib with files we don't need there, especially not with static libraries. Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg -------------------------------------------------------------------- Key fingerprint = 8C6B FD92 EE0F 42ED F91A 6A73 6D1A 7F05 2E59 24BB --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (5)
-
Ludwig Nussel
-
Matthias Koenig
-
Michal Marek
-
Robert Schiele
-
Thorsten Kukuk