[MacPorts] #16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch]
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] -----------------------------------------------+---------------------------- Reporter: m@miguelgodinho.com | Owner: macports-tickets@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
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Changes (by blb@macports.org): * owner: macports-tickets@lists.macosforge.org => kimuraw@macports.org * milestone: => Port Bugs Comment: Assigning to maintainer. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Changes (by kimuraw@macports.org): * status: new => assigned Comment: I merged the patch at r39392 as a platform variant "x86_64". I cannot test the port on an x86_64 machine. Please tell me the result of `sudo port test ruby'. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by m@miguelgodinho.com): I'll attach the debug information for the test with +x86_64 and +thread_hooks. It does not seem to raise any error. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by m@miguelgodinho.com): I seems to me that by setting the cflags/args/patches as darwin x86_64 specific they will be ignored as the platform is recognized as i386 (for legacy reasons?) as proof: [root@mig01 ruby-1.8.7-p72]# file libruby.dylib libruby.dylib: Mach-O dynamically linked shared library i386 that's why when I patched the portfile a variant was added -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by jmr@macports.org): Apple's gcc builds for i386 by default when running on x86_64, so that's the arch that ends up in tcl_platform(machine), which is where we get the os.arch value. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by m@miguelgodinho.com): so it means that the suggested cflags/args/patch should have been kept as a variant and not as platform specific as implemented in r39392, right? -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by ryandesign@macports.org): Well, in MacPorts, there is no "platform" that has x86_64. The platform for darwin is always either powerpc or i386. If you change it to a variant it would work, but the correct solution is to fix the universal variant. We don't want each port to invent a new way to support 64-bit builds. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by m@miguelgodinho.com): Sure, makes sense. I was afraid of breaking the settings for other platforms by patching the universal variant. Most of the information I found on the guide & wiki doesn't go very deep, and unfortunately I don't have much time to infer from the source code in Tcl. Could you please let me know where one can efficiently find further information? -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@miguelgodinho.com | Owner: kimuraw@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: x86-64, universal, ruby, pthreads ----------------------------------+----------------------------------------- Comment (by kimuraw@macports.org): Thanks all, I reverted the change of r39392. If you can build ruby for x86_64 without macports, please send me the complete log of configure and make step. It seems ruby-1.8.7 does not support for darwin x86_64 in config.guess. I make a patch for config.guess. The patch affects archdir of lib/ruby. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16331: ruby-1.8.7-p72 Configure error - build failure for x86_64 [universal or single arch] ----------------------------------+----------------------------------------- Reporter: m@… | Owner: kimuraw@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Resolution: fixed | Keywords: x86-64, universal, ruby, pthreads Port: | ----------------------------------+----------------------------------------- Changes (by kimuraw@…): * status: assigned => closed * resolution: => fixed Comment: x86_64 is now available ruby-1.8.7-p174 with macports-1.8.0 on Mac OS X 10.6 Snow Leopard. -- Ticket URL: <http://trac.macports.org/ticket/16331#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts