Bug 2319589

Summary: SFCGAL: FTBFS in Fedora Rawhide
Product: [Fedora] Fedora Reporter: Laurent Rineau <laurent.rineau__fedora>
Component: SFCGALAssignee: Paul Wouters <paul.wouters>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: italo.garcia+fedora, laurent.rineau__fedora, nick.farrell, orange, paul.wouters, redhatbugs, releng, rj.layco, rominf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/SFCGAL
Whiteboard:
Fixed In Version: SFCGAL-2.0.0-1.el10_0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 08:59:05 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: 2260875, 2300528    
Attachments:
Description Flags
Buildable .spec
none
Build log f42 none

Description Laurent Rineau 2024-10-18 07:50:34 UTC
Description of problem:
Package SFCGAL fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.5.0-1.fc42

Steps to Reproduce:
koji build --scratch f42 SFCGAL-1.5.0-1.fc42.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/SFCGAL

Comment 1 Laurent Rineau 2024-10-18 07:58:37 UTC
SFCGAL has an upstream patch in a merge-request:

  https://gitlab.com/sfcgal/SFCGAL/-/merge_requests/325

That merge-request was merged before the new release SFCGAL 2.0.0:

  https://gitlab.com/sfcgal/SFCGAL/-/releases/v2.0.0

Comment 2 Zenon Panoussis 2025-01-15 18:44:35 UTC
(In reply to Laurent Rineau from comment #1)
> SFCGAL has an upstream patch in a merge-request:
> 
>   https://gitlab.com/sfcgal/SFCGAL/-/merge_requests/325

There have been other changes upstream before that patch, so it doesn't apply cleanly to the f42 source. For example, if you apply this 

--- src/algorithm/straightSkeleton.cpp
+++ src/algorithm/straightSkeleton.cpp
@@ -379,10 +385,9 @@ approximateMedialAxis(const Geometry &g) -> std::unique_ptr<MultiLineString>
   extractPolygons(g, polys);
 
   for (auto &poly : polys) {
-    Kernel::Vector_2           trans;
-    Polygon_with_holes_2 const polygon = preparePolygon(poly, trans);
-    boost::shared_ptr<Straight_skeleton_2> const skeleton =
-        straightSkeleton(polygon);
+    Kernel::Vector_2                      trans;
+    Polygon_with_holes_2 const            polygon = preparePolygon(poly, trans);
+    SHARED_PTR<Straight_skeleton_2> const skeleton = straightSkeleton(polygon);
 
     if (skeleton == nullptr) {
       BOOST_THROW_EXCEPTION(

you end up with this

  extractPolygons(g, polys);

  for (auto &poly : polys) {
    Kernel::Vector_2                      trans;
    Polygon_with_holes_2 const            polygon = preparePolygon(poly, trans);
    SHARED_PTR<Straight_skeleton_2> const skeleton = straightSkeleton(polygon);

    if (!skeleton.get()) {
      BOOST_THROW_EXCEPTION(

where the penultimate line is not what it should be.

Comment 3 Zenon Panoussis 2025-01-16 16:45:32 UTC
Results of building upstream release 1.5.2 in mock:

- epel10 with CGAL-6.0.1 fails at the same point and with the same error as the koji 1.5.0-1 build.
- epel10 with CGAL-5.6.2 fails at algorithm/union.cpp.o with "Error: unknown pseudo-op '.lbb7'".
- epel9  with CGAL-5.6.2 succeeds.
- epel9  with CGAL-6.0.1 fails at the same point and with the same error as the koji 1.5.0-1 build.

Results of building  upstream release 2.0.0 in mock:

- epel10 with CGAL-6.0.1 succeeds building 100% but then fails in doc.
- epel10 with CGAL-5.6.2 idem

[100%] Built target SFCGAL
gmake[1]: Leaving directory '/builddir/build/BUILD/SFCGAL-v2.0.0/redhat-linux-build'
/usr/bin/cmake -E cmake_progress_start /builddir/build/BUILD/SFCGAL-v2.0.0/redhat-linux-build/CMakeFiles 0

+ cd doc
+ doxygen
error: Doxyfile not found and no input file specified!

The doc directory is in /builddir/build/BUILD/SFCGAL-v2.0.0/ and it does contain Doxyfile.in. There is no doc in redhat-linux-build/ .

Comment 4 Zenon Panoussis 2025-01-17 14:21:28 UTC
Created attachment 2066458 [details]
Buildable .spec

Tested, builds correctly for both epel10 and f42

Comment 5 Zenon Panoussis 2025-01-17 14:22:54 UTC
Created attachment 2066459 [details]
Build log f42

Comment 6 Laurent Rineau 2025-01-23 15:47:02 UTC
*** Bug 2339865 has been marked as a duplicate of this bug. ***

Comment 7 Laurent Rineau 2025-01-23 15:50:11 UTC
In the duplicated bug #2339865#c0, the bot was warning "SFCGAL will be retired":

> SFCGAL failed to build from source in Fedora rawhide/f42
> 
> https://koji.fedoraproject.org/koji/taskinfo?taskID=127928997
> 
> 
> For details on the mass rebuild see:
> 
> https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
> Please fix SFCGAL at your earliest convenience and set the bug's status to
> ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
> SFCGAL will be orphaned. Before branching of Fedora 43,
> SFCGAL will be retired, if it still fails to build.

Comment 8 Zenon Panoussis 2025-01-23 17:51:33 UTC
> In the duplicated bug #2339865#c0, the bot was warning "SFCGAL will be
> retired":

"if it still fails to build", but now it does build. According to https://fedora.pkgs.org/rawhide/fedora-x86_64/SFCGAL-1.5.0-1.fc42.x86_64.rpm.html , only postgis depends on SFCGAL. And I have built postgis-f42 with SFCGAL-2.0.0, in its turn built against CGAL-6.0.1, so to me it seems that SFCGAL-2.0.0 can now move on to QA and into f42.

Comment 9 Laurent Rineau 2025-02-07 16:36:00 UTC
I have updated the spec file according to the patch proposed by you in 2319589#c4.

It is built now in Rawhide (F43): https://bodhi.fedoraproject.org/updates/FEDORA-2025-c6022e6999

I still have to backport it to F42. And maybe in EPEL. On in EPEL10?

Comment 10 Laurent Rineau 2025-02-07 17:11:57 UTC
For F42, the build+update is done: https://bodhi.fedoraproject.org/updates/FEDORA-2025-6a03036a2e

For EPEL10, I messed-up, and I need help from releng: https://pagure.io/releng/issue/12572 ... Sorry.

Comment 11 Fedora Update System 2025-02-10 08:55:48 UTC
FEDORA-EPEL-2025-eb821d56bd (SFCGAL-2.0.0-1.el10_0) has been submitted as an update to Fedora EPEL 10.0.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-eb821d56bd

Comment 12 Laurent Rineau 2025-02-10 08:59:05 UTC
SFCGAL v2.0.0, compiled with CGAL 6.0.1, is now is f43 (rawhide), f42, and epel10. Closing this issue.

Comment 13 Fedora Update System 2025-02-11 03:13:50 UTC
FEDORA-EPEL-2025-eb821d56bd has been pushed to the Fedora EPEL 10.0 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-eb821d56bd

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

Comment 14 Fedora Update System 2025-02-19 00:33:47 UTC
FEDORA-EPEL-2025-eb821d56bd (SFCGAL-2.0.0-1.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository.
If problem still persists, please make note of it in this bug report.