Build issues on Leopard

Johan Sørensen johan at johansorensen.com
Wed Dec 12 05:21:15 EST 2007


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 


More information about the Redcloth-upwards mailing list