Re: Universal binary problem: ... cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
Re: Universal binary problem: ... cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
- Subject: Re: Universal binary problem: ... cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
- From: Mark Lentczner <email@hidden>
- Date: Tue, 7 Mar 2006 10:36:07 -0800
I'm having this problem, but I think I've got the SDK set correctly....
To recap:
I've got a project that builds universal. I'm doing a build where on
PPC it is 10.3.9 and on i386, it is 10.4u:
Settings in Project:
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk
When I build, the precompiled header for my target compiles four
times (2 architectures, by once each for C and C++):
From detailed build results:
/usr/bin/gcc-4.0 -x c-header -arch i386 ...
/usr/bin/gcc-4.0 -x c++-header -arch i386 ...
/usr/bin/gcc-4.0 -x c-header -arch ppc ...
/usr/bin/gcc-4.0 -x c++-header -arch ppc ...
However, when I do this, (even after manually clearing the cache), I
get this error on linking:
/usr/bin/ld: warning /Library/Caches/com.apple.Xcode.501/
SharedPrecompiledHeaders/macutil_Prefix-gfvtyfrqzhtbgtdkbfnpcyzrwnfp/
macutil_Prefix.h.gch.o cputype (7, architecture i386) does not match
cputype (18) for specified -arch flag: ppc (file not loaded)
Indeed, if I go to the cache and check the filetypes:
& cd /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders
& file macutil_Prefix-*/*.o
macutil_Prefix-abjtwqzwyamujjckvhsykvkxqive/macutil_Prefix.h.gch.o:
Mach-O object ppc
macutil_Prefix-awhadozoixxlekfaawslggtexfzo/macutil_Prefix.h.gch.o:
Mach-O object i386
macutil_Prefix-dsaqnnxqjgkqmkfttdjqoackxtbp/macutil_Prefix.h.gch.o:
Mach-O object i386
macutil_Prefix-gfvtyfrqzhtbgtdkbfnpcyzrwnfp/macutil_Prefix.h.gch.o:
Mach-O object i386
Notice that there are three i386 and one ppc! The last one was
compiled wrong! Here is the build line that generated it (last line
reformatted to make it legible):
ProcessPCH++ /Library/Caches/com.apple.Xcode.501/
SharedPrecompiledHeaders/macutil_Prefix-gfvtyfrqzhtbgtdkbfnpcyzrwnfp/
macutil_Prefix.h.gch macutil_Prefix.h normal ppc c++
com.apple.compilers.gcc.4_0
cd /Users/markl/Projects/LL/mactel/linden/indra/newview
setenv DISTCC_COMPILER "gcc version 4.0.1 (Apple Computer, Inc.
build 5250)"
setenv DISTCC_HOSTS localhost/2
setenv DISTCC_SYSTEM "10.4.5 (i386)"
/usr/bin/gcc-4.0 -x c++-header -arch ppc -pipe -Wno-trigraphs
-fpascal-strings -faltivec -fasm-blocks -gfull -O3 -fmessage-length=0
-mtune=G4 -ftree-vectorize -fvisibility=hidden -fvisibility-inlines-
hidden
-Wno-invalid-offsetof -mmacosx-version-min=10.3
-I/Users/markl/Projects/LL/mactel/linden/indra/newview/build/
macview.build/Deployment-universal/AutoUpdater.build/AutoUpdater.hmap
-Wmost -Wno-sign-compare -Wno-switch -mdynamic-no-pic -fpch-preprocess
-F/Users/markl/Projects/LL/mactel/linden/indra/newview/build/
Deployment-universal
-I/Users/markl/Projects/LL/mactel/linden/indra/newview/build/
Deployment-universal/include
-I../../libraries/ppc-darwin/include
-I../../libraries/include
-I../llcommon
-I/Users/markl/Projects/LL/mactel/linden/indra/newview/build/
macview.build/Deployment-universal/AutoUpdater.build/DerivedSources
-DLL_DARWIN=1 -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG
-fconstant-cfstrings -ffor-scope -Wno-reorder
-isysroot /Developer/SDKs/MacOSX10.3.9.sdk
-c /Users/markl/Projects/LL/mactel/linden/indra/newview/
macutil_Prefix.h
-o /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/
macutil_Prefix-gfvtyfrqzhtbgtdkbfnpcyzrwnfp/macutil_Prefix.h.gch
-fsave-repository=/Library/Caches/com.apple.Xcode.501/
SharedPrecompiledHeaders/macutil_Prefix-gfvtyfrqzhtbgtdkbfnpcyzrwnfp/
macutil_Prefix.h.gch.o
Everything about this command looks right to me: It should be a
precompiled header for C++, ppc, compiled against the 10.3.9 SDK.
Any clues on this one?
- Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden