Summary: | ASTERISK-13617: [patch] signals.h - syntax error before '*' token | ||
Reporter: | Bruce McAlister (asgaroth) | Labels: | |
Date Opened: | 2009-02-20 08:38:47.000-0600 | Date Closed: | 2009-11-06 11:37:28.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/BuildSystem |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) astrisk_solaris.patch ( 1) astrisk_solaris.patch2 ( 2) bug_14517_v2.patch ( 3) bug_14517.diff ( 4) bug_14517.patch ( 5) configure.txt ( 6) make.txt ( 7) new_make.txt | |
Description: | Whenever attempting building asterisk 1.6.0.5 on Solaris I have a compilation failure that exits with the following error: [CC] version.c -> version.o In file included from sig.h:47, from el.h:107, from common.c:51, from editline.c:4: /usr/include/signal.h:77: error: syntax error before '*' token make[2]: *** [editline.o_a] Error 1 make[1]: *** [editline/libedit.a] Error 2 make: *** [main] Error 2 ****** STEPS TO REPRODUCE ****** [1] Setup build environment: export CC=gcc export CXX=g++ export LDFLAGS='-L/usr/sfw/lib -L/usr/gnu/lib -L/opt/dtbld/lib' export CFLAGS='-I/usr/sfw/include' [2] Run configure ./configure --with-odbc=/usr --with-curl=/usr/gnu --with-ltdl=/opt/dtbld [3] Run make make ****** ADDITIONAL INFORMATION ****** I will attach the output of the configure and make steps shortly. | ||
Comments: | By: Bruce McAlister (asgaroth) 2009-02-20 08:43:18.000-0600 On a side note, I'm not sure if it's a major issue, but there are warnings about FILE_OFFSET_BITS being redefined as well. Here is a snippet: [CC] eagi-sphinx-test.c -> eagi-sphinx-test.o In file included from /export/home/vzhsxn/temp/asterisk-1.6.0.5/include/asterisk.h:21, from eagi-sphinx-test.c:30: /export/home/vzhsxn/temp/asterisk-1.6.0.5/include/asterisk/autoconfig.h:1143:1: warning: "_FILE_OFFSET_BITS" redefined In file included from /usr/include/iso/stdarg_c99.h:34, from /usr/include/stdarg.h:33, from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/include/stdio.h:14, from eagi-sphinx-test.c:18: /usr/include/sys/feature_tests.h:188:1: warning: this is the location of the previous definition By: snuffy (snuffy) 2009-02-20 16:58:07.000-0600 asgaroth.. this is a known issue 'fileoffsetbits' easiest way to solve for now is after u've done configure just delete from autoconfig.h the file_offset_bits define. By: snuffy (snuffy) 2009-02-20 17:03:05.000-0600 As for the initial problem.. I would suggest that maybe it wants a another system include before signal.h By: Bruce McAlister (asgaroth) 2009-02-23 02:50:28.000-0600 snuffy, thanks for the tip on _FILE_OFFSET_BITS, that did the trick, the message does not come up anymore. By: Bruce McAlister (asgaroth) 2009-02-23 02:52:28.000-0600 on a side note, I just realized that the make output I uploaded was after I had already performed a make, but left out the make clean. I have uploaded the "new_make.txt" file which gives the error from a clean build with the file_offset_bits fix in place as well. PS: If it is indeed a system include that is missing, which include do you think it may be? By: snuffy (snuffy) 2009-02-23 05:39:56.000-0600 Another thing i've had to do.. on main/editline/sys.h line 106.. there is a line that reads 'extern int errno, sys_nerr;' i broke them into 2 seperate extern's and that fixed my other issue with editline. I haven't had your specific error with sig.h By: Bruce McAlister (asgaroth) 2009-02-23 06:05:18.000-0600 Thanks for that tip too snuffy, maybe the issue i am having is prior to the issue you mention above and thats why I am not seeing it yet. I'm not sure why this is coming up either as asterisk 1.4.23.1 build fine with the same environment. Has anything changed in the editline stuff between 1.4 and 1.6? By: Bruce McAlister (asgaroth) 2009-02-23 10:46:51.000-0600 just for interst sake, what version of solaris is being used for building asterisk on, or when testing/fixing bugs? snuffy, are you running with opensolaris or solaris? By: snuffy (snuffy) 2009-02-23 13:05:56.000-0600 i run both sol10 sparc and opensolaris 2008.05 x86 vm i do have sol10 x86 vm i fire up occasionally too By: Bruce McAlister (asgaroth) 2009-02-24 06:44:51.000-0600 I just tried this on v1.6.0.6 and the same error comes up. I'm on Solaris 10 Update 5 x86 (latest being update 6). Has anyone else seen this before? By: Sean Bright (seanbright) 2009-02-24 17:53:00.000-0600 Can you attach the output of: sed -n '67,87 p' /usr/include/signal.h By: Bruce McAlister (asgaroth) 2009-02-25 02:25:45.000-0600 Here is the output of your request seanbright: -------------------------------------------------------------------------------- vzhsxn@soldev:~/temp $ sed -n '67,87 p' /usr/include/signal.h sigset_t *_RESTRICT_KYWD); extern int sigsuspend(const sigset_t *); #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC)... */ #if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \ !defined(__XOPEN_OR_POSIX)) #include <sys/procset.h> extern int gsignal(int); extern int (*ssignal(int, int (*)(int)))(int); extern int sigsend(idtype_t, id_t, int); extern int sigsendset(const procset_t *, int); extern int sig2str(int, char *); extern int str2sig(const char *, int *); #define SIG2STR_MAX 32 #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC)... */ #if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \ !defined(__XOPEN_OR_POSIX)) || defined(_XPG4_2) extern void (*bsd_signal(int, void (*)(int)))(int); extern int killpg(pid_t, int); extern int siginterrupt(int, int); -------------------------------------------------------------------------------- By: Sean Bright (seanbright) 2009-02-25 09:23:58.000-0600 Is this a duplicate of ASTERISK-12901? By: Bruce McAlister (asgaroth) 2009-02-25 09:33:12.000-0600 It appears to be the same error with regards the signal.h file, but dougm's issue is logged against asterisk 1.4.22 which compiles properly for me, this happens for me when I attempt to build asterisk 1.6.0.5 or 1.6.0.6. By: Bruce McAlister (asgaroth) 2009-02-25 09:50:58.000-0600 I would like to try the "-D__EXTENSIONS__=1" work around that dougm mentions in his bug report. Where about in the makeopts file do I need to add this line, is it to be appended to the GC_CFLAGS= option? By: Sean Bright (seanbright) 2009-02-25 09:56:23.000-0600 That should work, yes. By: Bruce McAlister (asgaroth) 2009-02-25 10:17:07.000-0600 I modified makeopts to reflect the following: GC_CFLAGS="-D__EXTENSIONS__=1" But I still get the same error. Here is what I did: gtar zxf asterisk-1.6.0.6.tar.gz cd asterisk-1.6.0.6 export CC=gcc CXX=g++ ./configure -- edit makeopts and made the GC_FLAGS modification mentioned above -- make However I still get the same error: creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc -D_REENTRANT -pthreads -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -march=i386 -Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -O6 ) works... yes checking whether the C compiler (gcc -D_REENTRANT -pthreads -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -march=i386 -Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -O6 ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for mawk... gawk checking host system type... i386-pc-solaris2.10 checking for a BSD compatible install... /opt/dtbld/bin/ginstall -c checking for ranlib... ranlib checking for ar... /usr/ccs/bin/ar checking for tgetent in -ltermcap... yes checking for termcap.h... no checking for term.h... yes checking for curses.h... yes checking for sys/cdefs.h... no checking for vis.h... no checking for issetugid... yes checking for fgetln... no checking for strvis... no checking for strunvis... no updating cache ./config.cache creating ./config.status creating Makefile creating makelist creating config.h In file included from sig.h:47, from el.h:107, from common.c:51, from editline.c:4: /usr/include/signal.h:77: error: syntax error before '*' token By: Bruce McAlister (asgaroth) 2009-04-07 03:55:03 Just an update, I can confirm that I am seeing this same issue in asterisk versions 1.6.0.7, 1.6.0.8 and 1.6.0.9 Is there anything anyone needs me to do so that we could possibly move forward on this? By: clc (clc) 2009-04-19 14:33:48 The following worked for me using OpenSolaris: uname -a SunOS opensolaris 5.11 snv_101b i86pc i386 i86xpv Solaris tar -xzvf asterisk1.6.0.9.tar.gz cd asterisk-1.6.0.9 ./configure patch -p1 ../astrisk_solaris.patch make && sudo make install && sudo make samples By: Bruce McAlister (asgaroth) 2009-04-20 05:29:21 thanks clc, unfortunately I cannot see the "asterisk_solaris.patch" file that you have uploaded. I will give it a test run when I am able to download the patch. By: clc (clc) 2009-04-20 16:16:24 The patch shows up as 'License REJECTED (v3.0)' when I'm logged in. I don't have time to find out why right now, but will try to get the system to allow me to upload the patch again later. By: snuffy (snuffy) 2009-04-28 02:23:24 I have fixed my issues by doing similar to clc patch.. adding -D__EXTENSIONS__ to the cflags in the asterisk Makefile (it used to be in there), now this seems to be a check in autoconfig.h that's generated after running ./configure. CLC: next time please use the 'unified diff' format when uploading patches. By: Leif Madsen (lmadsen) 2009-05-22 12:30:40 I'm marking this as Ready for Review as it looks like snuffy has gotten something that works here. Let me know if this is not the case. Thanks! By: Doug McCallum (dougm) 2009-07-06 15:02:31 I haven't been able to look at asterisk for a while but now have some time. When I tried the patch last week, it seemed to work, but after an update this morning it doesn't. The first problem is that the main/channel.c file has changed what is included and the patch fails to apply. The Makefile does get updated. Even after fixing the patch issue, we're back to editline.c having the signal.h issue. "make menuselect" works, but the build fails when trying to rebuild in order to make libedit.a. All worked when I did a make clean followed by make and the editline Makefile got rebuilt. By: snuffy (snuffy) 2009-07-07 22:10:33 Let me know if my patch does not work for you. PS: remember to kill that _FILE_OFFSET_BITS redefinition in autoconfig.h after configure By: Doug McCallum (dougm) 2009-07-13 18:14:09 The last patch allows a build to succeed. Thanks. By: snuffy (snuffy) 2009-07-14 07:46:56 I have made only one other small change which is to resolve a link error. (This occurs on at least trunk with errors related to app.c and stdtime/localtime.c when final linking of asterisk happens) Note: Neither patch has been tested against 1.4.x by myself only trunk. By: Doug McCallum (dougm) 2009-07-30 14:53:58 A recent change in the top level Makefile causes the latest patch to fail. The fix is simple. ASTCFLAGS is now _ASTCFLAGS By: snuffy (snuffy) 2009-07-30 18:24:30 I will repost updated fix shortly. The MAX/MIN define issue has also been fixed by kpflemming commit into trunk so that will be removed from this patch By: Tilghman Lesher (tilghman) 2009-09-16 19:23:50 snuffy: you stated that you will post an updated fix "shortly", which was 6 weeks ago. Any update? By: Doug McCallum (dougm) 2009-09-16 22:24:19 The Makefile has changed again so the most recent patch doesn't quite work automatically. Other than than that, things still look ok. It would be nice to get this putback. By: snuffy (snuffy) 2009-09-24 07:40:07 Ok i've re-updated the patch.. should now apply cleanly fine. By: Doug McCallum (dougm) 2009-09-25 10:53:26 Thanks, snuffy. It works quite cleanly now. By: Bruce McAlister (asgaroth) 2009-10-29 23:22:21 I get the following error when I apply the patch dated "2009-09-24 07:39" to asterisk 1.6.0.15: [CC] recno/rec_utils.c -> recno/rec_utils.o [AR] hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o hash/ndbm.o btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o btree/bt_overflow.o btree/bt_page.o btree/bt_put.o btree/bt_search.o btree/bt_seq.o btree/bt_split.o btree/bt_utils.o db/db.o mpool/mpool.o recno/rec_close.o recno/rec_delete.o recno/rec_get.o recno/rec_open.o recno/rec_put.o recno/rec_search.o recno/rec_seq.o recno/rec_utils.o -> libdb1.a [LD] abstract_jb.o acl.o adsistub.o aescrypt.o aeskey.o aestab.o alaw.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autoservice.o callerid.o cdr.o channel.o chanvars.o cli.o config.o cryptostub.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o fskmodem.o global_datastores.o hashtab.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o poll.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o strcompat.o tcptls.o tdd.o term.o threadstorage.o translate.o udptl.o ulaw.o utils.o version.o editline/libedit.a db1-ast/libdb1.a -> asterisk Undefined first referenced symbol in file MAX udptl.o MIN udptl.o ld: fatal: Symbol referencing errors. No output written to asterisk collect2: ld returned 1 exit status make[1]: *** [asterisk] Error 1 make: *** [main] Error 2 Is this the latest version of the patch or am i missing something? By: Digium Subversion (svnbot) 2009-11-03 14:05:09.000-0600 Repository: asterisk Revision: 227372 U trunk/Makefile U trunk/main/Makefile ------------------------------------------------------------------------ r227372 | qwell | 2009-11-03 14:05:09 -0600 (Tue, 03 Nov 2009) | 9 lines Fix some build issues on Solaris. (closes issue ASTERISK-13617) (SWP-109) Reported by: asgaroth Patches: bug_14517.diff uploaded by snuffy (license 35) Tested by: asgaroth, snuffy, dougm, qwell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=227372 By: Digium Subversion (svnbot) 2009-11-03 14:05:50.000-0600 Repository: asterisk Revision: 227373 _U branches/1.6.0/ U branches/1.6.0/Makefile U branches/1.6.0/main/Makefile ------------------------------------------------------------------------ r227373 | qwell | 2009-11-03 14:05:50 -0600 (Tue, 03 Nov 2009) | 16 lines Merged revisions 227372 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r227372 | qwell | 2009-11-03 13:59:46 -0600 (Tue, 03 Nov 2009) | 9 lines Fix some build issues on Solaris. (closes issue ASTERISK-13617) (SWP-109) Reported by: asgaroth Patches: bug_14517.diff uploaded by snuffy (license 35) Tested by: asgaroth, snuffy, dougm, qwell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=227373 By: Digium Subversion (svnbot) 2009-11-03 14:06:27.000-0600 Repository: asterisk Revision: 227374 _U branches/1.6.1/ U branches/1.6.1/Makefile U branches/1.6.1/main/Makefile ------------------------------------------------------------------------ r227374 | qwell | 2009-11-03 14:06:27 -0600 (Tue, 03 Nov 2009) | 16 lines Merged revisions 227372 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r227372 | qwell | 2009-11-03 13:59:46 -0600 (Tue, 03 Nov 2009) | 9 lines Fix some build issues on Solaris. (closes issue ASTERISK-13617) (SWP-109) Reported by: asgaroth Patches: bug_14517.diff uploaded by snuffy (license 35) Tested by: asgaroth, snuffy, dougm, qwell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=227374 By: Digium Subversion (svnbot) 2009-11-03 14:06:53.000-0600 Repository: asterisk Revision: 227375 _U branches/1.6.2/ U branches/1.6.2/Makefile U branches/1.6.2/main/Makefile ------------------------------------------------------------------------ r227375 | qwell | 2009-11-03 14:06:53 -0600 (Tue, 03 Nov 2009) | 16 lines Merged revisions 227372 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r227372 | qwell | 2009-11-03 13:59:46 -0600 (Tue, 03 Nov 2009) | 9 lines Fix some build issues on Solaris. (closes issue ASTERISK-13617) (SWP-109) Reported by: asgaroth Patches: bug_14517.diff uploaded by snuffy (license 35) Tested by: asgaroth, snuffy, dougm, qwell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=227375 |