#24825 closed defect (invalid)
zlib 1.2.5_0: Snow Leopard: libz.dylib contains unexpected architecture cputype
Reported by: | msb2@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.2 |
Keywords: | snowleopard | Cc: | |
Port: | zlib |
Description
On Snow Lepoard (10.6.3, Xcode 3.2.2) Intel 64-bit, ports depending on zlib fail to upgrade/install. For example, the following error is obtained at the end of the output for
port -d install bzr
:
---> Configuring freetype DEBUG: Using compiler 'Mac OS X gcc 4.2' DEBUG: Executing proc-pre-org.macports.configure-configure-0 Error: File /opt/local/lib/libz.dylib contains unexpected architecture cputype. Error: This may be a bug in the archcheck portgroup. Error: Target org.macports.configure returned: unexpected architecture DEBUG: Backtrace: unexpected architecture while executing "$pre $targetname" Warning: the following items did not execute (for freetype): org.macports.destroot org.macports.configure org.macports.build DEBUG: couldn't read file "/opt/local/share/macports/Tcl/darwintrace1.0/pkgIndex.tcl": no such file or directory while executing "source [file join $dir pkgIndex.tcl]" Error: Unable to upgrade port: 1 DEBUG: upgrade python26 failed while executing "macports::_upgrade_mport_deps $mport $target" (procedure "mportexec" line 27) invoked from within "mportexec $workername $target" Error: Unable to execute port: upgrade python26 failed
The information about zlib earlier in the output is:
DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib DEBUG: epoch: in tree: 0 installed: 0 DEBUG: zlib 1.2.5_0 exists in the ports tree DEBUG: zlib 1.2.5_0 is the latest installed DEBUG: zlib 1.2.5_0 is active DEBUG: Merging existing variants into variants DEBUG: new fully merged portvariants: DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib DEBUG: OS Platform: darwin DEBUG: OS Version: 10.3.0 DEBUG: Mac OS X Version: 10.6 DEBUG: System Arch: i386 DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: adding the default universal variant DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf DEBUG: Requested variant darwin is not provided by port zlib. DEBUG: Requested variant i386 is not provided by port zlib. DEBUG: Requested variant macosx is not provided by port zlib. DEBUG: No need to upgrade! zlib 1.2.5_0 >= zlib 1.2.5_0
The command file /opt/local/lib/libz.dylib
produces
/opt/local/lib/libz.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Change History (12)
comment:1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Status: | new → assigned |
comment:2 Changed 15 years ago by msb2@…
The output of lipo -info /opt/local/lib/libz.dylib
is
Architectures in the fat file: /opt/local/lib/libz.dylib are: (cputype (16777223) cpusubtype (3)) i386
The output for all of the other lib*dylib files in /opt/local/lib is
Non-fat file: lib*.dylib is architecture: cputype 16777223 cpusubtype 3
The computer is a 2009 8-core Mac Pro (MacPro4,1). Output of sysctl -a machdep.cpu
includes Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Everywhere it's saying "cputype 16777223 cpusubtype 3" I would have expected it to say "x86_64". What does which lipo
say? I wonder if maybe you have a different lipo than I do.
comment:4 follow-up: 5 Changed 15 years ago by msb2@…
A) To remove one confusion: based on searching other bug reports I tried installing the universal variant of zlib. That was the reason for the difference between libz.dylib and the others. Reinstalling zlib brings the architecture to be identical to all of the other lib*dylib files in /opt/local/lib.
lipo -info /opt/local/lib/libz.dylib
outputs
Non-fat file: /opt/local/lib/libz.dylib is architecture: cputype 16777223 cpusubtype 3
The "unexpected architecture cputype" error when trying to install bzr remains.
B) which lipo
gives /usr/bin/lipo
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to msb2@…:
which lipo
gives/usr/bin/lipo
FYI, the error you're reporting has been reported before, in #23343. The possible resolutions suggested there are:
Does the file /usr/local/lib/libgcc_s.10.4.dylib exist? If so, remove it.
Did you upgrade to Snow Leopard from a prior version of Mac OS X? If so, have you performed the Migration procedure?
comment:6 Changed 15 years ago by msb2@…
Snow Leopard is the original OS on this computer, not an upgrade.
Currently I have /usr/local renamed to /usr/local-tmp to eliminate the possibility of conflicts. In any case, this directory does not have any libgcc_s.
/usr/lib has two versions of libgcc_s:
lrwxr-xr-x 1 root wheel 17B Aug 14 2009 libgcc_s.1.dylib -> libSystem.B.dylib lrwxr-xr-x 1 root wheel 19B Sep 15 2009 libgcc_s.10.4.dylib -> libgcc_s.10.5.dylib -rwxr-xr-x 1 root wheel 40K Jan 20 02:45 libgcc_s.10.5.dylib
Version "1" is necessary. Temporarily removing 10.4 & 10.5 from /usr/lib makes no different -- same error, same output from lipo.
comment:7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
I'm running out of ideas to explain why your lipo output differs from mine. :) Last chance: maybe your /usr/bin/lipo has been replaced. Could you please show the output of
ls -l /usr/bin/lipo /opt/local/bin/lipo
I'm also curious about the -detailed_info output of your lipo. Maybe we can use that output to more reliably detect architectures. Could you show the output of
lipo -detailed_info /opt/local/lib/libz.dylib /usr/lib/libSystem.dylib
comment:8 Changed 15 years ago by msb2@…
"ls -l /usr/bin/lipo" gives
-r-xr-xr-x 1 root wheel 140936 Mar 15 2006 /usr/bin/lipo
There is no lipo at /opt/local/bin.
"lipo -detailed_info /opt/local/lib/libz.dylib" gives
input file /opt/local/lib/libz.dylib is not a fat file Non-fat file: /opt/local/lib/libz.dylib is architecture: cputype 16777223 cpusubtype 3
"lipo -detailed_info /usr/lib/libSystem.dylib" gives
Fat header in: /usr/lib/libSystem.dylib fat_magic 0xcafebabe nfat_arch 3 architecture (cputype (16777223) cpusubtype (3)) cputype (16777223) cpusubtype cpusubtype (3) offset 4096 size 2352544 align 2^12 (4096) architecture i386 cputype CPU_TYPE_I386 cpusubtype CPU_SUBTYPE_I386_ALL offset 2359296 size 2203168 align 2^12 (4096) architecture ppc7400 cputype CPU_TYPE_POWERPC cpusubtype CPU_SUBTYPE_POWERPC_7400 offset 4562944 size 2289296 align 2^12 (4096)
comment:9 Changed 15 years ago by msb2@…
I replaced /usr/bin/lipo with a lipo obtained from another Snow Leopard machine, which had a date of 2009. Now "lipo -info /opt/local/lib/libz.dylib" gives
Non-fat file: /opt/local/lib/libz.dylib is architecture: x86_64
The install of bzr just completed! Thanks for your help!
comment:10 Changed 15 years ago by tobypeterson
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
ok, broken OS install apparently
comment:11 Changed 14 years ago by vona@…
I found I had what appears to be the same old version of lipo also on my system, and also causing problems for macports.
Please see bug report #23343 for my notes on how to get a replacment lipo (that works) off our os x install dvd.
comment:12 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | snowleopard added; Snow Leopard zlib cputype removed |
---|
What does the command
lipo -info /opt/local/lib/libz.dylib
say? What kind of processor is in your Mac?