[parted-devel] --as-needed linker option causes trouble with -lreadline/-ltermcap

Ralf Wildenhues Ralf.Wildenhues at gmx.de
Sun Mar 29 06:16:28 UTC 2009


* Otavio Salvador wrote on Sat, Mar 28, 2009 at 05:06:17PM CET:
> Jim Meyering <jim at meyering.net> writes:
> >     gcc k.c -Wl,--as-needed -lreadline -ltermcap
> >
> > and that fails on RHEL 5.3
> > (with binutils-2.17.50.0.6-9.el5.x86_64 and gcc-4.1.2-44.el5.x86_64):
> >
> >     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `PC'
[...]
> 
> Do you belive it is a bug in binutils?

No, I don't, FWIW.

> I tested it in Debian and it works fine here.

That's because Debian's libreadline has a DT_NEEDED entry for
libncurses.so.5.

Cheers,
Ralf



More information about the parted-devel mailing list