Opened 7 years ago

Closed 5 years ago

#7964 closed defect (not a bug)

Unable to build TBB on OS X 10.8

Reported by: runa Owned by: erinn
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: needs-triage
Cc: sebastian, mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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

Child Tickets

Change History (11)

comment:1 Changed 7 years ago by runa

I get the same JSCrypto error when removing -no-webkit and building with Qt 4.8.3 and 4.8.4.

comment:2 Changed 7 years ago by runa

Cc: mikeperry added

Here's what I have so far:

  • git checkout maint-2.3
  • Removed $(SDK) from the Qt build prefs in osx.mk (line 70)
  • Updated versions.mk to use Qt 4.8.4 (line 8 for version, 46 for URL)
  • Updated versions.mk to use FF 17.0.2esr (line 13 for version, 51 for URL)
  • Updated versions.mk to use mozilla-esr17 on line 200 and 201
  • Updated config/mozconfig-osx-x86_64 with the correct path to the MacOSX10.7 SDK

The build now fails when applying available patches for Firefox:

cd /builds/torbrowser/build-scripts/build/x86_64/firefox-17.0.2esr && ./patch-any-src.sh
patching file js/xpconnect/src/XPCComponents.cpp
Hunk #1 FAILED at 4502.
Hunk #2 FAILED at 4513.
2 out of 2 hunks FAILED -- saving rejects to file js/xpconnect/src/XPCComponents.cpp.rej
make: *** [/builds/torbrowser/build-scripts/build/x86_64/firefox-17.0.2esr] Error 1

comment:3 Changed 7 years ago by runa

The following steps will build TBB on OS X 10.8:

  • git checkout maint-2.4
  • Updated osx.mk with the correct path to the MacOSX10.7 SDK (line 25)
  • Removed $(SDK) from the Qt build prefs in osx.mk (line 70)
  • Updated versions.mk to use Qt 4.8.4 (line 8 for version, 46 for URL)
  • Updated versions.mk to use FF 17.0.2esr (line 13 for version)
  • Updated versions.mk to use Torbutton 1.5.0pre-alpha (line 16 for version, 54 for URL)
  • Updated versions.mk to use mozilla-esr17 on line 200 and 201
  • Updated config/mozconfig-osx-x86_64 with the correct path to the MacOSX10.7 SDK (line 21)

Running ./TorBrowser_en-US.app/Contents/MacOS/TorBrowserBundle (from inside the build-scripts directory) gives me:

The file /builds/torbrowser/build-scripts/TorBrowser_en-US.app/TorBrowser_en-US.app/Contents/MacOS/Vidalia.app does not exist.

Seems like it's looking for Vidalia in the wrong place. It should be /builds/torbrowser/build-scripts/TorBrowser_en-US.app/Contents/MacOS/Vidalia.app.

comment:4 Changed 7 years ago by runa

Hm, that last path should be: /builds/torbrowser/build-scripts/TorBrowser_en-US.app/Contents/MacOS/Vidalia.app/Contents/MacOS/Vidalia. I think.

comment:5 Changed 7 years ago by runa

After running make -f osx.mk build-all-binaries copy-firefox bundle to build, run make -f osx-alpha.mk compressed-bundle_en-US to wrap it all up, copy it to your own dir, unzip, then open TorBrowser_en-US.app.

comment:6 Changed 7 years ago by runa

Building TBB this way leaves me with a bundle that crashes whenever I try to watch a Flash video (break.com, youtube.com, etc).

comment:7 Changed 7 years ago by erinn

Just as an FYI, the compressed-bundle_* target will actually build an uncompressed bundle first then compress it, so running those other commands is redundant. Also build-all-binaries will copy Firefox to the right place as well. So make -f osx-alphamk build-all-binaries compressed-bundle_en-US should be sufficient.

Weird that it crashes with flash videos though. It should just... not run them. (Doesn't crash for me, just tells me the plugin is not available.) I think Mike is looking into this right now though.

comment:8 Changed 7 years ago by runa

I created #8129 for the issue with the browser crashing when attempting to watch flash videos.

comment:9 Changed 7 years ago by runa

I tried to build TBB-alpha 64-bit on OS X 10.8. I cloned the git repository, checked out maint-2.4, set the right path to the SDK, updated Qt to 4.8.4 and ran make -f osx-alpha.mk build-all-binaries compressed-bundle_en-US. It breaks when building Vidalia:

[ 98%] Building CXX object src/vidalia/CMakeFiles/Vidalia.dir/qrc_vidalia.o
[ 98%] Building CXX object src/vidalia/CMakeFiles/Vidalia.dir/qrc_content.o
[100%] Building CXX object src/vidalia/CMakeFiles/Vidalia.dir/qrc_vidalia_i18n.o
Linking CXX executable Vidalia.app/Contents/MacOS/Vidalia
Undefined symbols for architecture i386:
  "_GetProcessForPID", referenced from:
      HelperProcess::toForeground() in HelperProcess.o
  "_SetFrontProcess", referenced from:
      HelperProcess::toForeground() in HelperProcess.o
  "_TransformProcessType", referenced from:
      MainWindow::MainWindow() in MainWindow.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [src/vidalia/Vidalia.app/Contents/MacOS/Vidalia] Error 1
make[2]: *** [src/vidalia/CMakeFiles/Vidalia.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build-vidalia] Error 2

clang --version says:

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

xcodebuild -version says:

Xcode 4.6
Build version 4H127

comment:10 Changed 5 years ago by erinn

Keywords: needs-triage added

comment:11 Changed 5 years ago by erinn

Resolution: not a bug
Status: newclosed

Closing since we build with gitian on Linux now.

Note: See TracTickets for help on using tickets.