[asterisk-bugs] [JIRA] (ASTERISK-20687) make menuselect fails on asterisk 1.8 due to unreferenced linker lib -ltinfo

Corey Farrell (JIRA) noreply at issues.asterisk.org
Tue Dec 19 07:51:07 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-20687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell updated ASTERISK-20687:
-------------------------------------

    Assignee: Richard Hamnett
      Status: Waiting for Feedback  (was: Open)

Is this still an issue with current Amazon cloud service?  I believe the Amazon build of ncurses is/was broken.  See the following output from both Fedora 26 and CentOS 7:
{noformat}
$ ldd /usr/lib64/libncurses.so.*.*
	linux-vdso.so.1 (0x00007ffca2f3a000)
	libc.so.6 => /lib64/libc.so.6 (0x00007ff6e1804000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6e1600000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007ff6e13d4000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff6e1e01000)
{noformat}

In addition if I create a C program source mytest.c with a minimal main() function and run the following:
{noformat}
$ gcc mytest.c -o mytest -lncurses
$ ldd mytest
	linux-vdso.so.1 (0x00007ffc267b7000)
	libncurses.so.6 => /lib64/libncurses.so.6 (0x00007fe3c6d1c000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fe3c6af0000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fe3c671b000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fe3c6517000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe3c6f44000)
{noformat}

As you can see linking with {{-lncurses}} caused my linker to implicitly include {{-ltinfo}} because ncurses requires it.  I believe the fact that Amazon did not do this was a bug in Amazon Linux, not Asterisk.

> make menuselect fails on asterisk 1.8 due to unreferenced linker lib -ltinfo
> ----------------------------------------------------------------------------
>
>                 Key: ASTERISK-20687
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20687
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/BuildSystem
>    Affects Versions: 1.8.18.0, 13.18.4
>            Reporter: Richard Hamnett
>            Assignee: Richard Hamnett
>            Severity: Minor
>         Attachments: config.log
>
>
> {noformat}
> # make menuselect
> CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
> make[1]: Entering directory `/root/asterisk-1.8.18.0/menuselect'
> make[1]: `makeopts' is up to date.
> make[1]: Leaving directory `/root/asterisk-1.8.18.0/menuselect'
> CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" cmenuselect
> make[1]: Entering directory `/root/asterisk-1.8.18.0/menuselect'
> gcc  -o cmenuselect menuselect.o strcompat.o menuselect_curses.o mxml/libmxml.a -lncurses 
> /usr/bin/ld: menuselect_curses.o: undefined reference to symbol 'keypad'
> /usr/bin/ld: note: 'keypad' is defined in DSO /lib64/libtinfo.so.5 so try adding it to the linker command line
> /lib64/libtinfo.so.5: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
> make[1]: *** [cmenuselect] Error 1
> make[1]: Leaving directory `/root/asterisk-1.8.18.0/menuselect'
> make: *** [menuselect/cmenuselect] Error 2
> {noformat}
> To fix, I edited menuselect/Makefile and changed the line from
>   C_LIBS +=$(NCURSES_LIB)
> to 
>   C_LIBS +=$(NCURSES_LIB) -ltinfo
> I am on Amazon Linux AMI release 2012.09
> Seems that the configure does not correctly include the -ltinfo into the NCURSES_LIB variable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list