https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86086
--- Comment #2 from ptdrnvqd at 10mail dot org --- same error when gcc 8.1.0, (even though added -flto missing in link flags earlier) gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.1.0-5ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04) command: (cd /home/lmint-sgt2_usrnam-01/.cache/bazel/_bazel_lmint-sgt2_usrnam-01/4b7ce482992596b3314a677549b0daa3/execroot/org_tensorflow && exec env - ANDROID_BUILD_TOOLS_VERSION=28.0.0 ANDROID_NDK_API_LEVEL=17 ANDROID_NDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk/ndk-bundle ANDROID_SDK_API_LEVEL=27 ANDROID_SDK_HOME=/home/lmint-sgt2_usrnam-01/Android/Sdk COMPUTECPP_TOOLKIT_PATH=/home/lmint-sgt2_usrnam-01/Downloads/programs/ComputeCpp-CE-0.8.0-Ubuntu-16.04-x86_64 HOST_CXX_COMPILER=/usr/bin/g++ HOST_C_COMPILER=/usr/bin/gcc PATH=/home/lmint-sgt2_usrnam-01/.nix-profile/bin:/home/lmint-sgt2_usrnam-01/.cargo/bin:/opt/OpenPrinting-Gutenprint/sbin:/opt/OpenPrinting-Gutenprint/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PWD=/proc/self/cwd PYTHON_BIN_PATH=/usr/bin/python3 PYTHON_LIB_PATH=/usr/local/lib/python3.5/dist-packages TF_DOWNLOAD_CLANG=0 TF_NEED_COMPUTECPP=1 TF_NEED_CUDA=0 TF_NEED_OPENCL_SYCL=1 /usr/bin/gcc -shared -o bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so '-Wl,-rpath,$ORIGIN/../_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib' -Lbazel-out/k8-opt/bin/_solib_k8/_U@mkl_Ulinux_S_S_Cmkl_Ulibs_Ulinux___Uexternal_Smkl_Ulinux_Slib '-Wl,-rpath,$ORIGIN/' -Wl,-soname,libtensorflow_framework.so -pthread '-fuse-ld=gold' -save-temps -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -B/usr/bin -pass-exit-codes -Wl,--gc-sections -pipe -flto -fuse-linker-plugin -g0 -s -Wl,-z,relro,-z,now -v -Wl,-O1 -Wl,--relax -Wl,--gc-sections -Wl,-S -Wl,@bazel-out/k8-opt/bin/tensorflow/libtensorflow_framework.so-2.params)