Bug 1225928 - Package sgmltool does not build with gcc14 because of new errors
Summary: Package sgmltool does not build with gcc14 because of new errors
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Jambor
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-06-04 12:15 UTC by Martin Jambor
Modified: 2024-07-15 11:38 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jambor 2024-06-04 12:15:56 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:
Comment 1 Martin Jambor 2024-07-15 11:18:05 UTC
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.
Comment 2 Martin Jambor 2024-07-15 11:23:23 UTC
I have created https://build.opensuse.org/request/show/1187544