Bug 2157576 - crash: Port to C99
Summary: crash: Port to C99
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: crash
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: lijiang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCHelpNeeded
TreeView+ depends on / blocked
 
Reported: 2023-01-02 05:56 UTC by Florian Weimer
Modified: 2023-03-10 12:04 UTC (History)
3 users (show)

Fixed In Version: crash-8.0.2-4.fc39
Clone Of:
Environment:
Last Closed: 2023-03-10 12:04:55 UTC
Type: Bug
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-689 0 None None None 2023-01-02 06:06:55 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.