diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-12-25 05:36:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-25 05:36:20 +0300 |
commit | f0bc9a61ceb3446184f459c0f3357e498c6dceb6 (patch) | |
tree | ca234258b739341f536084e3e5537e8909fe078a | |
parent | 3f2525212d3dce77b6a44e46a935fd2dda5d80ac (diff) | |
parent | 7024812a2b214a587c89e226f13c681409375eaf (diff) |
Merge pull request #189 from artcg/master
Arch Linux install fix
-rwxr-xr-x | install.sh | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |