I am updating a travis file to use the new bionic VMs. The build system is CMake.
While everything seems to work fine with g++, with clang the build fails when compiling a shared library, mentioning the infamouse gxx personality linker error and mentioning -fPic. Additionally CMake can’t enable LTO optimization with clang.
Given that fPic was passed, and that on my local machine everything works fine (I’m comparing the log builds line by line, the only differences seems to be the binaries paths), so I’m wondering whether there are some differences with the linker with the default settings between g++ and clang that could be causing this.
You can see the LTO failure at line 766, while the linker error at line 2385 (of the clang build). The line numbers are similar for the working g++ build.