Blog IndexPosts by TagHome

Torch on GCC 6.2 (Fedora 24)

Posted <2016-11-16 Wed 22:37> by Aaron S. Jackson.

It is possible, you just have to set some environmental variables.

export CFLAGS="-std=gnu99"
export CXXFLAGS="-std=gnu++98"
export CMAKE_C_FLAGS=$CFLAGS
export CMAKE_CXX_FLAGS=$CXXFLAGS

And then we can install…

git clone https://github.com/torch/distro.git ~/.torch --recursive
export MAKEFLAGS="-j8"
./install-deps
./install.sh

I ended up putting these in .bashrc so they would be used for anything I was compiling. It is more likely that something needing a newer spec will pass -std=c++14 to GCC than something old passing -std=c++98. I am not a big fan of GCC's decision to switch to the newer spec by default, especially since they must know this would break stuff.

Also, if you run into an error from a CUDA header saying you're using an unsupported compiler, just go to that header's line and delete the line that is throwing the error. It will work fine. NVIDIA is just being pedantic for the sake of support.

Wanting to leave a comment?

Comments and feedback are welcome by email (aaron@nospam-aaronsplace.co.uk).

Related posts:

Tags: linux

Blog IndexPosts by TagHome

Copyright 2007-2022 Aaron S. Jackson (compiled: Sun 2 Jan 00:24:10 GMT 2022)