[lug] Building RPMs - alternate install directories
zlynx at acm.org
Fri Jul 17 13:51:36 MDT 2009
Kenneth D Weinert wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> An update:
> I contacted Kevin off-list and it appears as if this is not very well
> supported, at least in the version of rpmbuild that I have.
> ldconfig does not create links, and I get a message like:
> /sbin/ldconfig: /tools/lib/ is not a symbolic link
> -> libconfig.so.1.0.0
> When every other library (commercially produced) in that directory show
> something along the lines of
> libconfig.so.1.0.0 -> libconfig.so.1.0.0
> but they all have links like:
> lrwxrwxrwx 1 root root 18 Jul 17 13:28 libconfig.so ->
> - -rwxr-xr-x 1 kenw das 85100 Jul 17 13:34 libconfig.so.1.0.0
> I run a file command on both my library and link and the lib I get from
> the vendor and file says the same information about them, permissions
> are all the same, etc.
> I do have a /etc/ld.so.conf.d/IHSPDFTools.conf that contains
> in it, but all to no avail.
> This is getting *really* frustrating right about now and any hints as to
> what stupid thing I might be doing would be greatly appreciated.
> Evidently I can't create the shared lib links in the Makefile if I
> intend to install via RPM as I get an error from rpmbuild when I do that.
> Thanks for any help.
RPM files usually place the lib.so.1 file in the libwhatever package and
the lib.so symlink in the libwhatever-devel package.
ldconfig will only create symlinks when the library soname (use readelf
-d libfile.so to see) is different from the filename.
Because the ELF linker sets the NEEDED entries in the linked program to
use the library's SONAME entry, that is the only name that is *really*
needed. The plain .so symlink is only needed when linking new programs.
zlynx at acm.org
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
More information about the LUG