Hi anbe and nvidia team, During debconf Ximin and I have figured out a workaround to make NVCC work with GCC-8. Using this workaround I have successfully compiled src:caffe-contrib.
CXXFLAGS += -std=c++03 -D__GNUC__=8 We need to make GCC-8 disguise to be GCC-6, and downgrade CXX standard to c++03. I don't know whether this works for other packages, but at least src:caffe-contrib will get rid of GCC-6 for the next upload.