Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: jls on April 21, 2013, 06:51:01 AM

Title: connman 1.12 readline error
Post by: jls on April 21, 2013, 06:51:01 AM
Hi
I'm trying to compile connman 1.12 but I get this error:
Code: [Select]
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

Title: Re: connman 1.12 readline error
Post by: Juanito on April 21, 2013, 07:18:15 AM
Does:
Code: [Select]
$ ldd /usr/local/lib/libreadline.so..show that the required deps are present?
Title: Re: connman 1.12 readline error
Post by: jls on April 21, 2013, 08:55:47 AM
Code: [Select]
$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)
Code: [Select]
$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'
Title: Re: connman 1.12 readline error
Post by: Rich on April 21, 2013, 09:49:54 AM
Hi jls_legalize
Those undefined references refer to ncurses. You are probably missing:
Code: [Select]
-lncursesin your  gcc  command.
Title: Re: connman 1.12 readline error
Post by: jls on April 21, 2013, 04:18:40 PM
where should I modify the gcc command?
Title: Re: connman 1.12 readline error
Post by: Rich on April 21, 2013, 05:35:44 PM
Hi jls_legalize
Find where you link to  libreadline. The parameter should look like:
Code: [Select]
-lreadlineand add it after that.
Title: Re: connman 1.12 readline error
Post by: jls on April 22, 2013, 03:50:24 AM
I don't know in which file and where in the file ad that parameter
Title: Re: connman 1.12 readline error
Post by: bmarkus on April 22, 2013, 04:42:53 AM
Is ncurses-dev.tcz installed?
Title: Re: connman 1.12 readline error
Post by: jls on April 22, 2013, 04:49:08 AM
Is ncurses-dev.tcz installed?
yes
Title: Re: connman 1.12 readline error
Post by: Rich on April 22, 2013, 11:47:03 AM
Hi jls_legalize
Try changing:
Code: [Select]
client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -ldlto:
Code: [Select]
client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -lncurses -ldlin  Makefile.am
Do you have  readline-dev.tcz  installed?

    [EDIT]: Corrected typo in second code box, replaced  -lreadline  with  -lncurses.  Rich
Title: Re: connman 1.12 readline error
Post by: jls on April 23, 2013, 11:29:37 AM
Still the same error, readline-dev.tcz is insalled
Title: Re: connman 1.12 readline error
Post by: Rich on April 23, 2013, 12:02:14 PM
Hi jls_legalize
Sorry, there was an error in my previous post. Corrected.
Title: Re: connman 1.12 readline error
Post by: jls on April 23, 2013, 04:38:39 PM
stil the same error  >:(
Title: Re: connman 1.12 readline error
Post by: AmatCoder on April 23, 2013, 05:14:10 PM
You must change line 1215 of Makefile.in as follows:
Code: [Select]
@CLIENT_TRUE@client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -lncurses -ldl
Then run configure  & make.
Title: Re: connman 1.12 readline error
Post by: jls on April 24, 2013, 12:12:39 PM
now it works, tahnx AmatCoder.
I now get another error regarding iptables, but I don't have time to paste the error
Title: Re: connman 1.18 readline error
Post by: jls on September 05, 2013, 12:39:09 PM
Hi guys
Getting the same error even with adding -lncurses on connman 1.18
Title: Re: connman 1.12 readline error
Post by: jls on October 06, 2013, 06:10:08 AM
It works. Before I made an error, I patched makefile.am instead of Makefile.in