Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873535 - app-emulation/wine-proton-7.0.4 fails to link without -lm added to LDFLAGS
Summary: app-emulation/wine-proton-7.0.4 fails to link without -lm added to LDFLAGS
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-29 23:21 UTC by Mike Lothian
Modified: 2022-09-30 00:32 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2022-09-29 23:21:51 UTC
temp/build.log:vulkan.c:(.text+0x115f7): undefined reference to `ceil'
temp/build.log:/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: vulkan.c:(.text+0x11616): undefined reference to `ceil'

I don't have the complete build log any more

[ebuild   R    ] app-emulation/wine-proton-7.0.4:7.0.4::gentoo  USE="alsa crossdev-mingw custom-cflags fontconfig gecko gstreamer mono nls openal pulseaudio ssl udev udisks unwind usb v4l vkd3d xcomposite -debug -llvm-libunwind -osmesa -perl -sdl (-selinux) -xinerama" ABI_X86="32 64" 0 KiB

gcc (mingw) 12.2.0 with binutils 2.39-r2

CFLAGS="-O3 -march=native -pipe -fno-builtin"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lm"

Adding the -lm got things working
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-29 23:23:37 UTC
Given your tendency to hit issues, can I suggest:

PORTAGE_ELOG_CLASSES="warn error info log qa"
PORTAGE_ELOG_SYSTEM="echo save"
PORTAGE_LOGDIR="/var/log/portage"
FEATURES="${FEATURES} clean-logs split-log"

in make.conf, to preserve them?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-29 23:23:49 UTC
(also, emerge --info please, it does matter)
Comment 3 Ionen Wolkens gentoo-dev 2022-09-29 23:30:47 UTC
Does it still fail if you disable custom-cflags?

That old -fno-builtin workaround should be obsolete and may instead be causing issues.

Also given I see crossdev-mingw, what version of mingw64-runtime? (if it doubt, you can turn that off and mingw64-toolchain should work).
Comment 4 Mike Lothian 2022-09-29 23:34:53 UTC
I've not tested that yet

I added it for wine-staging and that still builds fine

mingw64-runtime 10.0.0-r1

I installed wine-proton to see if Ubi Connect would run and it does (it doesn't under wine-staging)

Will add better logs and a few tests once I'm finished
Comment 5 Ionen Wolkens gentoo-dev 2022-09-29 23:56:21 UTC
Yeah, tried and this is caused by -fno-builtin

mingw builds are sensible to the way gcc optimize stuff, can lead to different functions being used like gcc changing sin and cos to sincos() despite mingw didn't have sincos (bug #787665). I assume similar is happening here and unexpectedly end up  needing libm because the builtin is disabled.

Given -fno-builtin is rather obscure I don't think it makes sense to strip it in the ebuild (not done by strip-flags unfortunately), please just remove it.

(In reply to Mike Lothian from comment #4)
> I installed wine-proton to see if Ubi Connect would run and it does (it
> doesn't under wine-staging)
Sounds like that may(?) be using the bcrypt stuff (with libgcrypt), it used to be in wine-staging but got removed (still present in proton). Not that I really read the story here.
Comment 6 Mike Lothian 2022-09-30 00:32:47 UTC
Confirmed, dropping -fno-builtin gets things working without adding -lm

Thanks

The Ubi Connect bug I think is in dxgi or one of the directx libraries