When I run the PyTorch (0.4.1) in Anaconda everything is fine but the pip version some colleages try all result in segfault. The gcc version installed is 5.4, but I do not know which version of gcc those PyTorch binaries are compiled against if I hit this error.
The warning about ABI compatibility is always printed, regardless of when I try 4.8, 4.9 or 5.4
It took some time to see, not matter what I set to $CC or $CXX always x86_64-linux-gnu-gcc was used for building the extension, and that pointed to the old gcc. update-altenatives also did not list the multiple gccs.