WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: connman 1.12 readline error  (Read 14395 times)

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
connman 1.12 readline error
« 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

dCore user

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14754
Re: connman 1.12 readline error
« Reply #1 on: April 21, 2013, 07:18:15 AM »
Does:
Code: [Select]
$ ldd /usr/local/lib/libreadline.so..show that the required deps are present?

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #2 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'
dCore user

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: connman 1.12 readline error
« Reply #3 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.
« Last Edit: April 21, 2013, 05:30:06 PM by Rich »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #4 on: April 21, 2013, 04:18:40 PM »
where should I modify the gcc command?
dCore user

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: connman 1.12 readline error
« Reply #5 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.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #6 on: April 22, 2013, 03:50:24 AM »
I don't know in which file and where in the file ad that parameter
dCore user

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: connman 1.12 readline error
« Reply #7 on: April 22, 2013, 04:42:53 AM »
Is ncurses-dev.tcz installed?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #8 on: April 22, 2013, 04:49:08 AM »
dCore user

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: connman 1.12 readline error
« Reply #9 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
« Last Edit: April 23, 2013, 12:02:01 PM by Rich »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #10 on: April 23, 2013, 11:29:37 AM »
Still the same error, readline-dev.tcz is insalled
dCore user

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
Re: connman 1.12 readline error
« Reply #11 on: April 23, 2013, 12:02:14 PM »
Hi jls_legalize
Sorry, there was an error in my previous post. Corrected.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #12 on: April 23, 2013, 04:38:39 PM »
stil the same error  >:(
dCore user

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: connman 1.12 readline error
« Reply #13 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.
« Last Edit: April 23, 2013, 05:19:44 PM by AmatCoder »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: connman 1.12 readline error
« Reply #14 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
dCore user