Summary: | dev-util/mingw64-runtime-8.0.0-r1[libraries] 32bit build fails with gcc 11.1 i686-w64-mingw32/ld: src/.libs/libwinpthread_la-clock.o:clock.c:(.text+0x24b): undefined reference to `__udivmoddi4' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mike Lothian <mike> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bob.mt.wya, herrtimson, ionen, sam, todd |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceforge.net/p/mingw-w64/bugs/895/ | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=799212 | ||
Whiteboard: | ~arch only | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 732706 | ||
Attachments: | Build log xz compressed |
Description
Mike Lothian
2021-05-02 10:23:19 UTC
Created attachment 705252 [details]
Build log xz compressed
The 64bit version "cross-x86_64-w64-mingw32/mingw64-runtime-8.0.0-r1" compiles without issue /bin/sh ./libtool --tag=CC --mode=link i686-w64-mingw32-gcc -Wall -DWIN32_LEAN_AND_MEAN -O2 -march=native -pipe -no-undefined -version-info 1:0:0 -L./fakelib -Wc,-no-pthread -Wl,-O1 -Wl,--as-needed -o libwinpthread.la -rpath /usr/i686-w64-mingw32/usr/lib src/libwinpthread_la-barrier.lo src/libwinpthread_la-cond.lo src/libwinpthread_la-misc.lo src/libwinpthread_la-mutex.lo src/libwinpthread_la-rwlock.lo src/libwinpthread_la-spinlock.lo src/libwinpthread_la-thread.lo src/libwinpthread_la-ref.lo src/libwinpthread_la-sem.lo src/libwinpthread_la-sched.lo src/libwinpthread_la-clock.lo src/libwinpthread_la-nanosleep.lo src/version.lo libtool: link: i686-w64-mingw32-gcc -shared src/.libs/libwinpthread_la-barrier.o src/.libs/libwinpthread_la-cond.o src/.libs/libwinpthread_la-misc.o src/.libs/libwinpthread_la-mutex.o src/.libs/libwinpthread_la-rwlock.o src/.libs/libwinpthread_la-spinlock.o src/.libs/libwinpthread_la-thread.o src/.libs/libwinpthread_la-ref.o src/.libs/libwinpthread_la-sem.o src/.libs/libwinpthread_la-sched.o src/.libs/libwinpthread_la-clock.o src/.libs/libwinpthread_la-nanosleep.o src/.libs/version.o -L./fakelib -O2 -march=native -no-pthread -Wl,-O1 -Wl,--as-needed -o .libs/libwinpthread-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libwinpthread.dll.a /usr/libexec/gcc/i686-w64-mingw32/ld: src/.libs/libwinpthread_la-clock.o:clock.c:(.text+0x24b): undefined reference to `__udivmoddi4' /usr/libexec/gcc/i686-w64-mingw32/ld: src/.libs/libwinpthread_la-clock.o:clock.c:(.text+0x313): undefined reference to `__udivmoddi4' /usr/libexec/gcc/i686-w64-mingw32/ld: src/.libs/libwinpthread_la-clock.o:clock.c:(.text+0x3b9): undefined reference to `__udivmoddi4' /usr/libexec/gcc/i686-w64-mingw32/ld: src/.libs/libwinpthread_la-nanosleep.o:nanosleep.c:(.text+0x133): undefined reference to `__udivmoddi4' collect2: error: ld returned 1 exit status make[4]: *** [Makefile:680: libwinpthread.la] Error 1 make[4]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-8.0.0-r1/work/mingw-w64-v8.0.0/mingw-w64-libraries/winpthreads' make[3]: *** [Makefile:876: all-recursive] Error 1 make[3]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-8.0.0-r1/work/mingw-w64-v8.0.0/mingw-w64-libraries/winpthreads' make[2]: *** [Makefile:488: all] Error 2 make[2]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-8.0.0-r1/work/mingw-w64-v8.0.0/mingw-w64-libraries/winpthreads' make[1]: *** [Makefile:364: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-8.0.0-r1/work/mingw-w64-v8.0.0' make: *** [Makefile:305: all] Error 2 For a temporary workaround, passing -fno-expensive-optimizations should let this build. As I understand it, this is because mingw uses a fake libgcc and doesn't expect those to be generated. I'll assign these to maintainer rather than cross@ as believe it's more of an issue with mingw64 itself (thanks for opening upstream issue). Thanks that worked around it Untested but should be fixed by: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/ab0fa5ad3c67d634fd7754d9473d1bb7051f9bf0/ That did the trick thanks, and it looks like that was tagged in 8.1.0 Can this please be fixed for mingw64-runtime-8.0.0 by adding the upstream fix from sourceforge? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6411adf2ffd54418b72fd304b8cbf9ae28321293 commit 6411adf2ffd54418b72fd304b8cbf9ae28321293 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-15 07:11:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-15 07:12:27 +0000 dev-util/mingw64-runtime: fix build w/ USE=libraries Closes: https://bugs.gentoo.org/787662 Signed-off-by: Sam James <sam@gentoo.org> .../files/mingw64-runtime-8.0.0-udivmod.patch | 26 ++++++++++++++++++++++ .../mingw64-runtime-8.0.0-r1.ebuild | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) |