https://bugs.winehq.org/show_bug.cgi?id=52418
Bug ID: 52418 Summary: run-time linking issues Product: Wine Version: 7.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ismael@iodev.co.uk Distribution: ---
Wine builds fine but then running any application results in errors like the following:
$ winecfg 002c:err:module:LdrInitializeThunk "ws2_32.dll" failed to initialize, aborting 002c:err:module:LdrInitializeThunk Initializing dlls for L"C:\windows\system32\wineboot.exe" failed, status c0000142 003c:err:module:LdrInitializeThunk "comctl32.dll" failed to initialize, aborting 003c:err:module:LdrInitializeThunk Initializing dlls for L"C:\windows\system32\winecfg.exe" failed, status c0000005
https://bugs.winehq.org/show_bug.cgi?id=52418
--- Comment #1 from Ismael Luceno ismael@iodev.co.uk --- The system uses musl libc instead of glibc, if that's relevant.
https://bugs.winehq.org/show_bug.cgi?id=52418
Ismael Luceno ismael@iodev.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Other
https://bugs.winehq.org/show_bug.cgi?id=52418
--- Comment #2 from Alex Xu alex_y_xu@yahoo.ca --- as I already explained to ismael on irc, this is caused by wine dlopening libraries by full path and then expecting NEEDED to be satisfied by filename/SONAME. musl does not implement this behavior. it can be fixed in wine by setting rpath like https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/wine/rp..., but since there are discussions whether to implement SONAME matching behavior in musl to match other libcs, i have not submitted this patch to wine.
https://bugs.winehq.org/show_bug.cgi?id=52418
--- Comment #3 from Ismael Luceno ismael@iodev.co.uk --- It seems to me the expectation doesn't conform to the ELF spec. It would be nice if someone knowledgable could give a reference to something that tells us if this behavior can be expected or not. If not, then specifying rpath would be mandatory.
https://bugs.winehq.org/show_bug.cgi?id=52418
--- Comment #4 from Ismael Luceno ismael@iodev.co.uk --- The ELF spec mentions DT_SONAME being optional, and dlopen implementations don't seem to require it; additionally I can find no reference about satisfying a DT_NEEDED based on a cached DT_SONAME entry or otherwise, so maybe should be regarded as an optimization not to be relied upon.
https://bugs.winehq.org/show_bug.cgi?id=52418
--- Comment #5 from Ismael Luceno ismael@iodev.co.uk --- I can now confirm that rpath.patch solves the issue.
https://bugs.winehq.org/show_bug.cgi?id=52418
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|run-time linking issues |run-time linking issues | |when building wine with | |musl libc
https://bugs.winehq.org/show_bug.cgi?id=52418
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de