Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787662 - 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'
Summary: dev-util/mingw64-runtime-8.0.0-r1[libraries] 32bit build fails with gcc 11.1 ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceforge.net/p/mingw-w64/b...
Whiteboard: ~arch only
Keywords: PATCH
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-05-02 10:23 UTC by Mike Lothian
Modified: 2021-09-18 20:14 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log xz compressed (build.log.xz,149.30 KB, application/x-xz)
2021-05-02 10:25 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2021-05-02 10:23:19 UTC
This is with USE=libraries



Reproducible: Always
Comment 1 Mike Lothian 2021-05-02 10:25:19 UTC
Created attachment 705252 [details]
Build log xz compressed
Comment 2 Mike Lothian 2021-05-02 10:26:53 UTC
The 64bit version "cross-x86_64-w64-mingw32/mingw64-runtime-8.0.0-r1" compiles without issue
Comment 3 Mike Lothian 2021-05-02 10:44:06 UTC
/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
Comment 4 Ionen Wolkens gentoo-dev 2021-05-02 17:55:29 UTC
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.
Comment 5 Ionen Wolkens gentoo-dev 2021-05-02 18:49:06 UTC
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).
Comment 6 Mike Lothian 2021-05-02 19:36:24 UTC
Thanks that worked around it
Comment 7 Ionen Wolkens gentoo-dev 2021-05-12 19:07:10 UTC
Untested but should be fixed by:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/ab0fa5ad3c67d634fd7754d9473d1bb7051f9bf0/
Comment 8 Mike Lothian 2021-05-13 00:24:20 UTC
That did the trick thanks, and it looks like that was tagged in 8.1.0