noonien / docker-openwrt-buildroot

A docker container for the OpenWRT buildroot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make: "collect2: error: ld returned 1 exit status"

sanderjo opened this issue · comments

Within the docker containger:

A "make" results in an error.
A "make V=s" results in detailed errors:

Tips how to solve this? Should I set things before doing the make?

Details: x86_64 system, with 512MB RAM.

cd home/openwrt/openwrt/
make
make V=s

...
make[6]: Entering directory '/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/gcc'
x86_64-linux-gnu-gcc   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.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-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 tree-mudflap.o glibc-c.o \
  cc1-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 -lstdc++  -L/home/openwrt/openwrt/staging_dir/host/lib -L/home/openwrt/openwrt/staging_dir/host/lib -L/home/openwrt/openwrt/staging_dir/host/lib -lmpc -lmpfr -lgmp -rdynamic -ldl -lstdc++ -L../zlib -lz
collect2: error: ld returned 1 exit status
/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/gcc/c/Make-lang.in:78: recipe for target 'cc1' failed
make[6]: *** [cc1] Error 1
make[6]: Leaving directory '/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/gcc'
Makefile:3909: recipe for target 'all-gcc' failed
make[5]: *** [all-gcc] Error 2
make[5]: Leaving directory '/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final'
Makefile:857: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final'
Makefile:76: recipe for target '/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/.built' failed
make[3]: *** [/home/openwrt/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/.built] Error 2
make[3]: Leaving directory '/home/openwrt/openwrt/toolchain/gcc/final'
toolchain/Makefile:86: recipe for target 'toolchain/gcc/final/compile' failed
make[2]: *** [toolchain/gcc/final/compile] Error 2
make[2]: Leaving directory '/home/openwrt/openwrt'
toolchain/Makefile:85: recipe for target '/home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/stamp/.toolchain_install' failed
make[1]: *** [/home/openwrt/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory '/home/openwrt/openwrt'
/home/openwrt/openwrt/include/toplevel.mk:171: recipe for target 'world' failed
make: *** [world] Error 2

Update:

I've raised the RAM from 0.5GB to 1GB, and created 19GB free disk space, and I'm now running the make again ... it's still running.

So, maybe a RAM/diskspace problem? Let's wait for the result.

Do you still experience this issue?