From: Tim P. <he...@ti...> - 2007-07-12 10:04:57
|
Ive just had a go with it and it works fine doing that with hpricot, but the I tried libxml-ruby and the make file it creates is a lot more complex than that of hpricot. It seems to check the architecture of ruby, to make sure its compiling the right one. These are the following lines in the make file: arch = i686-darwin8.7.1 sitearch = i686-darwin8.7.1 Which was generated by extconf.rb. I tried manually adding different architecture flags but it doesn't like it and complains with the following: libz.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) I think the first bit relates to that its already cast itself as i686 and knows its not a PPC so doesn't need to compile it (or cant compile it?) What are peoples thoughts? Cheers Tim On 12 Jul 2007, at 09:49, Eloy Duran wrote: > I had a look at compiling hpricot as a universal bundle which works if > I edit the Makefile created by extconf.rb. > > I had to add to both CFLAGS and the LDSHARED the following: -arch > ppc -arch i386 > > What I'm wondering is how extconf works.... I thought it would pick up > the correct flags from the configure settings of ruby itself, however > running the extconf against the apple supplied universal ruby does not > add these flags. So does someone with more knowledge of extconf know > how we could patch this so any lib that builds with extconf > automatically gets the correct flags? > > Cheers, > Eloy |