[tbb-commits] [tor-browser-bundle/master] 64 bit build on Mac for all components. Tor-Browser requires an additional patch, and versions.alpa was not updated to point at the correct tag

mikeperry at torproject.org mikeperry at torproject.org
Thu Oct 30 20:47:46 UTC 2014


commit f1f4a2a85da44820e148c47486363befc1a4bb16
Author: Tom Ritter <tom at ritter.vg>
Date:   Tue Sep 16 21:46:00 2014 -0500

    64 bit build on Mac for all components. Tor-Browser requires an additional patch, and versions.alpa was not updated to point at the correct tag
---
 Bundle-Data/mac-tor.sh                             |    1 -
 gitian/descriptors/mac/gitian-bundle.yml           |    9 +++-----
 gitian/descriptors/mac/gitian-firefox.yml          |    3 ---
 .../mac/gitian-pluggable-transports.yml            |   16 ++++++-------
 gitian/descriptors/mac/gitian-tor.yml              |   16 ++++++-------
 gitian/descriptors/mac/gitian-utils.yml            |   16 +++++++------
 gitian/mkbundle-mac.sh                             |   24 ++++++++++----------
 7 files changed, 40 insertions(+), 45 deletions(-)

diff --git a/Bundle-Data/mac-tor.sh b/Bundle-Data/mac-tor.sh
index 9a22096..03d6f9d 100755
--- a/Bundle-Data/mac-tor.sh
+++ b/Bundle-Data/mac-tor.sh
@@ -1,7 +1,6 @@
 #!/bin/sh
 # Compiled Python modules require a compatible Python, which means 32-bit 2.6.
 export VERSIONER_PYTHON_VERSION=2.6
-export VERSIONER_PYTHON_PREFER_32_BIT=yes
 export DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH
 # Set the current working directory to the directory containing this executable,
 # so that pluggable transport executables can be given with relative paths. This
diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml
index 82b6595..1cf75e9 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -30,9 +30,9 @@ remotes:
   "dir": "meek"
 files:
 # TODO: Can we use an env for this file+version??
-- "tor-browser-mac32-gbuilt.zip"
-- "tor-mac32-gbuilt.zip"
-- "pluggable-transports-mac32-gbuilt.zip"
+- "tor-browser-mac64-gbuilt.zip"
+- "tor-mac64-gbuilt.zip"
+- "pluggable-transports-mac64-gbuilt.zip"
 - "torrc-defaults-appendix-mac"
 - "bridge_prefs.js"
 - "meek-http-helper-user.js"
@@ -75,9 +75,6 @@ script: |
   unzip -d ~/build ~/build/mar-tools-mac$GBUILD_BITS.zip
   MARTOOLS=~/build/mar-tools
   #
-  # XXX: Find a better way to tell that we are having a 32bit build
-  GBUILD_BITS=32
-  #
   mkdir -p $OUTDIR/
   mkdir -p $TORBROWSER_NAME.app/TorBrowser/Data/Browser/profile.default/extensions/https-everywhere at eff.org
   mkdir -p $TORBROWSER_NAME.app/TorBrowser/Data/Browser/profile.meek-http-helper/extensions
diff --git a/gitian/descriptors/mac/gitian-firefox.yml b/gitian/descriptors/mac/gitian-firefox.yml
index fc36472..9126f03 100644
--- a/gitian/descriptors/mac/gitian-firefox.yml
+++ b/gitian/descriptors/mac/gitian-firefox.yml
@@ -95,9 +95,6 @@ script: |
   zip -r mar-tools-mac${GBUILD_BITS}.zip mar-tools
   cp -p mar-tools-mac${GBUILD_BITS}.zip $OUTDIR/
   #
-  # XXX: Find a better way to tell that we are having a 32bit build
-  GBUILD_BITS=32
-  #
   cd $INSTDIR
   # Adjust the Info.plist file
   INFO_PLIST=TorBrowser.app/Contents/Info.plist
diff --git a/gitian/descriptors/mac/gitian-pluggable-transports.yml b/gitian/descriptors/mac/gitian-pluggable-transports.yml
index 33df49f..17aef86 100644
--- a/gitian/descriptors/mac/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/mac/gitian-pluggable-transports.yml
@@ -42,8 +42,8 @@ files:
 - "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
 - "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
 - "dzip.sh"
-- "gmp-mac32-utils.zip"
-- "openssl-mac32-utils.zip"
+- "gmp-mac64-utils.zip"
+- "openssl-mac64-utils.zip"
 script: |
   INSTDIR="$HOME/install"
   TBDIR="$INSTDIR/TorBrowserBundle.app/TorBrowser"
@@ -61,8 +61,8 @@ script: |
   sudo dpkg -i *.deb
   tar xaf multiarch-darwin*tar.xz
   export PATH="$PATH:$HOME/build/apple-osx/bin/"
