Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.0
-
None
-
export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk"
export ARCH="i386"
export MACOSX_DEPLOYMENT_TARGET="10.4"
export PREFIX="/Users/emlyn/TigerRoot"
export CC=gcc-4.0
export CXX=g++-4.0
#export CFLAGS="-arch ${ARCH} -m32 -isysroot ${SDKROOT} -mmacosx-version-min=10.4 -I$SDKROOT/usr/include/gcc/darwin/3.3 -I$PREFIX/include"
export CFLAGS="-arch ${ARCH} -m32 -isysroot ${SDKROOT} -mmacosx-version-min=10.4 -I$PREFIX/include"
export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="${CFLAGS}"
export LDFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -mmacosx-version-min=10.4 -L$PREFIX/lib -Wl,-syslibroot,${SDKROOT}"
export SDKROOT="/Developer/SDKs/MacOSX10.4u.sdk" export ARCH="i386" export MACOSX_DEPLOYMENT_TARGET="10.4" export PREFIX="/Users/emlyn/TigerRoot" export CC=gcc-4.0 export CXX=g++-4.0 #export CFLAGS="-arch ${ARCH} -m32 -isysroot ${SDKROOT} -mmacosx-version-min=10.4 -I$SDKROOT/usr/include/gcc/darwin/3.3 -I$PREFIX/include" export CFLAGS="-arch ${ARCH} -m32 -isysroot ${SDKROOT} -mmacosx-version-min=10.4 -I$PREFIX/include" export CXXFLAGS="${CFLAGS}" export CPPFLAGS="${CFLAGS}" export LDFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -mmacosx-version-min=10.4 -L$PREFIX/lib -Wl,-syslibroot,${SDKROOT}"
-
-
3ed9e2788e8e8d682484f55eb2e5538d48097b72
Description
During building of QT for 10.4u SDK on OSX, the configuration of some components is screwed up by the build scripts.
To Reproduce - build QT 4.6 on OS X 10.6
./configure --prefix=$PREFIX -no-framework -arch x86 -sdk $SDKROOT -no-nis -no-cups -no-qdbus -nomake demos -nomake examples -no-sql-sqlite -qt-sql-mysql -I$PREFIX/include/mysql -L$PREFIX/lib/mysql -opensource -no-3dnow -no-accessibility -no-stl -no-exceptions
your-mac:qt-everywhere-opensource-src-4.6.0 emlyn$ make sub-srccd src/tools/bootstrap/ && make
make[1]: Nothing to be done for `first'.
cd src/tools/moc/ && make
g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -mmacosx-version-min=10.4 -L/Users/emlyn/TigerRoot/lib -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -fno-exceptions -Xarch_i386 -mmacosx-version-min=10.4 -arch -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -o ../../../bin/moc release-shared/moc.o release-shared/preprocessor.o release-shared/generator.o release-shared/parser.o release-shared/token.o release-shared/main.o -L/Users/emlyn/TigerRoot/lib/mysql -L/Users/emlyn/src/qt-everywhere-opensource-src-4.6.0/src/tools/bootstrap -lbootstrap -L/Users/emlyn/TigerRoot/lib/mysql -lz -framework CoreServices
g++-4.2: Invalid arch name : -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
make[1]: *** [../../../bin/moc] Error 1
make: *** [sub-moc-sub_src_target_ordered] Error 2
The scripts makefile generation phase seem to screw up the -arch flag and drop the i386.
Running the following from the src root will fix the issue:
grep -lr "arch -W" . | xargs sed -i .orig -e 's/arch -W/W/g'
grep -lr "g+$" . | xargs sed -i .orig2 -e 's/= g$/= g+-4.0/g'