On 01/23/12 11:53, Stefan Teleman wrote:
Brian Cameron wrote:
I am looking for a code review for:
7098984 gpg2 has fatal relocation error on libreadline.so.5
Basically, if you try and run "gpg2 --gen-key" it fails with this error:
/usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not found
This is actually a bug in the readline module. The attached
straightforward patch fixes this problem. This bug makes it a pain to
generate a GPG key on Solaris since most users would likely not figure
out the workaround of running with LD_PRELOAD_32 or LD_PRELOAD_64 set.
This is my first attempt at fixing something in Userland or with
Mercurial, so please let me know what the next steps should be. I am
assuming I should just go ahead and fill out a WebRTI once this email
request gets approval. Is that correct?
The libreadline fix as proposed here is suspicious.
The tgetent symbol is defined in several different libraries present in Solaris:
libtermcap
libcurses
libncurses
By forcing libreadline to link with libtermcap, you are preventing other
applications or libraries which may want to use libreadline to link with either
libcurses or libncurses, because of the conflict created by libtermcap.
--Stefan
There are a number of things going on here.
First off, the fact that there are multiple termcap libraries
and that we try to accommodate them all by building libreadline
without its dependencies is a bit of a mess. A far better
(but not quickly done) fix would be to merge/EOL these libraries
so that only one library provides the needed termcap functionality.
In the short term however, it is gpg2 that needs to link with
libtermcap, not libreadline. Otherwise, you get the problem that
Stefan discusses above.
From memory, I recall that there's another underlying issue, in that
Userland applies the ld option '-z unused' to all objects in the gate.
Sadly, Userland is stuck with s11fcs as it's CBE, and the -z ignore
in that platform will cause ld to discard -ltermcap applied to gpg2:
7051963 ld's -z ignore processing is too simplistic.
So you'll also need to find out how to override the use of '-z ignore'
for gpg2. Otherwise, you'll find that linking gpg2 with -ltermcap seems
to make no difference.
A bit of a mess really ---- I look forward to the day when the CBE
moves up.
- Ali
_______________________________________________
userland-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/userland-discuss