[MacPorts] #16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch]

MacPorts noreply at macports.org
Sun Aug 17 20:00:29 PDT 2008


#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or
single arch]
-----------------------------------------------+----------------------------
 Reporter:  m at miguelgodinho.com                |       Owner:  macports-tickets at lists.macosforge.org
     Type:  defect                             |      Status:  new                                  
 Priority:  Normal                             |   Milestone:                                       
Component:  ports                              |     Version:  1.6.0                                
 Keywords:  x86-64, universal, ruby, pthreads  |  
-----------------------------------------------+----------------------------
 [svn rev. 39307]
 Darwin 9

 The port does not build on x86_64 due to 2 different issues:
 1 - Similar to what was reported on
 [https://trac.macports.org/ticket/15635], there is a core dump while
 building with pthreads configured.

 {{{
 /usr/bin/gcc-4.0 -O2 -arch x86_64  -fno-common -pipe -fno-common
 -DRUBY_EXPORT  -I. -I. -I/opt/local/include -D_XOPEN_SOURCE
 -D_DARWIN_C_SOURCE   -c dmyext.c
 ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o dln.o
 enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o
 marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o
 random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o
 struct.o time.o util.o variable.o version.o  dmyext.o
 /usr/bin/gcc-4.0 -O2 -arch x86_64  -fno-common -pipe -fno-common
 -DRUBY_EXPORT  -I. -I. -I/opt/local/include -D_XOPEN_SOURCE
 -D_DARWIN_C_SOURCE   -c main.c
 /usr/bin/gcc-4.0 -O2 -arch x86_64  -fno-common -pipe -fno-common
 -DRUBY_EXPORT  -I. -I. -I/opt/local/include -D_XOPEN_SOURCE
 -D_DARWIN_C_SOURCE   -c dmydln.c
 /usr/bin/gcc-4.0 -arch x86_64 -O2 -arch x86_64  -fno-common -pipe -fno-
 common    -DRUBY_EXPORT  -L. -L/opt/local/lib  main.o dmydln.o libruby-
 static.a -lpthread -ldl -lobjc   -o miniruby
 make: *** [.rbconfig.time] Abort trap
 }}}

 ----

 2 - Configure does not set a value for EXTLDFLAGS what leads to have
 libruby.1.8.7.dylibld linked for i386 while the objects were compiled
 x86_64 (or fat).

 {{{
 cc -dynamiclib -undefined suppress -flat_namespace -install_name
 /opt/local/lib/libruby.dylib -current_version 1.8.7 -compatibility_version
 1.8   array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o
 error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o
 object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o
 ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o
 version.o  dmyext.o  -o libruby.1.8.7.dylibld: warning in array.o, file is
 not of required architecture
 ld: warning in bignum.o, file is not of required architecture
 }}}

 and the eventual error:

 {{{
 making ruby
 /usr/bin/gcc-4.0  -O2 -arch x86_64  -fno-common -pipe -fno-common
 -DRUBY_EXPORT  -L. -L/opt/local/lib  main.o  -lruby -ldl -lobjc   -o
 rubyld: warning in ./libruby.dylib, file is not of required architecture
 Undefined symbols:  "_ruby_options", referenced from:
       _main in main.o
   "_ruby_run", referenced from:
       _main in main.o
   "_ruby_init", referenced from:
       _main in main.o  "_ruby_init_stack", referenced from:
       _main in main.old: symbol(s) not found
 collect2: ld returned 1 exit status
 make[1]: *** [ruby] Error 1
 make: *** [all] Error 2
 }}}


 In order to have the port installed I had to patch both the Portfile and
 the Makefile.in (files attached to the ticket).
 For the sake of simplicity a x86_64 variant was created instead of having
 'fixed' the universal.

-- 
Ticket URL: <http://trac.macports.org/ticket/16331>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list