Summary: | ASTERISK-07786: "make menuselect" fails on OS X | ||
Reporter: | Steven Sokol (ssokol) | Labels: | |
Date Opened: | 2006-09-21 14:10:36 | Date Closed: | 2011-06-07 14:02:45 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | When I attempt to execute make menuselect, the system fails with an error regarding "strtoq" as shown below. ****** ADDITIONAL INFORMATION ****** Steven-Sokols-MacBook-Pro:/usr/src/trunk-091106/asterisk root# make menuselect make[1]: Entering directory `/usr/src/trunk-091106/asterisk/menuselect' make[2]: Entering directory `/usr/src/trunk-091106/asterisk/menuselect' gcc -Wall -o menuselect.o -g -c -D_GNU_SOURCE menuselect.c gcc -Wall -o menuselect_curses.o -g -c -D_GNU_SOURCE menuselect_curses.c gcc -Wall -o strcompat.o -g -c -D_GNU_SOURCE strcompat.c strcompat.c: In function 'vasprintf': strcompat.c:162: warning: implicit declaration of function 'va_copy' strcompat.c:164: warning: implicit declaration of function 'va_end' strcompat.c: In function 'asprintf': strcompat.c:200: warning: implicit declaration of function 'va_start' strcompat.c: At top level: strcompat.c:225: error: conflicting types for 'strtoq' /usr/include/stdlib.h:302: error: previous declaration of 'strtoq' was here 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 `/usr/src/trunk-091106/asterisk/menuselect' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/trunk-091106/asterisk/menuselect' make: *** [menuselect/menuselect] Error 2 | ||
Comments: | By: Steven Sokol (ssokol) 2006-09-21 15:38:43 More info: I was able to overcome this issue (which seems to have been introduced with the addition of a patch file for Solaris?) by simply changing the return type for strtoq. I altered the return to be "long long" (which matches with the definition in the /usr/lib/stdlib.h file on my Mac). That fixed the compile error but then I hit a link error: Steven-Sokols-MacBook-Pro:/usr/src/trunk-091106/asterisk root# make make[1]: Entering directory `/usr/src/trunk-091106/asterisk/menuselect' make[2]: Entering directory `/usr/src/trunk-091106/asterisk/menuselect' gcc -g -Wall -o menuselect menuselect.o menuselect_curses.o strcompat.o mxml/libmxml.a -lncurses /usr/bin/ld: warning multiple definitions of symbol _asprintf strcompat.o definition of _asprintf in section (__TEXT,__text) /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib(asprintf.So) definition of _asprintf /usr/bin/ld: Undefined symbols: _va_copy _va_end _va_start collect2: ld returned 1 exit status make[2]: *** [menuselect] Error 1 make[2]: Leaving directory `/usr/src/trunk-091106/asterisk/menuselect' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/trunk-091106/asterisk/menuselect' make: *** [menuselect/menuselect] Error 2 Steven-Sokols-MacBook-Pro:/usr/src/trunk-091106/asterisk root# Thoughts? By: Joshua C. Colp (jcolp) 2006-09-21 15:44:09 Revert your change, type make distclean, ./configure, make menuselect, and be amazed (hopefully). By: Russell Bryant (russell) 2006-09-22 12:52:17 I am pretty much certain that "make distclean" will fix this issue, so I'm going to close it for now. If for some reason you still have problems, feel free to reopen the issue. |