Link error for "mach_absolute_time"
Link error for "mach_absolute_time"
- Subject: Link error for "mach_absolute_time"
- From: "Dirk Stegemann (Mailing-Lists)" <email@hidden>
- Date: Mon, 5 Nov 2007 14:18:11 +0200
Hello,
I'm getting a link error when trying to build a program which uses
the mach_absolute_time() API, under following conditions:
- Mac OS X 10.5 / Xcode 3
- Target architecture is PPC 32-bit
- "SDKROOT_ppc" is set to "/Developer/SDKs/MacOSX10.3.9.sdk"
The application requires Mac OS X 10.3.9 minimum, therefore I'm also
setting
GCC_VERSION_ppc = 4.0
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
in my xcconfig file.
Strange enough, when setting "GCC_VERSION_ppc = 3.3", the build
succeeds as well (doesn't the 10.3.9 SDK require GCC4?)
Anyway, the "SDKROOT_ppc" settings seems to be responsible alone.
PPC 64-bit does not seem to be affected.
On Mac OS X 10.4.10 / Xcode 2.4.x, everything is working fine.
Does anybody know a solution or work-around?
Below please find a build transcript of the failing build process, as
well as my complete xcconfg file.
Best regards,
Dirk Stegemann
The xcconfig file (only PPC 32-bit fails):
----- snip -----
// Build settings used by all projects and targets
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk
SDKROOT_ppc64 = /Developer/SDKs/MacOSX10.5.sdk
SDKROOT_x86_64 = /Developer/SDKs/MacOSX10.5.sdk
// This setting succeeds:
//GCC_VERSION_ppc = 3.3
// This setting fails:
GCC_VERSION_ppc = 4.0
GCC_VERSION_i386 = 4.0
GCC_VERSION_ppc64 = 4.0
GCC_VERSION_x86_64 = 4.0
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4
MACOSX_DEPLOYMENT_TARGET_ppc64 = 10.5
MACOSX_DEPLOYMENT_TARGET_x86_64 = 10.5
----- snip -----
The complete build transcript (including 32-bit and 64-bit):
----- snip -----
Building target “Mach_absolute_time_Failure” of project
“Mach_absolute_time_Failure” with configuration “Release”
Checking Dependencies
CompileC build/Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc64/main.o /Users/
dirk/Desktop/Mach_absolute_time_Failure/main.cpp normal ppc64 c++
com.apple.compilers.gcc.4_0
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/gcc-4.0 -x c++ -arch ppc64 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-
type -Wunused-variable -fmessage-length=0 -mtune=G5 -
fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-
min=10.5 -gdwarf-2 -I/Users/dirk/Desktop/Mach_absolute_time_Failure/
build/Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Mach_absolute_time_Failure.hmap -F/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/Release -I/Users/
dirk/Desktop/Mach_absolute_time_Failure/build/Release/include -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/DerivedSources -isysroot /Developer/
SDKs/MacOSX10.5.sdk -c /Users/dirk/Desktop/Mach_absolute_time_Failure/
main.cpp -o /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc64/main.o
CompileC build/Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc/main.o /Users/
dirk/Desktop/Mach_absolute_time_Failure/main.cpp normal ppc c++
com.apple.compilers.gcc.4_0
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/gcc-4.0 -x c++ -arch ppc -pipe -Wno-trigraphs
-fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -
Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -
fvisibility-inlines-hidden -mmacosx-version-min=10.3 -gdwarf-2 -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Mach_absolute_time_Failure.hmap -F/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/Release -I/Users/
dirk/Desktop/Mach_absolute_time_Failure/build/Release/include -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/DerivedSources -isysroot /Developer/
SDKs/MacOSX10.3.9.sdk -c /Users/dirk/Desktop/
Mach_absolute_time_Failure/main.cpp -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/ppc/main.o
CompileC build/Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/i386/main.o /Users/
dirk/Desktop/Mach_absolute_time_Failure/main.cpp normal i386 c++
com.apple.compilers.gcc.4_0
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-
type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -
fvisibility-inlines-hidden -mmacosx-version-min=10.4 -gdwarf-2 -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Mach_absolute_time_Failure.hmap -F/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/Release -I/Users/
dirk/Desktop/Mach_absolute_time_Failure/build/Release/include -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/DerivedSources -isysroot /Developer/
SDKs/MacOSX10.4u.sdk -c /Users/dirk/Desktop/
Mach_absolute_time_Failure/main.cpp -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/i386/main.o
CompileC build/Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/x86_64/main.o /Users/
dirk/Desktop/Mach_absolute_time_Failure/main.cpp normal x86_64 c++
com.apple.compilers.gcc.4_0
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/gcc-4.0 -x c++ -arch x86_64 -pipe -Wno-
trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-
type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -
fvisibility-inlines-hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Mach_absolute_time_Failure.hmap -F/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/Release -I/Users/
dirk/Desktop/Mach_absolute_time_Failure/build/Release/include -I/
Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/DerivedSources -isysroot /Developer/
SDKs/MacOSX10.5.sdk -c /Users/dirk/Desktop/Mach_absolute_time_Failure/
main.cpp -o /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/x86_64/main.o
Ld /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/x86_64/
Mach_absolute_time_Failure normal x86_64
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/g++-4.0 -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/x86_64/
Mach_absolute_time_Failure -L/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -F/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -filelist /Users/dirk/
Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/x86_64/
Mach_absolute_time_Failure.LinkFileList -arch x86_64 -mmacosx-version-
min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
Ld /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc64/
Mach_absolute_time_Failure normal ppc64
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/g++-4.0 -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/ppc64/
Mach_absolute_time_Failure -L/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -F/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -filelist /Users/dirk/
Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc64/
Mach_absolute_time_Failure.LinkFileList -arch ppc64 -mmacosx-version-
min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
Ld /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc/
Mach_absolute_time_Failure normal ppc
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/g++-4.0 -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/ppc/
Mach_absolute_time_Failure -L/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -F/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -filelist /Users/dirk/
Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/ppc/
Mach_absolute_time_Failure.LinkFileList -arch ppc -mmacosx-version-
min=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk
Undefined symbols:
"mach_absolute_time()", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Ld /Users/dirk/Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/i386/
Mach_absolute_time_Failure normal i386
cd /Users/dirk/Desktop/Mach_absolute_time_Failure
/Developer/usr/bin/g++-4.0 -o /Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Mach_absolute_time_Failure.build/
Release/Mach_absolute_time_Failure.build/Objects-normal/i386/
Mach_absolute_time_Failure -L/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -F/Users/dirk/Desktop/
Mach_absolute_time_Failure/build/Release -filelist /Users/dirk/
Desktop/Mach_absolute_time_Failure/build/
Mach_absolute_time_Failure.build/Release/
Mach_absolute_time_Failure.build/Objects-normal/i386/
Mach_absolute_time_Failure.LinkFileList -arch i386 -mmacosx-version-
min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
----- snip -----
_______________________________________________
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