Bug 2255223

Summary: 0ad: Potential miscompilation of embedded mozjs runtime (and GCC 14 compatibility in general)
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: 0adAssignee: Kalev Lember <kalevlember>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: cheese, david08741, igor.raits, klember, paulo.cesar.pereira.de.andrade, tasksynctest, walter.pete
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-16 07:49:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    
Attachments:
Description Flags
libzip patch for building with GCC 14 none

Description Florian Weimer 2023-12-19 11:24:16 UTC
GCC 14 will introduce new errors, potentially altering the autoconf detection results for this package.

*** GCC errors begin ***
configure:2402: implicit-function-declaration: XtMalloc
configure:2402: implicit-function-declaration: XtMalloc
*** GCC errors end ***

Autoconf logged this information:

configure:2406: /usr/bin/gcc -std=gnu99 -o conftest -O2  -fexceptions -g -grecor
d-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-dec
laration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_G
LIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protect
or-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -
fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-f
rame-pointer -mno-omit-leaf-frame-pointer   -Wl,-z,relro -Wl,--as-needed  -Wl,-z
,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/re
dhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-
notes   conftest.c -lXt  1>&5
configure: In function 'main':
configure:2402:1: error: implicit declaration of function 'XtMalloc'
configure: failed program was:
#line 2399 "configure"
#include "confdefs.h"
int main() {
XtMalloc()
; return 0; }

But I don't know how this probe is used during the build. This comes from a nested tarball.

Reproducible: Always

Comment 1 Florian Weimer 2023-12-19 11:26:09 UTC
Created attachment 2004978 [details]
libzip patch for building with GCC 14

I got more of 0ad to build with this patch.

But I'm stuck with this C++ error (out of scope for my C porting work). It's potentially related to the libxml2 transition.

../../../source/ps/XML/RelaxNG.cpp: In member function ‘bool RelaxNGValidator::ValidateEncoded(xmlDocPtr) const’:
../../../source/ps/XML/RelaxNG.cpp:162:50: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive]
  162 |         xmlRelaxNGSetValidStructuredErrors(ctxt, &relaxNGErrorHandler, NULL);
      |                                                  ^~~~~~~~~~~~~~~~~~~~
      |                                                  |
      |                                                  void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)}

Comment 2 Kalev Lember 2024-01-22 13:15:22 UTC
Thanks! I backported a fix for the libxml2 build issue, https://src.fedoraproject.org/rpms/0ad/c/b4ce22175d6b4b3cd9e33de37fbb271dd4183b3c?branch=rawhide and applied your patch as https://src.fedoraproject.org/rpms/0ad/c/1f85746e294087dd1b44841b604bdc8fcae532b6?branch=rawhide

Looks like it's building fine now - does it look good to you now? Would be nice to upstream the fixes, but it's a bit of a mess with 2 layers of bundling - libzip bundled in premake which is in turn bundled in 0ad. Did you by any chance submit the fixes somewhere already?

Comment 3 Aoife Moloney 2024-02-15 23:08:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 4 Fedora Admin user for bugzilla script actions 2025-03-19 03:36:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Aoife Moloney 2025-04-25 10:12:48 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Aoife Moloney 2025-05-16 07:49:24 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.