What version of GCC do you build libtorch with?

I’ve seen people say they’ve successfully build with GCC 5.4.0, and so have I, but has anyone built with anything more recent on Linux?

I’m having problems integrating into a larger project that I think is due to using such different compilers, and the larger project does not compile with 5.4, hence why I’m asking. Any 6.somethings maybe? Using CUDA 9.2

I’ve been one of the people who used GCC 5 for a long time.
With recent cuda (I’m currently on 9.2) supporting newer GCC I had switched to 6 and this week (because I had trouble with MKLDNN’s use of -werror) to gcc 7.
For my (CPU only) laptop, I always use the default compiler of Debian/unstable, currently gcc 8.2.0.

Best regards

Thomas

Thanks for the info. I think I ran into the same problem with 6 last week.

As long as nvcc doesn’t complain, I’d not be too concerned these days. 4.8 (or whatever it was) vs. later was a huge pain for this C++11 ABI issue, but I haven’t had any trouble past that.

Best regards

Thomas

Thanks. I’ve build Pytorch in GCC 7 just now. Things have been coming together nicely in the past six weeks.

1 Like

Is there any step by step guide on how to build Pytorch from source using gcc / g++ >5? I need to get libtorch from source on my macOS, but I keep getting error after error.

The README.md has instructions to build from source and CONTRIBUTING.md may also have some more details. Feel free to file an issue on GitHub with the error output if the build isn’t working.

In EasyBuild, we got as far as GCC 10, and I’m struggling with GCC 11. There’s a number of small things failing with it. Check Easybuild’s github repo for the patches applied in order to get it to work with GCC10…