Summary: | ASTERISK-15512: [patch] Solaris sed fails on generating ael_lex.c | ||
Reporter: | Ben Klang (bklang) | Labels: | |
Date Opened: | 2010-01-25 11:17:06.000-0600 | Date Closed: | 2010-05-11 14:58:32 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/Portability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 16696-sedfix.diff | |
Description: | I noticed a problem when doing a "make install" after building Asterisk from source on OpenSolaris: [LD] aelparse.o aelbison.o pbx_ael.o hashtab.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o -> aelparse Undefined first referenced symbol in file ael_yylex aelbison.o reset_argcount aelbison.o my_file aelbison.o ael2_parse pbx_ael.o reset_parencount aelbison.o reset_semicount aelbison.o prev_word aelbison.o ld: fatal: symbol referencing errors. No output written to aelparse collect2: ld returned 1 exit status gmake[1]: *** [aelparse] Error 1 gmake: *** [utils] Error 2 Scrolling up through the build log I see the following line: [FLEX] ael/ael.flex -> ael/ael_lex.c sed: command garbled: /begin standard C headers/i#include "asterisk.h" [BISON] ael/ael.y -> ael/ael.tab.c I suspect this is due to a difference between GNU sed and Solaris' provided sed, but I'm not sure. ****** ADDITIONAL INFORMATION ****** There is one workaround: Doing an "svn revert -R main res" resets the files that get modified: $ svn status M main/ast_expr2f.c M main/ast_expr2.c M main/ast_expr2.h ? res/ael/ael.output M res/ael/ael.tab.c M res/ael/ael_lex.c M res/ael/ael.tab.h Then re-running "make install" rebuilds the changed files and Asterisk builds and installs successfully. | ||
Comments: | By: Ben Klang (bklang) 2010-01-25 11:42:57.000-0600 One other workaround for OpenSolaris is found: installing the SUNWgsed package changes the default 'sed' binary to /usr/gnu/bin/sed, which does not trigger the bug. I do not believe option this is available in Solaris 10, so I believe this issue is still relevant. By: Chris Walton (crjw) 2010-01-25 21:07:20.000-0600 Solaris 10 ships with: /usr/bin/sed from SUNWcsu /usr/xpg4/bin/sed from SUNWxcu4 /opt/sfw/bin/sed from SFWsed on the companion CD /opt/sfw/bin/gsed symbolic link to /opt/sfw/bin/gsed OpenSolaris has: /usr/bin/sed from SUNWcsu /usr/xpg4/bin/sed from SUNWxcu4 /usr/bin/gsed from SUNWgsed /usr/gnu/bin/sed symbolic link to /usr/bin/gsed A number of commands under /usr/bin are lacking functionality but have been left as-is (presumably for backwards compatibility). I like to make sure that the XCU4, XCU6, and GNU related packages are installed. I then set /usr/bin to the end of the PATH. This is what works for me when compiling under OpenSolaris: PATH=/usr/gnu/bin:/usr/sfw/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin By: Jason Parker (jparker) 2010-05-07 17:18:51 This patch should fix the sed error you're seeing. Does that solve this? By: Digium Subversion (svnbot) 2010-05-11 14:55:43 Repository: asterisk Revision: 262421 U branches/1.4/pbx/Makefile ------------------------------------------------------------------------ r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines Use a less silly method for modifying a flex-generated file. The sed syntax that was used wasn't actually valid, causing some versions to choke. This is the method that is used in 1.6.x+ for similar changes. (closes issue ASTERISK-15512) Reported by: bklang Patches: 16696-sedfix.diff uploaded by qwell (license 4) Tested by: qwell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=262421 By: Digium Subversion (svnbot) 2010-05-11 14:57:24 Repository: asterisk Revision: 262422 _U trunk/ U trunk/res/Makefile ------------------------------------------------------------------------ r262422 | qwell | 2010-05-11 14:57:24 -0500 (Tue, 11 May 2010) | 18 lines Merged revisions 262421 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines Use a less silly method for modifying a flex-generated file. The sed syntax that was used wasn't actually valid, causing some versions to choke. This is the method that is used in 1.6.x+ for similar changes. (closes issue ASTERISK-15512) Reported by: bklang Patches: 16696-sedfix.diff uploaded by qwell (license 4) Tested by: qwell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=262422 By: Digium Subversion (svnbot) 2010-05-11 14:57:56 Repository: asterisk Revision: 262423 _U branches/1.6.0/ U branches/1.6.0/res/Makefile ------------------------------------------------------------------------ r262423 | qwell | 2010-05-11 14:57:56 -0500 (Tue, 11 May 2010) | 25 lines Merged revisions 262422 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r262422 | qwell | 2010-05-11 14:57:24 -0500 (Tue, 11 May 2010) | 18 lines Merged revisions 262421 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines Use a less silly method for modifying a flex-generated file. The sed syntax that was used wasn't actually valid, causing some versions to choke. This is the method that is used in 1.6.x+ for similar changes. (closes issue ASTERISK-15512) Reported by: bklang Patches: 16696-sedfix.diff uploaded by qwell (license 4) Tested by: qwell ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=262423 By: Digium Subversion (svnbot) 2010-05-11 14:58:14 Repository: asterisk Revision: 262424 _U branches/1.6.1/ U branches/1.6.1/res/Makefile ------------------------------------------------------------------------ r262424 | qwell | 2010-05-11 14:58:14 -0500 (Tue, 11 May 2010) | 25 lines Merged revisions 262422 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r262422 | qwell | 2010-05-11 14:57:24 -0500 (Tue, 11 May 2010) | 18 lines Merged revisions 262421 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines Use a less silly method for modifying a flex-generated file. The sed syntax that was used wasn't actually valid, causing some versions to choke. This is the method that is used in 1.6.x+ for similar changes. (closes issue ASTERISK-15512) Reported by: bklang Patches: 16696-sedfix.diff uploaded by qwell (license 4) Tested by: qwell ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=262424 By: Digium Subversion (svnbot) 2010-05-11 14:58:31 Repository: asterisk Revision: 262425 _U branches/1.6.2/ U branches/1.6.2/res/Makefile ------------------------------------------------------------------------ r262425 | qwell | 2010-05-11 14:58:31 -0500 (Tue, 11 May 2010) | 25 lines Merged revisions 262422 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r262422 | qwell | 2010-05-11 14:57:24 -0500 (Tue, 11 May 2010) | 18 lines Merged revisions 262421 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines Use a less silly method for modifying a flex-generated file. The sed syntax that was used wasn't actually valid, causing some versions to choke. This is the method that is used in 1.6.x+ for similar changes. (closes issue ASTERISK-15512) Reported by: bklang Patches: 16696-sedfix.diff uploaded by qwell (license 4) Tested by: qwell ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=262425 |