RPM Community Forums

Mailing List Message of <rpm-devel>

Re: A syntax (?) question

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 09 Jun 2011 - 18:46:25 CEST
Message-id: <E35E6C1C-765A-4D3E-8FE9-3B0D09C02EC9@mac.com>

On Jun 9, 2011, at 12:28 PM, Sriram Narayanan wrote:

> Another C n00b question:
> I faced this:
> libtool: link: gcc -shared  -fPIC -DPIC -Wl,-z -Wl,text -Wl,-h
> -Wl,librpmmisc-5.3.so -o .libs/librpmmisc-5.3.so  .libs/librpmmisc.o
> -R/workspace/rpm/rpm_5_3_11/beecrypt/.libs -R/usr/sfw/lib
> -R/workspace/rpm/rpm_5_3_11/neon/src/.libs
> -R/workspace/rpm/rpm_5_3_11/pcre/.libs
> -R/workspace/rpm/rpm_5_3_11/popt/.libs -R/workspace/altopt/lib
> -R/usr/sfw/lib -L/workspace/rpm/rpm_5_3_11/pcre/.libs -L../beecrypt
> -L../neon/src -L../neon -L../pcre -L../popt -L/workspace/altopt/lib
> -L/usr/gnu/lib -L/lib
> /workspace/rpm/rpm_5_3_11/beecrypt/.libs/libbeecrypt.so
> -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/../../.. -L/usr/sfw/lib
> /usr/sfw/lib/libstdc++.so
> /workspace/rpm/rpm_5_3_11/neon/src/.libs/libneon.so
> /workspace/rpm/rpm_5_3_11/pcre/.libs/libpcreposix.so
> /workspace/rpm/rpm_5_3_11/pcre/.libs/libpcre.so
> /workspace/rpm/rpm_5_3_11/popt/.libs/libpopt.so -lpython2.4
> -lpython2.6 -lexpat -lcrypto -lbz2 -lz -lpthread -lsocket -lnsl -lelf
> -lgcrypt -lgpg-error -lc  -O2 -Wl,--version-script=./librpmmisc.vers
> ld: fatal: unrecognized option '--'

Ah this is loader maps in use so that RPM doesn't accidentally
re-export an entire library (like Berkeley DB or BeeCrypt or neon or ...)
that creates some accidental symbol collisions.

Again the easiest "fix" is just to disable loader maps (I'm forced in
"development" to carry "maximum features" to ensure no bit rot ...)

That can be done with a configure option ... lemme find (untested) ...

	$ ./configure --help
	                          enable/disable use of GNU ld(1) version script
	                          (default is system dependent)

So --disable-build-versionscript SHOULD (again untested by me) the loader
map whose syntax is apparently causing problems with the Solaris linker.

> I then edited misc/Makefile
> replacing -> am__append_1 = -Wl,--version-script=$(srcdir)/librpmmisc.vers
> with -> am__append_1 = -Wl --version-script=$(srcdir)/librpmmisc.vers
> I replaced the comma with a space.

Likely its not just s/,/ /. You would need to look at the ld(1)
man page to find out how to pass a symbol map, and there's likely
going to be other deep dark chocolate issues almost instantly.

RPM won't behave any differently with/without loader maps. The
issue is solely to avoid accidental symbol pollution Just In Case.

The hard implementation is/was using loader maps, other issues such as changing
symbol names if/when there is an issue can be addressed as found.

No issues been reported for years ...

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Thu Jun 9 18:46:34 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.