From bbe3769aa00ecd97afca05f35dacb63b3a7302ef Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Wed, 9 Nov 2016 03:22:46 +0100
Subject: [PATCH] Fixing OpenBLAS installation

---
 install                    | 6 +++++-
 script/detect_gcc          | 1 +
 script/install_BOOST.sh    | 2 +-
 script/install_OPENBLAS.sh | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/install b/install
index 2e2a63db9..718cd2301 100755
--- a/install
+++ b/install
@@ -259,7 +259,11 @@ else
                 echo "Error the installation of Boost failed"
                 exit 1
             fi
-            ./script/install_BOOST.sh $i_dir $ncore
+            if [ x"$dgc_compiler" == x"icpc" ]; then
+              ./script/install_BOOST.sh $i_dir $ncore intel-linux
+            else
+              ./script/install_BOOST.sh $i_dir $ncore gcc
+            fi
             BOOST_installed=1
             configure_options=" $configure_options --with-boost=$i_dir/BOOST "
 	elif [ $conf_err -eq 208 ]; then
diff --git a/script/detect_gcc b/script/detect_gcc
index 7ed16ad3a..a22f097f2 100755
--- a/script/detect_gcc
+++ b/script/detect_gcc
@@ -163,6 +163,7 @@ function detect_compiler()
         possible_solutions "${commands[@]}"
         dgc_compiler=possible_solutions_ret
         dgc_ret=1
+        CXX=$dgc_compiler
     fi
 }
 
diff --git a/script/install_BOOST.sh b/script/install_BOOST.sh
index c882dc766..87c744be7 100755
--- a/script/install_BOOST.sh
+++ b/script/install_BOOST.sh
@@ -10,7 +10,7 @@ fi
 wget http://ppmcore.mpi-cbg.de/upload/boost_1_60_0.tar.bz2
 tar -xvf boost_1_60_0.tar.bz2
 cd boost_1_60_0
-./bootstrap.sh
+./bootstrap.sh --with-toolset=$3
 mkdir $1/BOOST
 ./b2 -j $2 install --prefix=$1/BOOST
 rm -rf boost_1_60_0
diff --git a/script/install_OPENBLAS.sh b/script/install_OPENBLAS.sh
index 04b863c91..8f01385ee 100755
--- a/script/install_OPENBLAS.sh
+++ b/script/install_OPENBLAS.sh
@@ -14,7 +14,7 @@ cd OpenBLAS-0.2.15
 
 # configuration
 
-make
+make CC=gcc CXX=g++
 mkdir $1/OPENBLAS
 make install PREFIX=$1/OPENBLAS
 rm -rf OpenBLAS-0.2.15
-- 
GitLab