Re: configuration error in trying to build library for 10.4 sdk
Re: configuration error in trying to build library for 10.4 sdk
- Subject: Re: configuration error in trying to build library for 10.4 sdk
- From: Gwynne Raskind <email@hidden>
- Date: Wed, 27 May 2009 12:48:07 -0400
On May 27, 2009, at 10:26 AM, Brant Sears wrote:
I need to build a 3rd party library using the 10.4 sdk. I am using
the following command to try to configure the library:
env CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386"
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" ./
configure
I get an error that says:
checking for C compiler default output... configure: error: C
compiler cannot create executables
What is causing this? What should I do?
Thanks.
Well, I've found that with autoconf-based packages, I have to do
something more like this to keep configure from getting confused:
# assumes sh or bash
SDKROOT="/Developer/SDKs/MacOS10.4u.sdk"
ARCH="i386"
MINOSX="-mmacosx-version-min=10.4"
CC="gcc -isysroot $SDKROOT -arch $arch $MINOSX" \
CXX="g++ -isysroot $SDKROOT -arch $arch $MINOSX" \
CFLAGS="-isysroot $SDKROOT -arch $arch $MINOSX $CFLAGS" \
CXXFLAGS="-isysroot $SDKROOT -arch $arch $MINOSX $CXXFLAGS" \
LDFLAGS="-isysroot $SDKROOT -arch $arch $MINOSX" \
./configure
In short, apply the sysroot and arch flags to the compile commands,
the compile flags, AND the link flags. It seems like overkill, but
it's worked for me to the point where I can use the same trick to
build armv6 code for the iPhone (which is utterly useless for the most
part, but does let me observe the dumped assembly gcc generates for it).
This all being said, checking the config.log will always give you
definitive answers on why you're seeing errors like yours.
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."
_______________________________________________
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