Bug 1222637 - emacs package does not build with gcc14
Summary: emacs package does not build with gcc14
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-04-10 15:16 UTC by Martin Jambor
Modified: 2024-07-02 08:30 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-04-10 15:16:26 UTC
Emacs package does not build with gcc 14, which treats as errors a
number of situations which were only warnings before (see bug 1220571
for more details).  The error is:

xsettings.c: In function 'apply_xft_settings':
xsettings.c:846:25: error: implicit declaration of function 'round' [-Wimplicit-function-declaration]
  846 |       oldsettings.dpi = round(oldsettings.dpi);
      |                         ^~~~~
xsettings.c:67:1: note: include '<math.h>' or provide a declaration of 'round'
   66 | #include <cairo/cairo-ft.h>
  +++ |+#include <math.h>
   67 | #endif

It seems that the problem comes from SUSE specific patch
emacs-25.1-custom-fonts.patch.  Adding #include <math.h> to it results in a successfully finished build.

As of 10th April 2024, this can be conveniently tested locally with:
  osc build --alternative-project home:rguenther:nextgcc
Comment 1 Dr. Werner Fink 2024-04-11 06:51:10 UTC
Just moved the

 #include <math.h>

in src/xsettings.c from Xft section into the global section, build is running
Comment 2 OBSbugzilla Bot 2024-04-11 07:55:03 UTC
This is an autogenerated message for OBS integration:
This bug (1222637) was mentioned in
https://build.opensuse.org/request/show/1166776 Factory / emacs
Comment 3 Dr. Werner Fink 2024-05-22 06:11:53 UTC
(In reply to OBSbugzilla Bot from comment #2)
> This is an autogenerated message for OBS integration:
> This bug (1222637) was mentioned in
> https://build.opensuse.org/request/show/1166776 Factory / emacs