[Bug 51849] New: Debian packaging: When building debian packages, HARDENING flags will be passed to cross-compiler
https://bugs.winehq.org/show_bug.cgi?id=51849 Bug ID: 51849 Summary: Debian packaging: When building debian packages, HARDENING flags will be passed to cross-compiler Product: Packaging Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-packages Assignee: wine-bugs(a)winehq.org Reporter: cybermax(a)dexter.no CC: dimesio(a)earthlink.net Distribution: --- When packages are built on debian, the default "hardening" flags will be passed to wine/configure. The result from this is that wine/configure tries to do checks for cross-compiler (mingw-w64) with flags meant to be used for ELF binaries. The flags are -Wl,-z,relro This causes configure to fail several checks for cross-compiler. The logs from WineHQ official OBS builds here for Debian 11: https://build.opensuse.org/public/build/Emulators:Wine:Debian/Debian_11/x86_... Failing these checks will cause mingw-w64 to create loads of warnings like: [ 1042s] In file included from dlls/cabinet/fdi.c:72: [ 1042s] dlls/cabinet/fdi.c: In function 'FDI_read_string': [ 1042s] dlls/cabinet/fdi.c:485:9: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'INT_PTR' {aka 'long long int'} [-Wformat=] [ 1042s] 485 | TRACE("(fdi == %p, hf == %ld, cabsize == %ld)\n", fdi, hf, cabsize); [ 1042s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ [ 1042s] | | [ 1042s] | INT_PTR {aka long long int} If you however build without passing -Wl,-z,relro to mingw-w64, configure will pass a lot more tests, and the compile is quite a lot less noisy: https://build.opensuse.org/build/home:SveSop/Debian_11/x86_64/wine-devel/_lo... Is there a possibility to avoid passing this flag to the cross-compiler in wine/configure? From what i gather, the -Wl,-z,relro flag is meant for ELF binaries, but afaik wine mostly (if not only) uses mingw-w64 to build PE libs, and thus these flags fail. You can add export DEB_LDFLAGS_MAINT_STRIP = -Wl,-z,relro to debian/rules, but that ofc means the ELF binaries built by gcc will not get these hardening flags. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51849 --- Comment #1 from Sveinar Søpler <cybermax(a)dexter.no> --- Created attachment 70743 --> https://bugs.winehq.org/attachment.cgi?id=70743 Logs from Debian 11 configure Attaching config.log and Makefile from debuild -us -uc -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51849 --- Comment #2 from Alexandre Julliard <julliard(a)winehq.org> --- Hopefully fixed by c7bd6865e7e9149aea3dfe56a407f6c5bcfcb0a3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51849 --- Comment #3 from Sveinar Søpler <cybermax(a)dexter.no> --- (In reply to Alexandre Julliard from comment #2)
Hopefully fixed by c7bd6865e7e9149aea3dfe56a407f6c5bcfcb0a3.
Thank you :) Does indeed seem to build without these issues when i added c7bd6865e7e9149aea3dfe56a407f6c5bcfcb0a3 on top of wine-devel-6.18 Build log from my OBS: https://build.opensuse.org/build/home:SveSop/Debian_11/x86_64/wine-devel/_lo... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51849 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |c7bd6865e7e9149aea3dfe56a40 | |7f6c5bcfcb0a3 Resolution|--- |FIXED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- Thanks, marking fixed then. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51849 Rosanne DiMesio <dimesio(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Rosanne DiMesio <dimesio(a)earthlink.net> --- Closing fixed packaging bug. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla