bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [parted-devel] --as-needed linker option causes trouble with -lreadl


From: Otavio Salvador
Subject: Re: [parted-devel] --as-needed linker option causes trouble with -lreadline/-ltermcap
Date: Sat, 28 Mar 2009 13:06:17 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Jim Meyering <address@hidden> writes:

> When testing for the readline library, this works fine:
>
>     echo 'char readline (); int main () { return readline (); }' > k.c
>     gcc k.c -lreadline -ltermcap
>
> but in order to work around portability problems years ago, gnulib's
> lib-ignore.m4 makes it so the linker uses the --as-needed option:
>
>     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'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tgetflag'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tgetent'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `UP'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tputs'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tgoto'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tgetnum'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `BC'
>     /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
> undefined reference to `tgetstr'
>     collect2: ld returned 1 exit status
>     [Exit 1]
>
> And that makes parted's configure script fail to detect readline,
> which in turn resulted in some test failures.
>
> I'll look into it more, eventually.

Do you belive it is a bug in binutils? I tested it in Debian and it
works fine here.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: address@hidden      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]