Bug 2257412

Summary: rawstudio: FTBFS for multiple reasons
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: rawstudioAssignee: Sergio Basto <sergio>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: giallu, sergio
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: rawstudio-2.1-0.37.20210527.gitc140a5e.s20231112gitc753388.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-22 01:26:30 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
rawstudio-libxml2.patch
none
rawstudio-c99.patch none

Description Florian Weimer 2024-01-09 12:38:31 UTC
The package no longer builds because of the libxml2 transition, and will fail to build with GCC 14 due to various programming errors. I fixed some of them, but I am now stuck on this issue, which looks like a real bug due to memory corruption:

../../plugins/colorspace-transform/rs-cmm.c: In function 'is_profile_gamma_22_co
rrected':
../../plugins/colorspace-transform/rs-cmm.c:406:64: error: passing argument 1 of 'cmsBuildGamma' from incompatible pointer type
  406 |                 gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(&context,1.0);
      |                                                                ^~~~~~~~
      |                                                                |
      |                                                                gint * {aka int *}
In file included from ../../plugins/colorspace-transform/rs-cmm.c:21:
/usr/include/lcms2.h:1205:61: note: expected 'cmsContext' {aka 'struct _cmsContext_struct *'} but argument is of type 'gint *' {aka 'int *'}
 1205 | CMSAPI cmsToneCurve*     CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma);
      |                                                  ~~~~~~~~~~~^~~~~~~~~

The actual type (internal to lcms2) I believe looks like this:

$ $ gdb /lib64/liblcms2.so.2
…
(gdb) ptype struct _cmsContext_struct                                           
type = struct _cmsContext_struct {
    struct _cmsContext_struct *Next;
    _cmsSubAllocator *MemPool;
    void *chunks[16];
    _cmsMemPluginChunkType DefaultMemoryManager;
}


Reproducible: Always

Comment 1 Florian Weimer 2024-01-09 12:39:07 UTC
Created attachment 2007927 [details]
rawstudio-libxml2.patch

Comment 2 Florian Weimer 2024-01-09 12:39:36 UTC
Created attachment 2007928 [details]
rawstudio-c99.patch

Beginnings of the GCC 14 compatibility fixes.

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

Comment 4 Fedora Update System 2024-05-13 00:31:44 UTC
FEDORA-2024-4cae481ed9 (rawstudio-2.1-0.37.20210527.gitc140a5e.s20231112gitc753388.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-4cae481ed9

Comment 5 Fedora Update System 2024-05-14 03:16:19 UTC
FEDORA-2024-4cae481ed9 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4cae481ed9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4cae481ed9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-05-22 01:26:30 UTC
FEDORA-2024-4cae481ed9 (rawstudio-2.1-0.37.20210527.gitc140a5e.s20231112gitc753388.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.