-  unzip -d $INSTDIR gmp-mac32-utils.zip
-  unzip -d $INSTDIR openssl-mac32-utils.zip
+  unzip -d $INSTDIR gmp-mac64-utils.zip
+  unzip -d $INSTDIR openssl-mac64-utils.zip
   cp $INSTDIR/gmp/lib/*dylib* $TBDIR/Tor/
 
   #
@@ -72,8 +72,8 @@ script: |
   # http://bugs.python.org/issue9437
   export LDSHARED="$CC -pthread -shared"
   # XXX Clean up these flags?
-  export CFLAGS="-I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -F/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.5 -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -I$INSTDIR/gmp/include -L$INSTDIR/gmp/lib"
-  export CXXFLAGS="-I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -F/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.5 -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -I$INSTDIR/gmp/include -L$INSTDIR/gmp/lib"
+  export CFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -F/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.5 -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -I$INSTDIR/gmp/include -L$INSTDIR/gmp/lib"
+  export CXXFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -F/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.5 -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -I$INSTDIR/gmp/include -L$INSTDIR/gmp/lib"
   export LDFLAGS="-L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -F/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks -mmacosx-version-min=10.5"
 
   # Building go
@@ -247,5 +247,5 @@ script: |
 
   # Grabbing the result
   cd $INSTDIR
-  ~/build/dzip.sh pluggable-transports-mac$GBUILD_BITS-gbuilt.zip TorBrowserBundle.app
-  cp pluggable-transports-mac$GBUILD_BITS-gbuilt.zip $OUTDIR/
+  ~/build/dzip.sh pluggable-transports-mac64-gbuilt.zip TorBrowserBundle.app
+  cp pluggable-transports-mac64-gbuilt.zip $OUTDIR/
diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml
index 6022c0b..555440f 100644
--- a/gitian/descriptors/mac/gitian-tor.yml
+++ b/gitian/descriptors/mac/gitian-tor.yml
@@ -26,8 +26,8 @@ files:
 - "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
 - "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
 - "dzip.sh"
-- "openssl-mac32-utils.zip"
-- "libevent-mac32-utils.zip"
+- "openssl-mac64-utils.zip"
+- "libevent-mac64-utils.zip"
 script: |
   INSTDIR="$HOME/install"
   TBDIR="$INSTDIR/TorBrowserBundle.app/TorBrowser"
@@ -46,15 +46,15 @@ script: |
   sudo dpkg -i *.deb
   tar xaf multiarch-darwin*tar.xz
   export PATH="$PATH:$HOME/build/apple-osx/bin/"
-  unzip -d $INSTDIR openssl-mac32-utils.zip
-  unzip -d $INSTDIR libevent-mac32-utils.zip
+  unzip -d $INSTDIR openssl-mac64-utils.zip
+  unzip -d $INSTDIR libevent-mac64-utils.zip
   cp $INSTDIR/libevent/lib/libevent-*.dylib $TBDIR/Tor/
   LIBEVENT_FILE=`basename $INSTDIR/libevent/lib/libevent-*.dylib`
 
   # Building tor
   # XXX Clean up these flags?
-  export CFLAGS="-I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
-  export LDFLAGS="-L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
+  export CFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
+  export LDFLAGS="-m64 -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
   cd tor
   git update-index --refresh -q
   export GIT_COMMITTER_NAME="nobody"
@@ -94,5 +94,5 @@ script: |
 
   # Grabbing the result
   cd $INSTDIR
-  ~/build/dzip.sh tor-mac32-gbuilt.zip TorBrowserBundle.app
-  cp tor-mac32-gbuilt.zip $OUTDIR/
+  ~/build/dzip.sh tor-mac64-gbuilt.zip TorBrowserBundle.app
+  cp tor-mac64-gbuilt.zip $OUTDIR/
diff --git a/gitian/descriptors/mac/gitian-utils.yml b/gitian/descriptors/mac/gitian-utils.yml
index 785d88c..f96b5ec 100644
--- a/gitian/descriptors/mac/gitian-utils.yml
+++ b/gitian/descriptors/mac/gitian-utils.yml
@@ -34,10 +34,12 @@ script: |
   export PATH="$PATH:$HOME/build/apple-osx/bin/"
   # For OpenSSL
   ln -s ~/build/apple-osx/bin/apple-osx-gcc ~/build/apple-osx/bin/i686-apple-darwin11-cc
+  #For gmp, need to trick it so it knows we're doing a 64 bit build
+  for i in ~/build/apple-osx/bin/i686-apple-darwin11-*; do j=`echo $i | sed 's/i686/x86_64/'`; ln -s $i $j; done;
 
   # XXX Clean up these flags?
-  export CFLAGS="-I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
-  export CXXFLAGS="-I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -mmacosx-version-min=10.5"
+  export CFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
+  export CXXFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I.  -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1 -mmacosx-version-min=10.5"
   export LDFLAGS="-L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
 
   # Building Libevent
@@ -54,7 +56,7 @@ script: |
   cd openssl-*
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
   # TODO: Add enable-ec_nistp_64_gcc_128 for 64bit OS X.
-  ./Configure --cross-compile-prefix=i686-apple-darwin11- $CFLAGS darwin-i386-cc --prefix=$INSTDIR/openssl
+  ./Configure --cross-compile-prefix=i686-apple-darwin11- $CFLAGS darwin64-x86_64-cc --prefix=$INSTDIR/openssl enable-ec_nistp_64_gcc_128
   # Using $MAKEOPTS breaks the build. Might be the issue mentioned on
   # http://cblfs.cross-lfs.org/index.php/OpenSSL.
   make
@@ -65,15 +67,15 @@ script: |
   tar xjf gmp.tar.bz2
   cd gmp-*
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
-  ./configure --host=i686-apple-darwin11 --prefix=$INSTDIR/gmp --disable-static --enable-shared --enable-cxx
+  ./configure --host=x86_64-apple-darwin11 --prefix=$INSTDIR/gmp --disable-static --enable-shared --enable-cxx
   make
   make install
   cd ..
 
   # Grabbing the results
   cd $INSTDIR
-  ~/build/dzip.sh openssl-$OPENSSL_VER-mac32-utils.zip openssl
-  ~/build/dzip.sh libevent-${LIBEVENT_TAG#release-}-mac32-utils.zip libevent
-  ~/build/dzip.sh gmp-$GMP_VER-mac32-utils.zip gmp
+  ~/build/dzip.sh openssl-$OPENSSL_VER-mac64-utils.zip openssl
+  ~/build/dzip.sh libevent-${LIBEVENT_TAG#release-}-mac64-utils.zip libevent
+  ~/build/dzip.sh gmp-$GMP_VER-mac64-utils.zip gmp
 
   cp *utils.zip $OUTDIR/
diff --git a/gitian/mkbundle-mac.sh b/gitian/mkbundle-mac.sh
index 9c5d99b..c8830af 100755
--- a/gitian/mkbundle-mac.sh
+++ b/gitian/mkbundle-mac.sh
@@ -103,9 +103,9 @@ fi
 
 cd $GITIAN_DIR
 
-if [ ! -f inputs/openssl-$OPENSSL_VER-mac32-utils.zip -o \
-     ! -f inputs/libevent-${LIBEVENT_TAG_ORIG#release-}-mac32-utils.zip -o \
-     ! -f inputs/gmp-$GMP_VER-mac32-utils.zip ];
+if [ ! -f inputs/openssl-$OPENSSL_VER-mac64-utils.zip -o \
+     ! -f inputs/libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip -o \
+     ! -f inputs/gmp-$GMP_VER-mac64-utils.zip ];
 then
   echo
   echo "****** Starting Utilities Component of Mac Bundle (1/5 for Mac) ******"
@@ -119,9 +119,9 @@ then
 
   cd inputs
   cp -a ../build/out/*-utils.zip .
-  ln -sf openssl-$OPENSSL_VER-mac32-utils.zip openssl-mac32-utils.zip
-  ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac32-utils.zip libevent-mac32-utils.zip
-  ln -sf gmp-$GMP_VER-mac32-utils.zip gmp-mac32-utils.zip
+  ln -sf openssl-$OPENSSL_VER-mac64-utils.zip openssl-mac64-utils.zip
+  ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip libevent-mac64-utils.zip
+  ln -sf gmp-$GMP_VER-mac64-utils.zip gmp-mac64-utils.zip
   cd ..
   #cp -a result/utils-mac-res.yml inputs/
 else
@@ -132,13 +132,13 @@ else
   # We might have built the utilities in the past but maybe the links are
   # pointing to the wrong version. Refresh them.
   cd inputs
-  ln -sf openssl-$OPENSSL_VER-mac32-utils.zip openssl-mac32-utils.zip
-  ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac32-utils.zip libevent-mac32-utils.zip
-  ln -sf gmp-$GMP_VER-mac32-utils.zip gmp-mac32-utils.zip
+  ln -sf openssl-$OPENSSL_VER-mac64-utils.zip openssl-mac64-utils.zip
+  ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip libevent-mac64-utils.zip
+  ln -sf gmp-$GMP_VER-mac64-utils.zip gmp-mac64-utils.zip
   cd ..
 fi
 
-if [ ! -f inputs/tor-mac32-gbuilt.zip ];
+if [ ! -f inputs/tor-mac64-gbuilt.zip ];
 then
   echo
   echo "****** Starting Tor Component of Mac Bundle (2/5 for Mac) ******"
@@ -159,7 +159,7 @@ else
   echo
 fi
 
-if [ ! -f inputs/tor-browser-mac32-gbuilt.zip ];
+if [ ! -f inputs/tor-browser-mac64-gbuilt.zip ];
 then
   echo
   echo "****** Starting TorBrowser Component of Mac Bundle (3/5 for Mac) ******"
@@ -181,7 +181,7 @@ else
   echo
 fi
 
-if [ ! -f inputs/pluggable-transports-mac32-gbuilt.zip ];
+if [ ! -f inputs/pluggable-transports-mac64-gbuilt.zip ];
 then
   echo
   echo "****** Starting Pluggable Transports Component of Mac Bundle (4/5 for Mac) ******"





More information about the tbb-commits mailing list