From 4692871deb246b16039a188728fda10c6b29b409 Mon Sep 17 00:00:00 2001
From: Amir Mohammadi <183.amir@gmail.com>
Date: Wed, 11 Jan 2017 15:09:53 +0100
Subject: [PATCH] from-scratch.sh - export ARCH=64

---
 install/from-scratch.sh | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/install/from-scratch.sh b/install/from-scratch.sh
index ee0a40d..c7e5f63 100755
--- a/install/from-scratch.sh
+++ b/install/from-scratch.sh
@@ -28,10 +28,18 @@ else
     CAFFE=
 fi
 
+# This is needed for toolchain. Since we just use 64-bit, I am not checking if
+# the system is 32 bit.
+export ARCH=64
+
 # For a complete list of dependencies, please read:
 # https://gitlab.idiap.ch/bob/bob/wikis/Dependencies
 echo "[>>] Creating environment ${NAME} for python ${PYTHON_VERSION} with bob dependencies..."
-${CONDA} create --yes -n ${NAME} --override-channels -c https://www.idiap.ch/software/bob/conda -c defaults python=$PYTHON_VERSION \
+${CONDA} create --yes -n ${NAME} \
+  --override-channels \
+  -c https://www.idiap.ch/software/bob/conda \
+  -c defaults \
+  python=$PYTHON_VERSION \
   anaconda=4.2.0 \
   boost=1.61 \
   ${CAFFE} \
@@ -73,11 +81,6 @@ ${CONDA} create --yes -n ${NAME} --override-channels -c https://www.idiap.ch/sof
   virtualenv \
   vlfeat=0.9.20
 
-# Commented out while @amohammadi fixes it in conda-forge
-#if [ "$(uname)" == "Linux" ] && [ ${PYTHON_VERSION} == "2.7" ]; then
-#    ${CONDA} install --yes -n ${NAME} --override-channels -c conda-forge -c defaults caffe
-#fi
-
 echo "[>>] Pip-installing extra dependencies in environment ${NAME} for ${PYTHON_VERSION}..."
 source ${BASEDIR}/bin/activate ${NAME}
 
@@ -86,7 +89,7 @@ cyvlfeat=git+https://github.com/menpo/cyvlfeat@v0.4.5
 if [ "$(uname)" == "Linux" ]; then
   CFLAGS="-I${CONDA_PREFIX}/include" LDFLAGS="-L${CONDA_PREFIX}/lib -lvl -Wl,-rpath=${CONDA_PREFIX}/lib" pip --no-cache-dir install ${cyvlfeat}
 else
-  CFLAGS="-I${CONDA_PREFIX}/include" LDFLAGS="-L${CONDA_PREFIX}/lib -lvl -Wl,-headerpad_max_install_names" pip --no-cache-dir install ${cyvlfeat}
+  CFLAGS="-I${CONDA_PREFIX}/include" LDFLAGS="-L${CONDA_PREFIX}/lib -lvl" pip --no-cache-dir install ${cyvlfeat}
 fi
 
 pip --no-cache-dir install \
-- 
GitLab