NixOS install fails, "builder for ...gcc-9.2.0.drv' failed with exit code 2"

Hello,

I try to install NixOS on my computer (ASUS ZENBOOK UX303L, 2012). The installation starts to compile gettext, bison, … and fails with GCC:

gcc> g++ -std=gnu++98 -no-pie   -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -o cc1plus \
gcc> cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/method.o cp/name-lookup.o cp/optimize.o cp/parser.o cp/pt.o cp/ptree.o cp/repo.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o glibc-c.o cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -L/nix/store/bmnspbby9kyg0mh244h7hby1y8z7psxp-isl-0.17.1/lib -lisl -L/nix/store/8scnhqd5bwrixvml6bh8g6n044gw4hvj-gmp-6.2.0/lib -L/nix/store/gckh34chai15z972n78kq1jkmjjka5f5-mpfr-4.0.2/lib -L/nix/store/lhsj1dq9x39zcypgyrjv39mwsw209g2s-libmpc-1.1.0/lib -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
gcc> collect2: error: ld returned 1 exit status
gcc> collect2: error: ld returned 1 exit status
gcc> make[3]: *** [../../gcc-9.2.0/gcc/lto/Make-lang.in:81: lto1] Error 1
gcc> make[3]: *** Waiting for unfinished jobs....
gcc> make[3]: *** [../../gcc-9.2.0/gcc/c/Make-lang.in:85: cc1] Error 1
gcc> collect2: error: ld returned 1 exit status
gcc> make[3]: *** [../../gcc-9.2.0/gcc/cp/Make-lang.in:120: cc1plus] Error 1
gcc> rm gcc.pod
gcc> make[3]: Leaving directory '/build/build/gcc'
gcc> make[2]: *** [Makefile:4665: all-stage1-gcc] Error 2
gcc> make[2]: Leaving directory '/build/build'
gcc> make[1]: *** [Makefile:22125: stage1-bubble] Error 2
gcc> make[1]: Leaving directory '/build/build'
gcc> make: *** [Makefile:23016: profiledbootstrap] Error 2
builder for '/nix/store/dpzj4mxh84r5zpwn27is9jshjcypanil-gcc-9.2.0.drv' failed with exit code 2; last 10 log lines:
  make[3]: *** [../../gcc-9.2.0/gcc/c/Make-lang.in:85: cc1] Error 1
  collect2: error: ld returned 1 exit status
  make[3]: *** [../../gcc-9.2.0/gcc/cp/Make-lang.in:120: cc1plus] Error 1
  rm gcc.pod
  make[3]: Leaving directory '/build/build/gcc'
  make[2]: *** [Makefile:4665: all-stage1-gcc] Error 2
  make[2]: Leaving directory '/build/build'
  make[1]: *** [Makefile:22125: stage1-bubble] Error 2
  make[1]: Leaving directory '/build/build'
  make: *** [Makefile:23016: profiledbootstrap] Error 2
cannot build derivation '/nix/store/72aldiwid5bxjncz1jffmrnc2z2vmnxm-bootstrap-stage4-gcc-wrapper-9.2.0.drv': 1 dependencies couldn't be built

For a longer log context: gcc> else \gcc> build/genchecksum c/c-lang.o c-family/stub-objc.o attribs.o c/ - Pastebin.com

Could you help me understand the problem?

Thanks

1 Like