On 05/05/2017 08:39 PM, Thomas Plank wrote: > I'm trying to build gcc 7.1 under cygwin32. > Older versions like 6.3 worked, but for 7.1 I'm getting: > > undefined reference to `___divmoddi4' > > This happens when I call "make install", because make went fine. > Any ideas what I'm missing, I could not find anything relevant? > TIA > > > log: > g++ -std=gnu++98 -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-7.1.0/gcc -I../../gcc-7.1.0/gcc/. -I../../gcc-7.1.0/gcc/../include -I../../gcc-7.1.0/gcc/../libcpp/include -I/usr/local/include -I../../gcc-7.1.0/gcc/../libdecnumber -I../../gcc-7.1.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-7.1.0/gcc/../libbacktrace -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c > g++ -std=gnu++98 -no-pie -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -Wl,--stack,12582912 -o cc1.exe 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/c-array-notation.o c/c-fold.o c/gimple-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-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-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o c-family/c-attribs.o c-family/c-warn.o i386-c.o msformat-c.o default-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 -lintl -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lisl -L/usr/local/lib -lmpc -lmpfr -lgmp -L./../zlib -lz > c-family/c-pretty-print.o: In function `_Z12tree_to_shwiPK9tree_node': > /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree.h:4121: undefined reference to `___divmoddi4' > cfgloopmanip.o: In function `set_zero_probability': > /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/cfgloopmanip.c:1114: undefined reference to `___divmoddi4' > expr.o: In function `emit_group_load_1': > /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/expr.c:2178: undefined reference to `___divmoddi4' > fold-const.o: In function `fold_plusminus_mult_expr': > /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/fold-const.c:6967: undefined reference to `___divmoddi4' > tree-sra.o: In function `build_user_friendly_ref_for_offset': > /cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree-sra.c:1843: undefined reference to `___divmoddi4' > tree-ssa-loop-prefetch.o:/cygdrive/f/buildgcc710/gcc/../../gcc-7.1.0/gcc/tree-ssa-loop-prefetch.c:854: more undefined references to `___divmoddi4' follow > collect2: error: ld returned 1 exit status > make[2]: *** [../../gcc-7.1.0/gcc/c/Make-lang.in:85: cc1.exe] Error 1 > make[2]: Leaving directory '/cygdrive/f/buildgcc710/gcc' > make[1]: *** [Makefile:4878: install-gcc] Error 2 > make[1]: Leaving directory '/cygdrive/f/buildgcc710' > make: *** [Makefile:2326: install] Error 2 > > Looks like something wrong with libgcc? Check the libgcc symbols from 7.1.0 and the installed version. Not sure if you can workaround by installing libgcc first.
Attachment:
signature.asc
Description: OpenPGP digital signature