Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/distro.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2016-12-25 05:36:20 +0300
committerGitHub <noreply@github.com>2016-12-25 05:36:20 +0300
commitf0bc9a61ceb3446184f459c0f3357e498c6dceb6 (patch)
treeca234258b739341f536084e3e5537e8909fe078a
parent3f2525212d3dce77b6a44e46a935fd2dda5d80ac (diff)
parent7024812a2b214a587c89e226f13c681409375eaf (diff)
Merge pull request #189 from artcg/master
Arch Linux install fix
-rwxr-xr-xinstall.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index bf6d29f..a437be5 100755
--- a/install.sh
+++ b/install.sh
@@ -51,6 +51,15 @@ if [[ `uname` == "Darwin" ]]; then
export CC=clang
export CXX=clang++
fi
+# If we're on Arch linux, use gcc v5
+if [[ `uname -a` == *"ARCH"* ]]; then
+ path_to_gcc5=$(which gcc-5)
+ if [ -x "$path_to_gcc5" ]; then
+ export CC="$path_to_gcc5"
+ else
+ echo "Warning: GCC v5 not found. CUDA v8 is incompatible with GCC v6, if installation fails, consider running \$ pacman -S gcc5"
+ fi
+fi
echo "Installing Lua version: ${TORCH_LUA_VERSION}"
mkdir -p install
@@ -65,6 +74,9 @@ path_to_nvcc=$(which nvcc)
if [ $? == 1 ]; then { # look for it in /usr/local
if [[ -f /usr/local/cuda/bin/nvcc ]]; then {
path_to_nvcc=/usr/local/cuda/bin/nvcc
+ }
+ elif [[ -f /opt/cuda/bin/nvcc ]]; then { # default path for arch
+ path_to_nvcc=/opt/cuda/bin/nvcc
} fi
} fi