Hi,
we're having problems with precompiled headers in Xcode 2.1 with our projects (which were converted from Xcode 1.5, in case this matters): Whenever we change a single C++ source file and recompile, we first get a warning about invalid precompiled headers but when building again (without additional changes), everything builds fine.
We're using gcc 3.3 to build our product (since we'll can't require 10.3.9), so maybe that's part of the problem (this problem does not seem to occur when using gcc 4). Has anybody else seen this problem and knows a workaround / what's the source of the problem?
Below are the build logs from the first and second build respectively:
Native Build of Target "FooBar" using Build Configuration "Release (unstripped)"
CompileC "build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc/FooDatabaseView.o" Source/Common/FooDatabaseView.cpp normal ppc c++ com.apple.compilers.gcc.3_3 mkdir "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc" cd /theSprawl/Entwicklung/FooAll/Foo/Bar setenv MACOSX_DEPLOYMENT_TARGET 10.3 setenv NEXT_ROOT /Developer/SDKs/MacOSX10.4u.sdk /usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -Os -Wunused-label -Wno-four-char-constants -fmessage-length=0 -mtune=G4 "-Wp,-header-mapfile,/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Foo Bar.hmap" -Wconversion -Wmost -Winvalid-pch -mdynamic-no-pic "-F/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)" -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../CPLAT_XcodeProjects/build/Release -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../RBSplitView "-I/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/include" -I/theSprawl/Entwicklung/FooAll/CPLAT/Source/ThirdParty/boost "-I/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/DerivedSources" -Wno-long-double -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3/c++ -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3/c++/ppc-darwin -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/FooBar_Prefix-deiifnfxbahrtgaynibfrkbindiz/FooBar_Prefix.pch -c /theSprawl/Entwicklung/FooAll/Foo/Bar/Source/Common/FooDatabaseView.cpp -o "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc/FooDatabaseView.o" cc1plus: warning: /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/FooBar_Prefix-deiifnfxbahrtgaynibfrkbindiz/FooBar_Prefix.pch.gch: not used because `__private_extern__' not defined cc1plus: /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/FooBar_Prefix-deiifnfxbahrtgaynibfrkbindiz/FooBar_Prefix.pch: No such file or directory cc1plus: one or more PCH files were found, but they were invalid
... more errors here due to ignored precompiled headers ...
Then, the second time I build, everything works fine:
Native Build of Target "FooBar" using Build Configuration "Release (unstripped)"
CompileC "build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc/FooDatabaseView.o" Source/Common/FooDatabaseView.cpp normal ppc c++ com.apple.compilers.gcc.3_3 mkdir "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc" cd /theSprawl/Entwicklung/FooAll/Foo/Bar setenv MACOSX_DEPLOYMENT_TARGET 10.3 setenv NEXT_ROOT /Developer/SDKs/MacOSX10.4u.sdk /usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -Os -Wunused-label -Wno-four-char-constants -fmessage-length=0 -mtune=G4 "-Wp,-header-mapfile,/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Foo Bar.hmap" -Wconversion -Wmost -Winvalid-pch -mdynamic-no-pic "-F/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)" -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../CPLAT_XcodeProjects/build/Release -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../RBSplitView "-I/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/include" -I/theSprawl/Entwicklung/FooAll/CPLAT/Source/ThirdParty/boost "-I/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/DerivedSources" -Wno-long-double -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3/c++ -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc/darwin/3.3/c++/ppc-darwin -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/FooBar_Prefix-deiifnfxbahrtgaynibfrkbindiz/FooBar_Prefix.pch -c /theSprawl/Entwicklung/FooAll/Foo/Bar/Source/Common/FooDatabaseView.cpp -o "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc/FooDatabaseView.o"
Ld "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/Foo Bar.app/Contents/MacOS/Foo Bar" normal ppc mkdir "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/Foo Bar.app/Contents/MacOS" cd /theSprawl/Entwicklung/FooAll/Foo/Bar setenv MACOSX_DEPLOYMENT_TARGET 10.3 setenv NEXT_ROOT /Developer/SDKs/MacOSX10.4u.sdk /usr/bin/g++-3.3 -o "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/Foo Bar.app/Contents/MacOS/Foo Bar" "-L/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)" -L/theSprawl/Entwicklung/FooAll/Foo/Bar/../CPLAT_XcodeProjects/build/Release -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/3.3 "-F/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)" -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../CPLAT_XcodeProjects/build/Release -F/theSprawl/Entwicklung/FooAll/Foo/Bar/../RBSplitView -filelist "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/FooBar.build/Release (unstripped)/FooBar.build/Objects-normal/ppc/Foo Bar.LinkFileList" -framework Cocoa -framework CoreServices -framework IOKit -framework SystemConfiguration -framework ExceptionHandling -lz -framework Security -framework RBSplitView -lCP_Framework_Core -lCP_Internet -lCP_PPSAdditions -lexpat -lFSCopyObject -lMoreFilesX -lsqlite -arch ppc -prebind -Wl,-dead_strip -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk ld: warning NEXT_ROOT environment variable ignored because -syslibroot specified
Touch "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/Foo Bar.app" mkdir "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)" cd /theSprawl/Entwicklung/FooAll/Foo/Bar /usr/bin/touch "/theSprawl/Entwicklung/FooAll/Foo/Bar/build/Release (unstripped)/Foo Bar.app"
Thanks, </jum>
|