Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787665 - app-emulation/wine-staging-6.7 USE=mingw fails with gcc 11.1 /usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/brush.cross.o:brush.c:(.text+0x1baf): undefined reference to `sincos'
Summary: app-emulation/wine-staging-6.7 USE=mingw fails with gcc 11.1 /usr/libexec/gcc...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Wine Maintainers
Depends on:
Blocks: gcc-11
  Show dependency tree
Reported: 2021-05-02 10:30 UTC by Mike Lothian
Modified: 2021-06-11 21:24 UTC (History)
4 users (show)

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

Build log xz compressed (build.log.xz,100.64 KB, application/x-xz)
2021-05-02 10:31 UTC, Mike Lothian

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2021-05-02 10:30:42 UTC
wine-staging fails to be built with gcc / mingw 11.1, looks like the maths library isn't linked

Reproducible: Always
Comment 1 Mike Lothian 2021-05-02 10:31:33 UTC
Created attachment 705255 [details]
Build log xz compressed
Comment 2 Mike Lothian 2021-05-02 10:32:08 UTC
/usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/brush.cross.o:brush.c:(.text+0x1baf): undefined reference to `sincos'
/usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/factory.cross.o:factory.c:(.text+0x31ef): undefined reference to `sincos'
/usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/factory.cross.o:factory.c:(.text+0x3705): undefined reference to `sincos'
/usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/geometry.cross.o:geometry.c:(.text+0x60b4): undefined reference to `sincos'
tools/winegcc/winegcc -o dlls/d3d11/d3d11.dll --wine-objdir . -b i686-w64-mingw32 --lib-suffix=.cross.a \
  -Wl,--wine-builtin -shared \
  /var/tmp/portage/app-emulation/wine-staging-6.7/work/wine-6.7/dlls/d3d11/d3d11.spec -mno-cygwin \
  dlls/d3d11/async.cross.o dlls/d3d11/buffer.cross.o dlls/d3d11/d3d11_main.cross.o \
  dlls/d3d11/device.cross.o dlls/d3d11/inputlayout.cross.o dlls/d3d11/shader.cross.o \
  dlls/d3d11/state.cross.o dlls/d3d11/texture.cross.o dlls/d3d11/utils.cross.o \
  dlls/d3d11/view.cross.o dlls/d3d11/version.res dlls/dxguid/libdxguid.cross.a \
  dlls/uuid/libuuid.cross.a dlls/dxgi/libdxgi.cross.a dlls/wined3d/libwined3d.cross.a \
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/i686-w64-mingw32-gcc failed
make: *** [Makefile:38027: dlls/d2d1/d2d1.dll] Error 2
make: *** Waiting for unfinished jobs....
Comment 3 Mike Lothian 2021-05-02 10:46:55 UTC
This might be related to the libraries might need to be rebuilt with gcc 11.1
Comment 4 Mike Lothian 2021-05-02 19:52:17 UTC
Rebuilding mingw64-runtime, didn't help, neither did adding it's work around
Comment 5 Ionen Wolkens gentoo-dev 2021-05-05 08:05:06 UTC
Seems(?) to have something to do with gcc's builtins which include sincos. Guess gcc11 is doing something different in that regard (wine-vanilla also affected).

So, for another temporary workaround, adding -fno-builtin to CFLAGS should let it build.
Comment 6 Mike Lothian 2021-05-05 09:43:58 UTC
That workaround worked, cheers
Comment 7 Ionen Wolkens gentoo-dev 2021-06-11 21:24:31 UTC
Haven't been able to reproduce this since wine-staging:6.9

I'll take the liberty to mark this obsolete.