Summary: | ASTERISK-09107: menuselect compilation failure on Solaris 10/gcc-4.1.1 | ||
Reporter: | Bob Atkins (bob) | Labels: | |
Date Opened: | 2007-03-26 12:43:29 | Date Closed: | 2007-07-11 19:59:22 |
Priority: | Blocker | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Unable to compile menuselect on Solaris due to compilation errors: make[1]: Entering directory `/home/bob/src/asterisk/asterisk-1.4.2/menuselect' checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for a BSD-compatible install... /staff/bob/bin/ginstall -c checking for ranlib... ranlib checking for ar... /usr/ccs/bin/ar checking for cp... /usr/bin/cp checking for ln... /usr/bin/ln checking for mkdir... /usr/bin/mkdir checking for nroff... /usr/bin/nroff checking for rm... /usr/bin/rm checking for strdup... yes checking for vsnprintf... yes configure: creating ./config.status config.status: creating Makefile config.status: creating mxml.list config.status: creating mxml.pc config.status: creating config.h make[2]: Entering directory `/home/bob/src/asterisk/asterisk-1.4.2/menuselect' make[3]: Entering directory `/home/bob/src/asterisk/asterisk-1.4.2/menuselect/mxml' gcc -O -Wall -c mxml-attr.c gcc -O -Wall -c mxml-entity.c gcc -O -Wall -c mxml-file.c gcc -O -Wall -c mxml-index.c gcc -O -Wall -c mxml-node.c gcc -O -Wall -c mxml-search.c gcc -O -Wall -c mxml-set.c gcc -O -Wall -c mxml-private.c gcc -O -Wall -c mxml-string.c /usr/bin/rm -f libmxml.a /usr/ccs/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o a - mxml-attr.o a - mxml-entity.o a - mxml-file.o a - mxml-index.o a - mxml-node.o a - mxml-search.o a - mxml-set.o a - mxml-private.o a - mxml-string.o ar: writing libmxml.a ranlib libmxml.a make[3]: Leaving directory `/home/bob/src/asterisk/asterisk-1.4.2/menuselect/mxml' gcc -Wall -o menuselect.o -g -c -D_GNU_SOURCE menuselect.c menuselect.c: In function 'process_deps': menuselect.c:472: warning: implicit declaration of function 'strsep' menuselect.c: In function 'process_prev_failed_deps': menuselect.c:747: warning: assignment makes pointer from integer without a cast menuselect.c:748: warning: assignment makes pointer from integer without a cast menuselect.c: In function 'parse_existing_config': menuselect.c:809: warning: assignment makes pointer from integer without a cast menuselect.c:822: warning: assignment makes pointer from integer without a cast menuselect.c: In function 'generate_makeopts_file': menuselect.c:935: warning: assignment makes pointer from integer without a cast menuselect.c:937: warning: assignment makes pointer from integer without a cast menuselect.c:945: warning: assignment makes pointer from integer without a cast menuselect.c:947: warning: assignment makes pointer from integer without a cast gcc -Wall -o menuselect_curses.o -g -c -D_GNU_SOURCE menuselect_curses.c menuselect_curses.c: In function 'show_help': menuselect_curses.c:103: warning: passing argument 2 of 'waddstr' discards qualifiers from pointer target type menuselect_curses.c: In function 'display_mem_info': menuselect_curses.c:188: warning: passing argument 2 of 'waddstr' discards qualifiers from pointer target type menuselect_curses.c: In function 'draw_title_window': menuselect_curses.c:383: warning: passing argument 2 of 'waddstr' discards qualifiers from pointer target type gcc -Wall -o strcompat.o -g -c -D_GNU_SOURCE strcompat.c strcompat.c: In function 'strcasestr': strcompat.c:106: warning: implicit declaration of function 'alloca' strcompat.c:106: warning: incompatible implicit declaration of built-in function 'alloca' strcompat.c: At top level: strcompat.c:155: error: expected declaration specifiers or '...' before 'va_list' strcompat.c: In function 'vasprintf': strcompat.c:158: error: 'va_list' undeclared (first use in this function) strcompat.c:158: error: (Each undeclared identifier is reported only once strcompat.c:158: error: for each function it appears in.) strcompat.c:158: error: expected ';' before 'ap2' strcompat.c:162: warning: implicit declaration of function 'va_copy' strcompat.c:162: error: 'ap2' undeclared (first use in this function) strcompat.c:162: error: 'ap' undeclared (first use in this function) strcompat.c:164: warning: implicit declaration of function 'va_end' strcompat.c: In function 'asprintf': strcompat.c:196: error: 'va_list' undeclared (first use in this function) strcompat.c:196: error: expected ';' before 'ap' strcompat.c:200: warning: implicit declaration of function 'va_start' strcompat.c:200: error: 'ap' undeclared (first use in this function) strcompat.c:201: error: too many arguments to function 'vasprintf' strcompat.c: In function 'strtoq': strcompat.c:277: warning: integer constant is too large for 'long' type strcompat.c:277: warning: integer constant is too large for 'long' type strcompat.c:277: warning: integer constant is too large for 'long' type strcompat.c:277: warning: integer constant is too large for 'long' type strcompat.c:300: warning: integer constant is too large for 'long' type strcompat.c:300: warning: integer constant is too large for 'long' type make[2]: *** [strcompat.o] Error 1 make[2]: Leaving directory `/home/bob/src/asterisk/asterisk-1.4.2/menuselect' ****** ADDITIONAL INFORMATION ****** There seems to be some conditional compilation checks in strcompat.c that may not be compatible with Solaris builds. | ||
Comments: | By: Jason Parker (jparker) 2007-03-26 13:16:06 Can you check if it helps if you add the following to strcompat.c (in both menuselect/ and main/) #include <stdarg.h> By: Bob Atkins (bob) 2007-03-26 13:44:09 That helped that got strcompat.c to compile - thank you! However, I just ran into the next problem for building menuselect - the complete lack of flow down of either CFLAGS or LDFLAGS. This is pretty basic stuff and I am more than a little surprised that this didn't get vetted by the review process which - at least when it comes to anything that I have submitted has been pretty careful before incorporating changes into the trunk. menuselect fails at the link because it can't find anything because LDFLAGS wasn't flowed down to the menuselect configure. gcc -g -Wall -o menuselect menuselect.o menuselect_curses.o strcompat.o mxml/libmxml.a -lncurses Undefined first referenced symbol in file initscr32 menuselect_curses.o w32addch menuselect_curses.o getmaxx menuselect_curses.o getmaxy menuselect_curses.o ld: fatal: Symbol referencing errors. No output written to menuselect collect2: ld returned 1 exit status From the looks of things menuselect is configured completely santitized of any CFLAGS and LDFLAGS setting that were passed into the main asterisk configure script and in fact the line in the Makefile that calls the menuselect configure specifically seems to null out these flags although not the correct variables. It is absolutely essential that CFLAGS and LDFLAGS variables that are passed into the main configure script be flowed down otherwise we are all gogin to be chasing build problems for a long time. menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts @CC="$(HOST_CC)" LD="" AR="" RANLIB="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent" I am looking into how to fix this. By: Russell Bryant (russell) 2007-06-07 14:28:07 I added the include of stdarg.h to strcompat.c. Menuselect builds on our Solaris 10 machines here with gcc4 so I'm going to assume this is ok now. Feel free to reopen this if it's not ... By: Friendly Automation (friendly-automation) 2018-08-03 12:01:48.144-0500 Change 9772 merged by Jenkins2: BuildSystem: Enable ncurses for menuselect in Solaris 11. [https://gerrit.asterisk.org/9772|https://gerrit.asterisk.org/9772] By: Friendly Automation (friendly-automation) 2018-08-03 13:30:02.853-0500 Change 9771 merged by Kevin Harwell: BuildSystem: Enable ncurses for menuselect in Solaris 11. [https://gerrit.asterisk.org/9771|https://gerrit.asterisk.org/9771] By: Friendly Automation (friendly-automation) 2018-08-03 13:30:26.020-0500 Change 9773 merged by Kevin Harwell: BuildSystem: Enable ncurses for menuselect in Solaris 11. [https://gerrit.asterisk.org/9773|https://gerrit.asterisk.org/9773] By: Friendly Automation (friendly-automation) 2018-08-03 13:30:39.725-0500 Change 9770 merged by Kevin Harwell: BuildSystem: Enable ncurses for menuselect in Solaris 11. [https://gerrit.asterisk.org/9770|https://gerrit.asterisk.org/9770] |