Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 924105

Summary: media-gfx/superslicer-2.5.59.2-r2 fails to compile: MeshBoolean.cpp:150:5: error: cannot bind non-const lvalue reference of type CGAL::SM_Vertex_index& to an rvalue of type boost::iterators::detail::iterator_facade_base<CGAL::Surface_mesh<CGAL::Point_3<C
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: 3D Printing Team <3dprint>
Status: CONFIRMED ---    
Severity: normal CC: asturm, brutus_dansereau, fluffysheap, frechter, gentoo-bugzilla, gentoo.2019, r.schedel
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
Patch to fix constness in MeshBoolean.cpp
Still fails later with meshboolean patch applied
superslicer-2.5.59.8-boost-replace-load-string-file.patch

Description Agostino Sarubbo gentoo-dev 2024-02-08 13:22:49 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-gfx/superslicer-2.5.59.2-r2 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)
System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-08 13:22:52 UTC
Created attachment 884565 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-02-08 13:22:52 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


-- Could NOT find CURL (missing: CURL_DIR)
FAILED: src/libslic3r/CMakeFiles/libslic3r_cgal.dir/MeshBoolean.cpp.o 
/var/tmp/portage/media-gfx/superslicer-2.5.59.2-r2/work/SuperSlicer-2.5.59.2/src/libslic3r/MeshBoolean.cpp:150:5: error: cannot bind non-const lvalue reference of type 'CGAL::SM_Vertex_index&' to an rvalue of type 'boost::iterators::detail::iterator_facade_base<CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >::Index_iterator<CGAL::SM_Vertex_index>, CGAL::SM_Vertex_index, std::random_access_iterator_tag, CGAL::SM_Vertex_index, long int, false, false>::reference' {aka 'CGAL::SM_Vertex_index'}
Comment 3 Robert Schedel 2024-02-11 21:19:27 UTC
IMHO happened after marking sci-mathematics/cgal-5.6 stable recently.
After masking (i.e. using cgal-5.5.2), builds again.
Comment 4 Robert Schedel 2024-02-12 07:02:08 UTC
Created attachment 884767 [details, diff]
Patch to fix constness in MeshBoolean.cpp

Own local constness fix patch under /etc/portage/patches/media-gfx/superslicer-2.5.59.2-r2/ allows to build again with latest CGAL 5.6.

List of patches increases, more so when trying to build newer versions.
Maybe latest 2.5.59.7 release comment, indicating more time towards development, will improve situation?
Comment 5 Sylvain 2024-02-16 23:45:29 UTC
Created attachment 885172 [details]
Still fails later with meshboolean patch applied


MeshBoolean patch fixes an error but it still fails for me later on.

/var/tmp/portage/media-gfx/superslicer-2.5.59.2-r2/work/SuperSlicer-2.5.59.2/src/slic3r/GUI/ScriptExecutor.cpp:13:10: fatal error: boost/filesystem/string_file.hpp: No such file or directory
Comment 6 Robert Schedel 2024-02-17 18:23:28 UTC
> MeshBoolean patch fixes an error but it still fails for me later on.
> 
> /var/tmp/portage/media-gfx/superslicer-2.5.59.2-r2/work/SuperSlicer-2.5.59.2/
> src/slic3r/GUI/ScriptExecutor.cpp:13:10: fatal error:
> boost/filesystem/string_file.hpp: No such file or directory

different topic, wrt newer Boost 1.84.0 stable, dropping deprecated string_file -> bug 918510
Comment 7 Robert G. Siebeck 2024-03-04 16:46:37 UTC
Created attachment 886706 [details, diff]
superslicer-2.5.59.8-boost-replace-load-string-file.patch

(In reply to Sylvain from comment #5)
> Created attachment 885172 [details]
> Still fails later with meshboolean patch applied
> 
> 
> MeshBoolean patch fixes an error but it still fails for me later on.
> 
> /var/tmp/portage/media-gfx/superslicer-2.5.59.2-r2/work/SuperSlicer-2.5.59.2/
> src/slic3r/GUI/ScriptExecutor.cpp:13:10: fatal error:
> boost/filesystem/string_file.hpp: No such file or directory

I fixed the patch (see attachment) to address this.
Comment 8 Niklaus 'vimja' Hofer 2024-03-11 13:35:55 UTC
I can confirm this is still an issue, both on x86 and aarch64 - current ebuild (2.5.59.2-r2) fails to build with the same error when compiling MehsBoolean.
Comment 9 William T Wilson 2024-03-16 03:50:11 UTC
The current upstream version is 2.5.59.8, perhaps the newest version has dealt with this issue.

With the MeshBoolean and load-string patches, I'm able to build 2.5.59.2-r2.
Comment 10 Yotam Frechter 2024-04-14 17:46:15 UTC
Best option is to follow snova at https://forums.gentoo.org/viewtopic-p-8818654.html and install the upstream 2.5.59.8 version entirely. He gives a very good explanation at the end of his thread.