[MacPorts] #26337: ruby19-1.9.2-p0 Incorrect architecture build error against libz.1.dylib
#26337: ruby19-1.9.2-p0 Incorrect architecture build error against libz.1.dylib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ------------------------------------+--------------------------------------- Ruby19 (1.9.2-p0) attempts to link against /usr/local/lib/libz.1.dylib instead of the MacPorts version /opt/local/lib/libz.1.dylib. This throws an error when attempting to link against the library (even though it is a fat binary and actually contains i386, x86_64, and ppc architectures). Attempting to build ruby19 (1.9.2-p0) on Snow Leopard with Xcode 3.2.3 using a fresh install of MacPorts (1.9.1): {{{ :info:build compiling digest/md5 :info:build /usr/bin/gcc-4.2 -dynamic -bundle -o ../../../.ext/x86_64-darwin10/digest/md5.bundle md5init.o md5ossl.o -L. -L../../.. -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lcrypto -lpthread -ldl -lobjc :info:build ld: in /usr/local/lib/libz.1.dylib, file was built for i386 which is not the architecture being linked (x86_64) :info:build collect2: ld returned 1 exit status :info:build make[1]: *** [../../../.ext/x86_64-darwin10/digest/md5.bundle] Error 1 :info:build make: *** [mkmain.sh] Error 1 :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ruby19/work/ruby-1.9.2-p0" && /usr/bin/make -j2 all " returned error 2 :error:build Target org.macports.build returned: shell command failed :debug:build Backtrace: shell command failed while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for ruby19): org.macpolocalhost:_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ }}} -- Ticket URL: <http://trac.macports.org/ticket/26337> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 Incorrect architecture build error against libz.1.dylib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => kimuraw@… * port: => ruby19 -- Ticket URL: <http://trac.macports.org/ticket/26337#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 Incorrect architecture build error against libz.1.dylib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Comment(by timpalpant@…): A few corrections: I called lipo on: 1. /opt/local/lib/libz.dylib -> x86_64 (the MacPorts version) 2. /usr/lib/libz.dylib -> fat with i386, x86_64, and ppc (the Snow Leopard version) 3. /usr/local/lib/libz.dylib -> i386 (?) I'm not sure what the library in /usr/local/lib/ is from, why it is i386 only, and why this error only appeared now. But I fixed my problem by replacing it with the 10.6 version (as described here: [http://www.refresherate.com/2010/01/08/fixing-ld-warning-in- usrlocalliblibz-dylib-file-is-not-of-required-architecture/]. I think that the ruby19 MacPort should still build against /opt/local/lib/libz.dylib, but if not, than this was a problem with my computer only. -- Ticket URL: <http://trac.macports.org/ticket/26337#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- -- Ticket URL: <http://trac.macports.org/ticket/26337#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Changes (by kimuraw@…): * status: new => assigned Comment: I guess there is something wrong in your port:openssl. Please show me the results of the following commands. {{{ % port installed openssl The following ports are currently installed: openssl @0.9.8k_0+darwin : openssl @1.0.0a_0+universal (active) % file /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib: Mach-O universal binary with 2 architectures /opt/local/lib/libcrypto.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /opt/local/lib/libcrypto.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 % otool -L /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib: /opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) % }}} -- Ticket URL: <http://trac.macports.org/ticket/26337#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Comment(by timpalpant@…): If it's just a problem with my machine, there's no reason to worry about it. I just wanted to make sure it wasn't a problem in general. Here is the output you requested: % port installed openssl The following ports are currently installed: openssl @1.0.0a_0 (active) % file /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib: Mach-O 64-bit dynamically linked shared library x86_64 % otool -L /opt/local/lib/libcrypto.dylib /opt/local/lib/libcrypto.dylib: /opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) -- Ticket URL: <https://trac.macports.org/ticket/26337#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Comment(by ryandesign@…): There is a general problem, which is that MacPorts software will generally use software from /usr/local if it's there. That's why we tell people not to have anything in /usr/local if they're going to be using MacPorts. -- Ticket URL: <https://trac.macports.org/ticket/26337#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib ------------------------------------+--------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: ruby19 ------------------------------------+--------------------------------------- Comment(by kimuraw@…): I added a configure option to prefer macports' libraries in building ruby19 at r71867. I believe this change fixed your problem. Please try the latest port:ruby19. -- Ticket URL: <https://trac.macports.org/ticket/26337#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26337: ruby19-1.9.2-p0 build fails with wrong-arch libz.1.dylib in /usr/local/lib -------------------------------------+-------------------------------------- Reporter: timpalpant@… | Owner: kimuraw@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Resolution: fixed | Keywords: Port: ruby19 | -------------------------------------+-------------------------------------- Changes (by kimuraw@…): * status: assigned => closed * resolution: => fixed Comment: I close this ticket. If your problem is not solved, you can reopen this ticket. -- Ticket URL: <https://trac.macports.org/ticket/26337#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts