https://bugs.winehq.org/show_bug.cgi?id=52478
Bug ID: 52478 Summary: wine-staging 7.1 build fails in Ubuntu 18.04 Product: Wine-staging Version: 7.1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: dimesio@earthlink.net CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Created attachment 71767 --> https://bugs.winehq.org/attachment.cgi?id=71767 Ubuntu 18.04 build log
All the other builds succeeded.
[ 970s] dlls/xactengine3_7/xact_dll.c: In function 'fact_notification_cb': [ 970s] dlls/xactengine3_7/xact_dll.c:862:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:866:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_WAVEDESTROYED: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:867:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_WAVELOOPED: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:868:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_WAVEPLAY: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:869:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_WAVEPREPARED: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:871:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_WAVESTOP: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:881:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_CUEPLAY: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:882:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_CUEPREPARED: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:883:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_CUESTOP: [ 970s] ^~~~ [ 970s] dlls/xactengine3_7/xact_dll.c:886:9: error: case label does not reduce to an integer constant [ 970s] case XACTNOTIFICATIONTYPE_CUEDESTROYED: [ 970s] ^~~~ [ 970s] Makefile:147527: recipe for target 'dlls/xactengine2_7/xact_dll.cross.o' failed
https://bugs.winehq.org/show_bug.cgi?id=52478
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=52478
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #1 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Same issue on Debian 8 Jessie.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=52478
--- Comment #2 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Created attachment 71776 --> https://bugs.winehq.org/attachment.cgi?id=71776 Replace switch with if-else
Hello,
This patch fixes the compilation for me.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=52478
--- Comment #3 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- (In reply to Olivier F. R. Dierick from comment #2)
Created attachment 71776 [details] Replace switch with if-else
Hello,
This patch fixes the compilation for me.
Regards.
I've just added a patch to cast the values, which should work as well.
https://bugs.winehq.org/show_bug.cgi?id=52478
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Alistair Leslie-Hughes from comment #3)
I've just added a patch to cast the values, which should work as well.
The patch fixes the build for Ubuntu 18.04.
https://bugs.winehq.org/show_bug.cgi?id=52478
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- This does not fix the build for me on Arch, gcc 11.1.0. I don't know why a cast to int fixes it on Ubuntu, but a case is not allowed to be a static const int.
https://bugs.winehq.org/show_bug.cgi?id=52478
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|wine-staging 7.1 build |wine-staging 7.1 build |fails in Ubuntu 18.04 |fails
https://bugs.winehq.org/show_bug.cgi?id=52478
--- Comment #6 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
--- quote from dlls/xactengine3_7/xact_dll.c --- (...) static inline void unwrap_notificationdesc(FACTNotificationDescription *fd, (...) /* we can't use a switch statement, because the constants are static const * variables, and some compilers can't deal with that */
/* Supports SoundBank, Cue index, Cue instance */ if (fd->type == FACTNOTIFICATIONTYPE_CUEPREPARED || fd->type == FACTNOTIFICATIONTYPE_CUEPLAY || (...) --- end quote ---
If we want to be consistent with existing code, I don't think we have a choice.
Please consider using the attached patch for Staging. I think it's logically correct and will fix the issue for all compilers.
Regards.