id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12565,LTO Build Fails with lockpool.o: not an object or archive,amit.prakash.ambasta@…,timblechmann,"Hi, While compiling boost with LTO on both gcc and llvm/clang, the following error occurs: /usr/bin/x86_64-pc-linux-gnu-ld: error: bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o:1:3: invalid character /usr/bin/x86_64-pc-linux-gnu-ld: error: bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o:1:3: syntax error, unexpected $end /usr/bin/x86_64-pc-linux-gnu-ld: error: bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o: not an object or archive The compile and link statements in full are below: Build: -------------------------------------------------------------------------- ""clang++"" -ftemplate-depth-128 -O2 -pipe -march=haswell -flto=thin -stdlib=libc++ -flto=thin -std=c++14 -finline-functions -Wno-inline -Wall -pthread -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I""."" -c -o ""bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o"" ""libs/atomic/src/lockpool.cpp"" Link: -------------------------------------------------------------------------- ""x86_64-pc-linux-gnu-clang++"" -o ""bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/libboost_atomic.so.1.62.0"" -Wl,-h -Wl,libboost_atomic.so.1.62.0 -shared -Wl,--start-group ""bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o"" -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -Wl,-O1 -Wl,--as-needed -pthread -m64 Verbose: -------------------------------------------------------------------------- ""/usr/bin/x86_64-pc-linux-gnu-ld"" --eh-frame-hdr -m elf_x86_64 -shared -o bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/libboost_atomic.so.1.62.0 /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtbeginS.o -use-gold-plugin -use-gold-plugin -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64 -L/usr/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../.. -L/usr/bin/../lib -L/lib -L/usr/lib -h libboost_atomic.so.1.62.0 --start-group bin.v2/libs/atomic/build/gcc-4.2/gentoorelease/boost.locale.icu-off/pch-off/threading-multi/lockpool.o -Bstatic -Bdynamic -lrt --end-group -O1 --as-needed -lc++ -lm -lgcc_s -lpthread -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crtn.o",Bugs,closed,To Be Determined,atomic,Boost 1.61.0,Problem,invalid,,amit.prakash.ambasta@…