Hello, I''m having some issues building r190 on Leopard (10.5.1): $ rake (in /Users/johan/temp/superredcloth) ragel superredcloth_scan.rl | rlgen-cd -G2 -o superredcloth_scan.c ragel superredcloth_inline.rl | rlgen-cd -G2 -o superredcloth_inline.c /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for main() in -lc... yes creating Makefile make gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal- darwin9.0 -I. -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c superredcloth_inline.c powerpc-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <URL:http://developer.apple.com/bugreporter> for instructions. i686-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <URL:http://developer.apple.com/bugreporter> for instructions. make: *** [superredcloth_inline.o] Error 1 rake aborted! Command failed with status (2): [make...] /Users/johan/temp/superredcloth/rakefile:129 (I tried removing the -arch ppc flags from the Makefile, still segfaults) $ ruby -v ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0] $ ragel -v # (from macports) Ragel State Machine Compiler version 5.24 September 2007 Copyright (c) 2001-2007 by Adrian Thurston $ which gcc; gcc --version /usr/bin/gcc i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Anyone know what''s up? Thanks, JS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20071211/787922b2/attachment.html
On 12/11/07, Johan S?rensen <johan at johansorensen.com> wrote:> > > > I''m having some issues building r190 on Leopard (10.5.1): > > > $ rake > (in /Users/johan/temp/superredcloth) > ragel superredcloth_scan.rl | rlgen-cd -G2 -o superredcloth_scan.c > ragel superredcloth_inline.rl | rlgen-cd -G2 -o superredcloth_inline.c > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > extconf.rb > checking for main() in -lc... yes > creating Makefile > make > gcc -I. -I. > -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal- > darwin9.0 -I. -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c > superredcloth_inline.c > powerpc-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault > (program cc1) > Please submit a full bug report. > See <URL:http://developer.apple.com/bugreporter > for instructions. > i686-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault (program > cc1) > Please submit a full bug report. > See <URL: http://developer.apple.com/bugreporter> for instructions. > make: *** [superredcloth_inline.o] Error 1 > rake aborted! > Command failed with status (2): [make...] > /Users/johan/temp/superredcloth/rakefile:129 >The solution here was to use the -O1 instead of the default (generated) -Os CFLAG. Here''s a patch (there may be better ways to do this with mkmf?): Index: ext/superredcloth_scan/extconf.rb ==================================================================--- ext/superredcloth_scan/extconf.rb (revision 190) +++ ext/superredcloth_scan/extconf.rb (working copy) @@ -1,5 +1,10 @@ require ''mkmf'' +if /darwin9/ =~ RUBY_PLATFORM + # OSX 10.5 doesn''t like the default "-Os" + $CFLAGS << " -O1 " +end + dir_config("superredcloth_scan") have_library("c", "main") JS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20071212/02b1cafc/attachment-0001.html
Thanks! Patch applied. On Dec 12, 2007, at 5:21 AM, Johan S?rensen wrote:> > > On 12/11/07, Johan S?rensen <johan at johansorensen.com> wrote: > > > I''m having some issues building r190 on Leopard (10.5.1): > > > $ rake > (in /Users/johan/temp/superredcloth) > ragel superredcloth_scan.rl | rlgen-cd -G2 -o superredcloth_scan.c > ragel superredcloth_inline.rl | rlgen-cd -G2 -o superredcloth_inline.c > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby > extconf.rb > checking for main() in -lc... yes > creating Makefile > make > gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/ > 1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -fno-common -arch ppc > -arch i386 -Os -pipe -fno-common -c superredcloth_inline.c > powerpc-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault > (program cc1) > Please submit a full bug report. > See <URL: http://developer.apple.com/bugreporter > for instructions. > i686-apple-darwin9-gcc-4.0.1: Internal error: Segmentation fault > (program cc1) > Please submit a full bug report. > See <URL: http://developer.apple.com/bugreporter> for instructions. > make: *** [superredcloth_inline.o] Error 1 > rake aborted! > Command failed with status (2): [make...] > /Users/johan/temp/superredcloth/rakefile:129 > > The solution here was to use the -O1 instead of the default > (generated) -Os CFLAG. > > Here''s a patch (there may be better ways to do this with mkmf?): > > Index: ext/superredcloth_scan/extconf.rb > ==================================================================> --- ext/superredcloth_scan/extconf.rb (revision 190) > +++ ext/superredcloth_scan/extconf.rb (working copy) > @@ -1,5 +1,10 @@ > require ''mkmf'' > > +if /darwin9/ =~ RUBY_PLATFORM > + # OSX 10.5 doesn''t like the default "-Os" > + $CFLAGS << " -O1 " > +end > + > dir_config("superredcloth_scan") > have_library("c", "main") > > > JS > > > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20071212/6494f641/attachment.html