After having updated my Mac (going from gcc-5
/ g++-5
to gcc-6
/ g++-6
) Torch installation script fails.
atcold@AlfMAC ~/torch [master*]$ ./install.sh
Prefix set to /Users/atcold/torch/install
Installing Lua version: LUAJIT21
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
/usr/local/bin/gcc-5
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
/usr/local/bin/g++-5
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Exporting CC
and CXX
does not help.
atcold@AlfMAC ~/torch [master*]$ export CC=gcc-6
atcold@AlfMAC ~/torch [master*]$ export CXX=g++-6
Does anyone have any idea what’s wrong?
I suppose it’s reading some pre-cached compiler locations, and it’s ignoring the CC
and CXX
environmental variables.
So, I believe I will open an issue, unless someone points out it’s only my problem.
Initially I was trying to clean everything with git clean -xdf
.
I’ve realised later on that submodules are independent repositories and paths
was caching some stuff there.
Later I had troubles also with the CUDA installation and compatibility with the latest clang
and clang++
compiler.
Solution
brew update
brew upgrade --all
brew cask install cuda #This fixed my second problem
cd ~/torch
git fetch
git reset --hard origin/master
git clean -xdf
git submodule update
git submodule foreach git clean -xdf #This fixed my first problem
./install.sh
In my specific case, I installed everything with gcc-6
and g++-6
and used clang
and clang++
for cutorch
and cunn
.
I hope this may help some other Mac users.
--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/4MgvD-MfEDE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.