Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 787665

Summary: 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'
Product: Gentoo Linux Reporter: Mike Lothian <mike>
Component: Current packagesAssignee: Wine Maintainers <wine>
Status: RESOLVED OBSOLETE    
Severity: normal CC: carlphilippreh, ionen, jstein, luke
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: Build log xz compressed

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 \
  dlls/ucrtbase/libucrtbase.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 https://bugs.gentoo.org/787662 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.