Hi all

When I try to compile  3.5.0rc1 on CentOS 5.4, I get the seemingly well know 
problem below

Linking bin/smbclient
/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 `tgetent'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
undefined reference to `tgetstr'
/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 `UP'
/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 `tputs'
/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'
collect2: ld returned 1 exit status
make: *** [bin/smbclient] Error 1

I googled and read quite a bit, all links seem to suggest that either a missing
readline-devel and/or ncurses-devel might be the cuplrit. Now, I think I got
everything installed:

# rpm -qa --queryformat '%{name}\t%{version}\t%{arch}\n' | egrep 
'(readline|curses|termcap)' | sort
libtermcap      2.0.8   i386
libtermcap      2.0.8   x86_64
libtermcap-devel        2.0.8   i386
libtermcap-devel        2.0.8   x86_64
ncurses 5.5     i386
ncurses 5.5     x86_64
ncurses-devel   5.5     i386
ncurses-devel   5.5     x86_64
readline        5.1     i386
readline        5.1     x86_64
readline-devel  5.1     i386
readline-devel  5.1     x86_64
termcap 5.5     noarch

A little testprogram fails with the same error, if I do

# gcc -o tt tt.c  -lreadline
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
undefined reference to `PC'
...

But succeeds if I either add -lcurses/-ltermcap or the linker flags that Samba 
uses 

gcc -o tt tt.c  -Wl,-z,relro -Wl,--as-needed  -Wl,--export-dynamic -lreadline

I checked the Makefile and config.log, it correctly determined the linker
flags to be

TERMLIBS=-lreadline -ltermcap

but still, I can't get rid of the above error. I'm a bit lost, any hints?

-- 
        CU, Joe
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to