Unable to build TBB on OS X 10.8
I am not able to build TBB on OS X 10.8. My compiler, according to gcc --version, is:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
I am following the instructions on gitweb with a few changes. I run:
git checkout maint-2.3
... and then edit line 25 in osx.mk to say:
SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
Building as per the instructions results in this error:
g++ -c -pipe -I/builds/torbrowser/build-scripts/build/x86_64/built/include -I/builds/torbrowser/build-scripts/build/x86_64/built/include/openssl/
-Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -Wall
-W -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -fPIC -DNDEBUG -DSQLITE_OMIT_LOAD_EXTENSION
-DSQLITE_OMIT_COMPLETE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW
-DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
-DQT_SHARED -I../../../../mkspecs/macx-g++ -I. -I../../../../include/QtCore -I../../../../include/QtSql -I../../../../include -I../../../3rdparty/sqlite
-I.moc/release-shared -o .obj/release-shared/moc_qsql_sqlite.o .moc/release-shared/moc_qsql_sqlite.cpp
../../../3rdparty/sqlite/sqlite3.c: In function ‘proxyGetHostID’:
../../../3rdparty/sqlite/sqlite3.c:30314: warning: unused parameter ‘pError’
../../../3rdparty/sqlite/sqlite3.c: At top level:
../../../3rdparty/sqlite/sqlite3.c:87982: warning: missing initializer
../../../3rdparty/sqlite/sqlite3.c:87982: warning: (near initialization for ‘sqlite3Apis.aggregate_count’)
rm -f libqsqlite.dylib
g++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.5 -Xarch_x86_64 -mmacosx-version-min=10.5 -o libqsqlite.dylib
.obj/release-shared/smain.o .obj/release-shared/qsql_sqlite.o
.obj/release-shared/sqlite3.o .obj/release-shared/moc_qsql_sqlite.o
-L/builds/torbrowser/build-scripts/build/x86_64/built/lib -L/builds/torbrowser/build-scripts/build/x86_64/qt-4.8.1/lib -lQtSql
-L/builds/torbrowser/build-scripts/build/x86_64/built/lib -L/builds/torbrowser/build-scripts/build/x86_64/qt-4.8.1/lib -lQtCore
mv -f libqsqlite.dylib ../../../../plugins/sqldrivers/
make[1]: *** [sub-plugins-make_default-ordered] Error 2
make: *** [build-qt] Error 2
Erinn suggested that I build without -no-webkit for Qt. I edit line 70 in osx.mk, clean the build/x86_64 directory, try again, and get:
../../WebCore/generated/JSCrypto.cpp: In function ‘void* WebCore::jsCryptoPrototypeFunctionGetRandomValues(JSC::ExecState*)’:
../../WebCore/generated/JSCrypto.cpp:95: error: invalid use of incomplete type ‘struct WebCore::Crypto’
../../WebCore/generated/JSCrypto.h:31: error: forward declaration of ‘struct WebCore::Crypto’
../../JavaScriptCore/wtf/PassRefPtr.h: In function ‘void WTF::derefIfNotNull(T*) [with T = WebCore::Crypto]’:
../../JavaScriptCore/wtf/RefPtr.h:58: instantiated from ‘WTF::RefPtr<T>::~RefPtr() [with T = WebCore::Crypto]’
../../WebCore/generated/JSCrypto.cpp:73: instantiated from here
../../JavaScriptCore/wtf/PassRefPtr.h:59: error: invalid use of incomplete type ‘struct WebCore::Crypto’
../../WebCore/generated/JSCrypto.h:31: error: forward declaration of ‘struct WebCore::Crypto’
../../JavaScriptCore/wtf/PassRefPtr.h: In function ‘void WTF::refIfNotNull(T*) [with T = WebCore::Crypto]’:
../../JavaScriptCore/wtf/PassRefPtr.h:67: instantiated from ‘WTF::PassRefPtr<T>::PassRefPtr(T*) [with T = WebCore::Crypto]’
../../WebCore/bindings/js/JSDOMBinding.h:142: instantiated from ‘WebCore::JSDOMWrapper* WebCore::createWrapper
(JSC::ExecState*, WebCore::JSDOMGlobalObject*, DOMClass*) [with WrapperClass = WebCore::JSCrypto, DOMClass = WebCore::Crypto]’
../../WebCore/bindings/js/JSDOMBinding.h:155: instantiated from ‘JSC::JSValue WebCore::wrap
(JSC::ExecState*, WebCore::JSDOMGlobalObject*, DOMClass*) [with WrapperClass = WebCore::JSCrypto, DOMClass = WebCore::Crypto]’
../../WebCore/generated/JSCrypto.cpp:102: instantiated from here
../../JavaScriptCore/wtf/PassRefPtr.h:53: error: invalid use of incomplete type ‘struct WebCore::Crypto’
../../WebCore/generated/JSCrypto.h:31: error: forward declaration of ‘struct WebCore::Crypto’
make[4]: *** [.obj/release-shared/JSCrypto.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [release] Error 2
make[2]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2
make[1]: *** [sub-webkit-make_default-ordered] Error 2
make: *** [build-qt] Error 2