hedgewars failed to build from source in Fedora rawhide/f30 https://koji.fedoraproject.org/koji/taskinfo?taskID=32399446 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Please fix hedgewars at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, hedgewars will be orphaned. Before branching of Fedora 31, hedgewars will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://fedoraproject.org/wiki/Fails_to_build_from_source
Created attachment 1530462 [details] build.log file build.log too big, will only attach last 1024 bytes
Created attachment 1530463 [details] root.log file root.log too big, will only attach last 1024 bytes
Created attachment 1530464 [details] state.log
BUILDSTDERR: clang-7clang-7: : errorerror: : unknown argument: '-fstack-clash-protection'unknown argument: '-fstack-clash-protection' BUILDSTDERR: clang-7: error: unknown argument: '-fstack-clash-protection' BUILDSTDERR: clang-7: error: unknown argument: '-fstack-clash-protection' BUILDSTDERR: clang-7: error: unknown argument: '-fstack-clash-protection' This package uses clang to build, which does not support the standard Fedora build flags. Fedora policy is to build with GCC.
Clang doesn't like -fstack-clash-protection but when I force it to build with gcc I get a lot of errors like: BUILDSTDERR: In file included from /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.c:6: BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:29:1: warning: 'overloadable' attribute directive ignored [-Wattributes] BUILDSTDERR: 29 | void __attribute__((overloadable)) fpcrtl_readLn(File f); BUILDSTDERR: | ^~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:32:1: warning: 'overloadable' attribute directive ignored [-Wattributes] BUILDSTDERR: 32 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, Integer *i); BUILDSTDERR: | ^~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:33:1: warning: 'overloadable' attribute directive ignored [-Wattributes] BUILDSTDERR: 33 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, LongWord *i); BUILDSTDERR: | ^~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:33:57: error: conflicting types for 'fpcrtl_readLn__vars' BUILDSTDERR: 33 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, LongWord *i); BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:32:57: note: previous declaration of 'fpcrtl_readLn__vars' was here BUILDSTDERR: 32 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, Integer *i); BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:34:1: warning: 'overloadable' attribute directive ignored [-Wattributes] BUILDSTDERR: 34 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, string255 *s); BUILDSTDERR: | ^~~~ BUILDSTDERR: /builddir/build/BUILD/hedgewars-src-0.9.25/project_files/hwc/rtl/fileio.h:34:57: error: conflicting types for 'fpcrtl_readLn__vars' BUILDSTDERR: 34 | void __attribute__((overloadable)) fpcrtl_readLn__vars(File f, string255 *s); BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~ https://koji.fedoraproject.org/koji/taskinfo?taskID=32749765
Ah it's using non-standard Clang extensions to allow function overloading in C (because some people insist on using C++ while kidding themselves that they're not). So it probably needs the -fstack-clash-protection flags filtered out of the cflags (or to be rewritten in proper C or proper C++).
I'm sure there's a fancy hack to remove the flag in the spec file but I'm better with CMake so I patched it out instead.