Bug 2157576

Summary: crash: Port to C99
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: crashAssignee: lijiang
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anderson, lijiang, sergio
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: fedora-admin-xmlrpc: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: crash-8.0.2-4.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-10 12:04:55 UTC Type: Bug
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    

Description Florian Weimer 2023-01-02 05:56:46 UTC
The crash package does not build in stricter C99 mode due to various uses of implicit int and implicit function declarations:

conftest.c:107: defaulting to int
conftest.c:121: implicit function declaration: exit
conftest.c:119: defaulting to int
conftest.c:194: implicit function declaration: exit
conftest.c:186: defaulting to int
conftest.c:211: implicit function declaration: strncmp
conftest.c:206: implicit function declaration: strlen
conftest.c:209: implicit function declaration: strcpy
conftest.c:79: defaulting to int
conftest.c:105: defaulting to int
conftest.c:111: implicit function declaration: exit
conftest.c:98: implicit function declaration: exit
conftest.c:92: implicit function declaration: strcoll
conftest.c:78: defaulting to int
conftest.c:79: defaulting to int
conftest.c:100: implicit function declaration: exit
conftest.c:96: implicit function declaration: strcmp
conftest.c:105: implicit function declaration: exit
conftest.c:111: defaulting to int
../bfd/elf-bfd.h:3085: implicit function declaration: strncmp
../bfd/elf-bfd.h:3085: implicit function declaration: strncmp

These issues cause the configure tests go wrong, as in:

checking whether we are cross compiling... yes
checking for working strncmp... no

I believe most issues should be fixed in upstream GDB, especially if linking against system readline (instead of the bundled version). Maybe it's also possible build without libdecnumber.

Usually, I would just patch this myself and move to the next package, but it's not clear to me how to patch the embedded GDB which is unpacked during the crash build process (what the conventions for that would be).

A build log with config.log dumps is available here:

https://gitlab.com/fweimer-rh/fedora-modernc-logs/-/blob/main/logs/c/crash.log

Comment 1 Sergio Basto 2023-01-04 23:51:21 UTC
> Usually, I would just patch this myself

please do it , I started maintain the package a few days ago

Comment 2 Ben Cotton 2023-02-07 15:04:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 3 Fedora Admin user for bugzilla script actions 2023-03-09 00:10:38 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 4 lijiang 2023-03-10 12:04:55 UTC
Hi, Sergio and Florian

The crash-8.0.2-4.fc39 contains several important fixes(with the C99 fixes).

https://bodhi.fedoraproject.org/updates/FEDORA-2023-e294d5ad2c

Thanks for your fix to the C99 compatibility issue, Florian.