Bugzilla – Bug 1225928
Package sgmltool does not build with gcc14 because of new errors
Last modified: 2024-07-15 11:38:53 UTC
GCC 14 newly by default treats as errors a number of situations which before were only warnings. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. Because of this, package sgmltool fails to compile. This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/sgmltool/standard/x86_64 It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc The (first) error (that halts the build) is: [ 99s] std.h:95:14: error: conflicting types for ‘fpos_t’; have ‘long int’ [ 99s] 95 | typedef long fpos_t; [ 99s] | ^~~~~~ [ 99s] In file included from sgmlsasp.h:4, [ 99s] from replace.c:6:
The failures causing the build to fail all come from total misconfiguration in the sgmls-1.1 subdirectory where pretty much all snippets to test features violate C99 by not specifying a return type form main - and many also use undeclared exit and _exit and who knows what. The most conservative fix is to add -fpermissive to the invocation of ./configure in sgmls-1.1/Makefile. However, the handling of compilation flags seems rather bothed all over the place, CFLAGS (and therefore also RPM %{optflags}) are quickly lost which means we compile evertyhing with just -O (that is -O1) and without any of the fortification options that distro packages should use. I am attempting to address this - but will keep in place overriding the optimization level to -O1 to minimize chances of some fallout.
I have created https://build.opensuse.org/request/show/1187544