Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: jls on April 21, 2013, 06:51:01 AM
-
Hi
I'm trying to compile connman 1.12 but I get this error:
CCLD client/connmanctl
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[1]: *** [client/connmanctl] Error 1
make: *** [all] Error 2
-
Does:
$ ldd /usr/local/lib/libreadline.so
..show that the required deps are present?
-
$ldd /usr/local/lib/libreadline.so
linux-gate.so.1 => (0xb7752000)
libc.so.6 => /lib/libc.so.6 (0xb7612000)
/lib/ld-linux.so.2 (0xb7753000)
$ld /usr/local/lib/libreadline.so
ld: warning: cannot find entry symbol _start; not setting start address
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
-
Hi jls_legalize
Those undefined references refer to ncurses. You are probably missing:
-lncurses
in your gcc command.
-
where should I modify the gcc command?
-
Hi jls_legalize
Find where you link to libreadline. The parameter should look like:
-lreadline
and add it after that.
-
I don't know in which file and where in the file ad that parameter
-
Is ncurses-dev.tcz installed?
-
Is ncurses-dev.tcz installed?
yes
-
Hi jls_legalize
Try changing:
client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -ldl
to:
client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -lncurses -ldl
in Makefile.am
Do you have readline-dev.tcz installed?
[EDIT]: Corrected typo in second code box, replaced -lreadline with -lncurses. Rich
-
Still the same error, readline-dev.tcz is insalled
-
Hi jls_legalize
Sorry, there was an error in my previous post. Corrected.
-
stil the same error >:(
-
You must change line 1215 of Makefile.in as follows:
@CLIENT_TRUE@client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -lncurses -ldl
Then run configure & make.
-
now it works, tahnx AmatCoder.
I now get another error regarding iptables, but I don't have time to paste the error
-
Hi guys
Getting the same error even with adding -lncurses on connman 1.18
-
It works. Before I made an error, I patched makefile.am instead of Makefile.in