[Home]

Summary:ASTERISK-10945: asterisk 1.4.14, both autoconf and configure on Ubuntu are broken
Reporter:Eric Dynamic (ecsd)Labels:
Date Opened:2007-12-01 20:32:43.000-0600Date Closed:2011-06-07 14:03:17
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This is the latest fully-upgraded "Gutsy" version of Ubuntu, whose uname -a -p -i output is

Linux subterranean 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux

(1) Unpack asterisk-1.4.14 and run "./configure" with no arguments, fails:
root@subterranean:/usr/local/asterisk/asterisk-1.4.14# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
...
checking for ZT_TCOP_ALLOCATE in zaptel/zaptel.h... yes
configure: error: *** termcap support not found

(2) Run "autoconf" with no arguments, produces an invalid "configure" file:
root@subterranean:/usr/local/asterisk/asterisk-1.4.14# autoconf
root@subterranean:/usr/local/asterisk/asterisk-1.4.14# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
...
checking for wget... /usr/bin/wget
./configure: line 6695: ACX_PTHREAD: command not found
./configure: line 6720: syntax error near unexpected token `ALSA,'
./configure: line 6720: `AST_EXT_LIB_SETUP(ALSA, Advanced Linux Sound Architecture, asound)'

(3) The only way I can get "configure" to complete, to produce Makefiles which will also not fail, is by bodily hacking the tests for TINFO, TERMCAP, CURSES and NCURSES out of the configure script (can't operate at the autoconf level due to the error above - that I don't know how to get past.) Then hack main/Makefile to make the label "EDITLINE_LIB" equal the string '/lib/libncurses.so.5.6', instead of ending up containing "-L /lib -lncurses". After insuring that the string "-lncurses" will NOT appear in the final gcc load for asterisk (in the end of main/Makefile), only then will the Make succeed.

It seems the configure-generated Makefile CANNOT FIND ncurses EVEN WHEN told where to get it from - ldconfig reports the libraries are to be found:

root@subterranean:/usr/local/asterisk/asterisk-1.4.14# ldconfig -p | grep urse
       libncursesw.so.5 (libc6) => /lib/libncursesw.so.5
       libncurses.so.5 (libc6) => /lib/libncurses.so.5

root@subterranean:/usr/local/asterisk/asterisk-1.4.14# ls -l /lib/libnc*
lrwxrwxrwx 1 root root     17 2007-11-05 01:08 /lib/libncurses.so.5 -> libncurses.so.5.6
-rw-r--r-- 1 root root 273124 2007-10-08 03:07 /lib/libncurses.so.5.6
lrwxrwxrwx 1 root root     18 2007-11-05 01:07 /lib/libncursesw.so.5 -> libncursesw.so.5.6
-rw-r--r-- 1 root root 318692 2007-10-08 03:07 /lib/libncursesw.so.5.6

I am hoping this is not a matter of not knowing the correct arguments/flags to pass to autoconf or configure, although I have not seen a description of flags to be given to compile specifically on Ubuntu. Assuming that the intended invocation of both "configure" and "autoconf" as used by Asterisk is without arguments, then something about the 1.4.14 system versus Ubuntu is BROKEN.
(if "ld" can't find the ncurses lib based on "-L /lib -lncurses" on the gcc line, then either the "-L" string is out of place, or there is a problem with Ubuntu finding libraries, which seems unlikely.)

I have seen other posts (General forum) refer to GTK2 - ncurses5 and gtk2 are both installed on my system but the vanilla configure script simply doesn't ask or allow for gtk2 nor can it find ncurses, even though the ncurses library is plainly available. (The script "fails to find" ncurses because it looks for a function "initscr()" to be provided by the library it thinks it can use - possibly "initscr()" is not provided by the latest ncurses5, but that seems unlikely. If so, then the configure.ac has to allow for testing for a different routine to say the library is or is not there.)

****** ADDITIONAL INFORMATION ******

This is my first trouble report. I hope no vital information is missing. If there is a general FAQ indicating different "configure" options to be used for different systems, I have not found it.
Comments:By: Eric Dynamic (ecsd) 2007-12-01 20:43:29.000-0600

"nm" can't be used to verify whether a label "initscr" is found in the curses libraries because the libraries have no symbols ... and there is no <epithet> documentation on Ubuntu for what the contents of the ncurses5 API are, to see if a function "initscr()" is even provided or if it has been obsoleted. <epithet>!!

Further testing would be to emulate the autoconf-generated tests to try by hand to find initscr().

By: Tilghman Lesher (tilghman) 2007-12-02 03:14:14.000-0600

To get around the first issue, please "apt-get install libncurses-dev".  As far as the second issue, I can't replicate your problem on Feisty.

By: Eric Dynamic (ecsd) 2007-12-02 21:54:00.000-0600

I used the GUI "adept" to add "libncurses-dev" and that solved the problem of configure crapping out - thank you.

I don't know what you're referring to as the second problem, but assuming that is that autoconf fails, even after adding the libncurses-dev, autoconf still fails (by producing a configure that fails):

root@subterranean:/usr/local/asterisk/asterisk-1.4.14# cp configure{,.0}
root@subterranean:/usr/local/asterisk/asterisk-1.4.14# autoconf
(note no errors)
root@subterranean:/usr/local/asterisk/asterisk-1.4.14# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
...
checking how to run the C++ preprocessor... g++ -E
./configure: line 5794: AST_PROG_LD: command not found
checking for gawk... gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
./configure: line 6024: AST_CHECK_GNU_MAKE: command not found
checking for strip... /usr/bin/strip
...
checking for wget... /usr/bin/wget
./configure: line 6695: ACX_PTHREAD: command not found
./configure: line 6720: syntax error near unexpected token `ALSA,'
./configure: line 6720: `AST_EXT_LIB_SETUP(ALSA, Advanced Linux Sound Architecture, asound)'
root@subterranean:/usr/local/asterisk/asterisk-1.4.14#                                              

It seems a similar apt-get is needed to supply some low-level threading definitions (macros) for autoconf ... not being an autoconf user I can't say.

To be a good doobie I should report the requirement for libncurses-dev to an FAQ on Asterisk's or Ubuntu's site or both.

==

I must say I am irritated at the arbitrary division by Ubuntu into "normal" and "dev" components, such that the "normal" branch will sometimes fail to support ordinary linking and loading as in this example - "initscr()" wouldn't be missing from ncurses5 to be supplied by "ncurses5-dev" - so they've taken it upon themselves to break things in a way I have not seen rationalized. But that's not a problem for Asterisk per se.



By: Tilghman Lesher (tilghman) 2007-12-03 00:58:57.000-0600

I'm closing this out as a user configuration error.