Bug 277101 - cad/openscad: Build failure in boost
Summary: cad/openscad: Build failure in boost
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Michael Reifenberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-16 21:54 UTC by Thomas Zander
Modified: 2024-04-04 01:38 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mr)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander freebsd_committer freebsd_triage 2024-02-16 21:54:04 UTC
Both openscad and openscad devel can't be built. Logs see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275494#c79.

Note that the openscad build failures are NOT due to python, even if it happened to be an exp-run because of the python update.
Comment 1 Osamu Matsuda 2024-02-22 04:25:01 UTC
I have the same issue.

The exact error in the build is that boost:prior is undefined as below:

  In file included from /usr/ports/cad/openscad/work/openscad-972d184/src/geometry/roof_ss.cc:6:
  In file included from /usr/local/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:20:
  In file included from /usr/local/include/CGAL/Simple_cartesian.h:20:
  In file included from /usr/local/include/CGAL/Cartesian/Cartesian_base.h:62:
  In file included from /usr/local/include/CGAL/Cartesian/function_objects.h:20:
  In file included from /usr/local/include/CGAL/Kernel/function_objects.h:29:
  In file included from /usr/local/include/CGAL/intersection_3.h:59:
  In file included from /usr/local/include/CGAL/Intersections_3/Plane_3_Triangle_3.h:25:
  /usr/local/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h:144:65: error: no member named 'prior' in namespace 'boost'
             k.construct_segment_3_object()(*pts.begin(), *boost::prior(pts.end())));
                                                           ~~~~~~~^
  1 error generated.

That is, in
/usr/local/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h
boost::prior is used without any definition.

boost::prior is actually defined in
/usr/local/include/boost/next_prior.hpp .

In a similar header file
/usr/local/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h
, it is included as #include <boost/next_prior.hpp>

So I guess boost/next_prior.hpp should also have been included in
/usr/local/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h
as shown below:

*** Plane_3_Triangle_3_intersection.h.orig      Sat Oct  8 04:05:21 2022
--- Plane_3_Triangle_3_intersection.h   Wed Feb 21 17:52:56 2024
***************
*** 18,23 ****
--- 18,24 ----

  #include <CGAL/enum.h>
  #include <CGAL/kernel_assertions.h>
+ #include <boost/next_prior.hpp>

  namespace CGAL {
  namespace Intersections {


With this patch, devel/openscad can be built.  It would also be possible to
include boost/next_prior.hpp explicitly in somewhere in the openscad
source files.  I'm not sure which is better.
Comment 2 dgilbert 2024-03-02 23:50:47 UTC
2nded.  That seems to work, but I suppose we need an inside openscad patch.
Comment 3 marius 2024-03-15 13:44:59 UTC
This is an issue with CGAL, not OpenSCAD.
This particular issue was resolved in https://github.com/CGAL/cgal/pull/7201
Comment 4 Osamu Matsuda 2024-04-04 01:38:26 UTC
math/cgal has been patched in cgal-5.5.1_2, and now cad/openscad can be built without any problem in openscad-2021.01.01.20221206_5.