Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936652 - media-gfx/openscad-2021.01-r5 fails to compile: config.h:147:2: error: error CGAL requires C++ 17
Summary: media-gfx/openscad-2021.01-r5 fails to compile: config.h:147:2: error: error ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Paul Zander
URL:
Whiteboard:
Keywords: PATCH
: 942751 (view as bug list)
Depends on: 946112
Blocks:
  Show dependency tree
 
Reported: 2024-07-26 07:27 UTC by Agostino Sarubbo
Modified: 2024-12-24 05:58 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,99.26 KB, application/x-xz)
2024-07-26 07:27 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-07-26 07:27:20 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-gfx/openscad-2021.01-r5 fails to compile.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-07-26 07:27:22 UTC
Created attachment 898344 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Michael Weiser 2024-08-06 12:17:15 UTC
As the message says, this is due to sci-mathematics/cgal-6.0_beta1 requiring C++ 17: https://www.cgal.org/2024/06/21/cgal60-beta1/#general-changes.

Downgrading to 5.6.1 solves the issue. So does patching openscad's c++std.pri like so:

--- openscad-2021.01/c++std.pri.prog	2024-08-05 21:35:46.484782450 +0200
+++ openscad-2021.01/c++std.pri	2024-08-05 21:35:55.098192923 +0200
@@ -26,8 +26,8 @@
 }
 
 c++std {
-  CONFIG += c++14 strict_c++
-  message("Using C++14")
+  CONFIG += c++17 strict_c++
+  message("Using C++17")
 
   *clang*: {
       # 3rd party libraries will probably violate this for a long time
Comment 3 Michael Weiser 2024-08-06 14:18:33 UTC
See also https://bugs.gentoo.org/937456.
Comment 4 Rémi Cardona 2024-10-03 07:06:00 UTC
patch in comment #2 works for me as well. Freecad then built correctly (can't tell how or where openscad is used by it and thus if it's all ok).
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-05 07:17:12 UTC
*** Bug 942751 has been marked as a duplicate of this bug. ***
Comment 6 Attila Tóth 2024-11-07 20:23:11 UTC
(In reply to Rémi Cardona from comment #4)
> patch in comment #2 works for me as well. Freecad then built correctly
> (can't tell how or where openscad is used by it and thus if it's all ok).

Same here.
Comment 7 Luke Schwager 2024-11-15 18:01:00 UTC
Dropping the patch from comment #2 into a file `/etc/portage/patches/media-gfx/openscad-2021.01-r5/0001-fix-c++std.patch` fixed the build for me. Thank you Micheal!
Comment 8 Paul Zander 2024-11-17 18:42:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b809ad20e706bf9af8c0a918f3b47701efc4e9e4

commit b809ad20e706bf9af8c0a918f3b47701efc4e9e4
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: Sat Nov 16 02:52:12 2024 +0100
Commit:     Sam James <sam@gentoo.org>
CommitDate: Sat Nov 16 21:39:07 2024 +0000

    media-gfx/openscad: add 20241114
    
    Drop RESTRICT=mirror.
    Document manifold USE-flag.
    Drop qt5 support.
    Bundle sanitizers-cmake as there is and likely never will be another consumer.
    Force CONFIG mode for FindBoost.
    Eigen3 is a header-only library and we do not have public headers, so it's
    DEPEND only.
    Add egl and glx USE-flags.
    
    Adjust ebuild style to fit the rest my ebuilds.
    
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-gfx/openscad/Manifest                        |   3 +-
 media-gfx/openscad/metadata.xml                    |   6 +
 ...ad-20241111.ebuild => openscad-20241114.ebuild} | 134 +++++++++++----------
 profiles/arch/amd64/package.use.mask               |   4 +
 profiles/arch/base/package.use.mask                |   4 +
 5 files changed, 87 insertions(+), 64 deletions(-)
Comment 9 Barnabás Virágh 2024-12-23 15:45:32 UTC
I have the exact same issue. I don't see any patches in the commit that closed this bug. Why it is closed (I was about to create the exact same bug ticket, as didn't find an open one on this topic)? I think the bug is still there: can't build with the mentioned error message:
.[01m.[K/usr/include/CGAL/config.h:147:2:.[m.[K .[01;31m.[Kerror: .[m.[K#error "CGAL requires C++ 17"
Comment 10 Barnabás Virágh 2024-12-23 16:23:32 UTC
(In reply to Michael Weiser from comment #2)
> As the message says, this is due to sci-mathematics/cgal-6.0_beta1 requiring
> C++ 17: https://www.cgal.org/2024/06/21/cgal60-beta1/#general-changes.
> 
> Downgrading to 5.6.1 solves the issue. So does patching openscad's
> c++std.pri like so:
> 
> --- openscad-2021.01/c++std.pri.prog	2024-08-05 21:35:46.484782450 +0200
> +++ openscad-2021.01/c++std.pri	2024-08-05 21:35:55.098192923 +0200
> @@ -26,8 +26,8 @@
>  }
>  
>  c++std {
> -  CONFIG += c++14 strict_c++
> -  message("Using C++14")
> +  CONFIG += c++17 strict_c++
> +  message("Using C++17")
>  
>    *clang*: {
>        # 3rd party libraries will probably violate this for a long time

Adding this as user-patch to portage folder makes the application emerge. Thank you for it.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-24 05:05:27 UTC
Which version are you building? 20241114 should be built with C++17 as an upstream change.