gstf / libspatialite-ios

libspatialite compiled for iOS
55 stars 48 forks source link

Compiling fails in i386 phase. #2

Closed tilemapjp closed 11 years ago

tilemapjp commented 11 years ago

Compiling of arm architectures works well, but

make arch ARCH=i386 IOS_PLATFORM=iPhoneSimulator

not working. error shows,

cd proj && env \
    CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ \
    CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
    CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/include -arch i386 -I/Users/kokogiko/Projects/libspatialite-ios/build/i386/include" \
    CXXFLAGS="--stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/include -arch i386 -I/Users/kokogiko/Projects/libspatialite-ios/build/i386/include" \
    LDFLAGS="-stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/kokogiko/Projects/libspatialite-ios/build/i386/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib -arch i386" ./configure --host=arm-apple-darwin --prefix=/Users/kokogiko/Projects/libspatialite-ios/build/i386 --disable-shared && make clean install
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works... no
configure: error: in `/Users/kokogiko/Projects/libspatialite-ios/proj':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [/Users/kokogiko/Projects/libspatialite-ios/build/i386/lib/libproj.a] Error 77

if config.log is need, I will send it later.

muellermartin commented 11 years ago

I found a fix for this issue and created a pull request (see #3), but I don't know if it breaks compatibility with Xcode prior to version 5.

gstf commented 11 years ago

As the PR is merged, closing this.