diff --git a/gitlab/before_test.sh b/gitlab/before_test.sh
index 3709c10f2ba1b13c92d1b24b23a642033dac1a8c..bd8e081044918768a0bffb0c2749f10fba13f474 100755
--- a/gitlab/before_test.sh
+++ b/gitlab/before_test.sh
@@ -20,7 +20,7 @@ fi
 
 # zc.recipe.egg needs some special installation instructions
 if [ "${CI_PROJECT_NAME}" == "bob.buildout" ]; then
-  run_cmd ${use_pip} install --upgrade --no-binary ":all:" zc.recipe.egg
+  run_cmd_ld ${use_pip} install --upgrade --no-binary ":all:" zc.recipe.egg
 fi
 
-run_cmd ${use_pip} install --upgrade --use-wheel --no-index --pre dist/*.whl
+run_cmd_ld ${use_pip} install --upgrade --use-wheel --no-index --pre dist/*.whl
diff --git a/gitlab/build.sh b/gitlab/build.sh
index 28833cd97c81bb674fcf9df4e41526c5fbc4e799..f59b27d8b4607dde5892a0d7373fa58190d4a438 100755
--- a/gitlab/build.sh
+++ b/gitlab/build.sh
@@ -5,23 +5,18 @@ source $(dirname ${0})/functions.sh
 
 run_cmd_ld ./bin/buildout
 
-# Corrects the virtualenv to take LD_LIBRARY_PATH into account
-if [ ${ARCH} == "linux" ]; then
-  fix_venv
-fi
-
 if [ -x ./bin/bob_dbmanage.py ]; then
-  run_cmd ./bin/bob_dbmanage.py all download --force;
+  run_cmd_ld ./bin/bob_dbmanage.py all download --force;
 fi
 
 if [ -d ./doc ]; then
-  run_cmd ./bin/sphinx-build doc sphinx
+  run_cmd_ld ./bin/sphinx-build doc sphinx
 fi
 
 if [ -z "${WHEEL_TAG}" ]; then
   # C/C++ extensions
-  run_cmd ./bin/python setup.py bdist_wheel
+  run_cmd_ld ./bin/python setup.py bdist_wheel
 else
   # Python-only packages
-  run_cmd ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
+  run_cmd_ld ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
 fi
diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 8cc6b8c5027a7d592cf2bb6a95c53761798e509b..eec9fb9fe45027bce2c3decdc8a383f9bd6abaa6 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -73,7 +73,7 @@ run_cmd_ld() {
 
 # Runs setup.py
 setup() {
-  run_cmd ${PREFIX}/bin/python setup.py ${@}
+  run_cmd_ld ${PREFIX}/bin/python setup.py ${@}
 }
 
 
diff --git a/gitlab/test.sh b/gitlab/test.sh
index 85ac251a22e2d266cfd12bc0d394d4b91c7051d3..434de6c14df77f095535661432785a9dd65270a6 100755
--- a/gitlab/test.sh
+++ b/gitlab/test.sh
@@ -6,8 +6,8 @@ source $(dirname ${0})/functions.sh
 run_cmd cd ${PREFIX}
 
 # The tests:
-run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage run --source=${CI_PROJECT_NAME} ${BOB_PREFIX_PATH}/bin/nosetests -sv ${CI_PROJECT_NAME}
-run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage report
-run_cmd ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/sphinx-build -b doctest ${CI_PROJECT_DIR}/doc ${CI_PROJECT_NAME}/sphinx
+run_cmd_ld ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage run --source=${CI_PROJECT_NAME} ${BOB_PREFIX_PATH}/bin/nosetests -sv ${CI_PROJECT_NAME}
+run_cmd_ld ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/coverage report
+run_cmd_ld ${PREFIX}/bin/python ${BOB_PREFIX_PATH}/bin/sphinx-build -b doctest ${CI_PROJECT_DIR}/doc ${CI_PROJECT_NAME}/sphinx
 
 run_cmd cd ${CI_PROJECT_DIR}