https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84862
Bug ID: 84862 Summary: collect2: fatal error: lto-wrapper returned 1 exit status Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ajayc at nvidia dot com Target Milestone: --- compilation fails with newer gcc version while release build, while linking fails with compiler internal error. command line: gcc-6_2_0/bin/g++ -fPIC -flto --sysroot=ubuntu_12_04/sysroot -Wall -Werror -Wno-unused-value -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function -Wunused-result -Wno-address -Wno-format-zero-length -Wno-unused-local-typedefs -Wno-write-strings -Wno-overflow -Wno-parentheses -Wno-char-subscripts -Wno-attributes -Wno-deprecated-declarations -Wno-ignored-attributes -g -std=gnu++11 -D_GLIBCXX_USE_NANOSLEEP -fsigned-char -fexceptions -frtti -fPIC -DNV_AGORA -O3 -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing -flto -fPIC -Wl,--no-undefined -Wl,--unresolved-symbols=ignore-in-shared-libs -lpthread -static-libstdc++ -Xlinker -Bsymbolic -Xlinker --default-symver -Xlinker -shared -Wl,-soname, gcc -v output: Target: x86_64-pc-linux-gnu Using built-in specs. Configured with: /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/configure LDFLAGS=-static --prefix=/home/eaverin/Downloads/gcc-build-dev/install --enable-languages=c,c++ --disable-bootstrap --with-sysroot=/ Thread model: posix gcc version 6.2.0 (GCC lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:202 0x449922 add_symbol_to_partition_1 /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:202 0x449743 add_references_to_partition /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:92 0x4498c8 add_symbol_to_partition_1 /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:175 0x4499ec add_symbol_to_partition_1 /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:160 0x4499ec add_symbol_to_partition_1 /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:160 0x44a72b lto_balanced_map(int) /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto-partition.c:546 0x44398c do_whole_program_analysis /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto.c:3122 0x44398c lto_main() /home/eaverin/Downloads/gcc-build-dev/gcc-6.2.0/gcc/lto/lto.c:331