Browse Source

Use apt for wt instead of build from source

Hamilton Turner 11 years ago
parent
commit
2b9d79e2a2
2 changed files with 25 additions and 8 deletions
  1. 1 1
      frameworks/C++/wt/bash_profile.sh
  2. 24 7
      toolset/setup/linux/frameworks/wt.sh

+ 1 - 1
frameworks/C++/wt/bash_profile.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-export BOOST_ROOT=${IROOT}/boost
+export BOOST_ROOT=/usr/local
 export BOOST_INC=${BOOST_ROOT}/include
 export BOOST_LIB=${BOOST_ROOT}/lib
 

+ 24 - 7
toolset/setup/linux/frameworks/wt.sh

@@ -3,12 +3,29 @@
 RETCODE=$(fw_exists wt)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_get http://downloads.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.gz -O boost_1_48_0.tar.gz
-fw_untar boost_1_48_0.tar.gz
-cd boost_1_48_0
-./bootstrap.sh --prefix=$IROOT/boost
-./b2 install
-cd ..
+# The commented code works. While we would love to get boost from source
+# so we know exactly what we are getting, it just takes too long. Also, 
+# Ubuntu1204 can only run boost 1.48 and Ubuntu1404 can only run 1.54, 
+# even if you compile from source. Apt supplies different boost version 
+# numbers anyways (which is something it often does not do and one of the 
+# main reasons for compilation from a specific source version), so we can 
+# just use apt. See https://github.com/TechEmpower/FrameworkBenchmarks/issues/1013
+#
+#fw_get http://downloads.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.gz -O boost_1_48_0.tar.gz
+#fw_untar boost_1_48_0.tar.gz
+#cd boost_1_48_0
+#./bootstrap.sh --prefix=$IROOT/boost
+#./b2 install
+#cd ..
+
+# Instead of compiling from source, just use apt to install onto 
+# host machine
+source /etc/lsb-release
+if [ "$DISTRIB_RELEASE" -eq "14.04" ]; then
+    sudo apt-get -y install libboost1.54-all-dev
+else
+    sudo apt-get -y install libboost1.48-all-dev
+fi
 
 fw_get http://downloads.sourceforge.net/witty/wt-3.3.3.tar.gz -O wt-3.3.3.tar.gz
 fw_untar wt-3.3.3.tar.gz
@@ -16,6 +33,6 @@ fw_untar wt-3.3.3.tar.gz
 cd wt-3.3.3
 mkdir -p build
 cd build
-cmake .. -DWT_CPP_11_MODE=-std=c++0x -DCMAKE_BUILD_TYPE=Release -DBOOST_PREFIX=${IROOT}/boost -DCMAKE_INSTALL_PREFIX=$IROOT/wt
+cmake .. -DWT_CPP_11_MODE=-std=c++0x -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$IROOT/wt
 make
 make install