RPM Community Forums

Mailing List Message of <rpm-devel>

Re: A syntax (?) question

From: Sriram Narayanan <sriram@belenix.org>
Date: Thu 09 Jun 2011 - 20:04:56 CEST
Message-ID: <BANLkTimFLxPR3Hj+t=0tvnKuGdqkHhmCig@mail.gmail.com>
Thanks, Jeff.

That "fixed" it for me.

To clarify: Given my unfamiliarity with C notions (language, tooling,
etc), I'll be presenting my work and findings to Moinak Ghosh, who is
the principal architect and creator of Belenix, for technical
verification. So, all my steps will undergo review. We'll also present
our modifications if any to rpm-devel@rpm4.org first.

-- Ram

On Thu, Jun 9, 2011 at 10:16 PM, Jeff Johnson <n3npq@mac.com> wrote:
>
> 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-build-versionscript
>                                  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



-- 
Belenix: www.belenix.org
Received on Thu Jun 9 20:05:18 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.