Created attachment 679413 [details] build.log with dev-libs/miniz-2.1.0-r1 installed This was an interesting problem to track down, and I'm still not quite sure which package is to blame. 1. The media-gfx/prusa-slicer::haarp ebuild did not initially suffer from this issue, but failed with the same error after I unsuccessfully tried to emerge media-gfx/prusaslicer::gentoo (which installed dev-libs/miniz-2.1.0-r1). 2. PrusaSlicer prefers a system-wide version of miniz, but has a bundled version as a fallback. The ::haarp version relies on the bundled version, while ::gentoo installs a system-wide version as a dependency. 3. miniz consists of multiple different .h/.c files, which are typically amalgamated into one miniz.h / miniz.c, so that it can be used as a single source file library. Confusingly, both of these files already exist in the repository, but are then appended to in the amalgamation process. This amalgamated version is then offered as a .zip for each release, the .tar.gz contains the individual files. The CMake file provides an AMALGAMATE_SOURCES option to generate the amalgamation in a different directory, but that is off by default. 4. The version bundled with PrusaSlicer is amalgamated, so PrusaSlicer only includes miniz.h, expecting everything to be defined there. dev-libs/miniz-2.1.0 provides the un-amalgamated version, so the compiler misses some important definitions. Using emerge --nodeps (to skip just dev-libs/miniz), the ebuild finishes successfully and works as expected. Sidenote: yes, the ::haarp ebuild does not compile without the two patches in the ::gentoo ebuild.
Created attachment 682513 [details, diff] 2.3.0 version bump + fixes.patch Was about to look into this bug but noticed prusaslicer-2.3.0 just released so thought I'd fix this + other bugs + bump. See patch's message for changes from 2.2.0-r1 (may still be things I overlooked) However the patch has two requirements to be used: 1. qhull needs fixing libqhullcpp is not provided, see patch from bug #764338 as a possible solution (adds static-libs) 2. miniz needs fixing as well I was confused while testing given my own built libminiz.so worked while the system's was missing symbols such as mz_zip_zero_struct Turns out this is because of this in gentoo's miniz patch (works if not set): +set_property(TARGET ${PROJECT_NAME} PROPERTY C_VISIBILITY_PRESET hidden) That aside, please test because I don't actually use/know this software (gui does start fine at least), I only wanted to help fix building it given seems to see interest from users and looks like a good addition to main ::gentoo
(In reply to Ionen Wolkens from comment #1) > 1. qhull needs fixing > libqhullcpp is not provided, see patch from bug #764338 as a possible > solution (adds static-libs) On that note, it may be necessary to limit version to >=2020.2-r3 if not backporting qhull fixes. Current version builds "with" 2015.2 only because it fails to detect it and uses its bundled copy. Feel free to modify/use anything I provided as seen fit.
After patching/adjusting qhull and miniz, your prusaslicer-2.3.0 builds fine for me, and some quick fiddling around and slicing with the software hasn't brought up any irregularities.
Created attachment 682774 [details, diff] dev-libs/miniz: allow symbols visibility patch I haven't really reviewed miniz but dumping the minimal fix here as well, next time I'll probably start using PRs given changes/notes are accumulating. But all 3 patches should give a working prusaslicer-2.3.0 (In reply to Sophie Hirn from comment #3) > After patching/adjusting qhull and miniz, your prusaslicer-2.3.0 builds fine > for me, and some quick fiddling around and slicing with the software hasn't > brought up any irregularities. Good to know, thanks for checking.
(In reply to Ionen Wolkens from comment #4) > next time I'll probably start using PRs Actually, please wait to review/merge any of this. I'm noticing the dependency list needs more work, and I need to verify a few other things. So I'll just do a PR with all 3 commits when ready.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fc943a7edd78e5ba3c0d42f053ca1e966e0032a commit 4fc943a7edd78e5ba3c0d42f053ca1e966e0032a Author: Ionen Wolkens <sudinave@gmail.com> AuthorDate: 2021-01-12 07:35:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-02-05 02:06:42 +0000 media-gfx/prusaslicer: 2.3.0 version bump + fixes ebuild changes from 2.2.0-r1 to 2.3.0: + REQUIRED_USE on gui for tests (bug #760096) + patch to add missing miniz header (bug #761541) + qhull:=[static-libs] (qhull_r.so subslot + qhullcpp.a, bug #764338) + force GTK3 (bug #765031) + GUI deps optional with USE=-gui + hopefully all missing dependencies - Release build type, not needed - previous patches (applied upstream) + use .desktop files provided by the package + update licenses + minor cleanups Closes: https://bugs.gentoo.org/760096 Closes: https://bugs.gentoo.org/761541 Closes: https://bugs.gentoo.org/764338 Closes: https://bugs.gentoo.org/765031 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Ionen Wolkens <sudinave@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/19059 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/prusaslicer/Manifest | 1 + .../files/prusaslicer-2.3.0-miniz-zip-header.patch | 9 +++ media-gfx/prusaslicer/prusaslicer-2.3.0.ebuild | 86 ++++++++++++++++++++++ 3 files changed, 96 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37f0e16ff077f94d6e4de1f5481af94d5ca0ce36 commit 37f0e16ff077f94d6e4de1f5481af94d5ca0ce36 Author: Ionen Wolkens <sudinave@gmail.com> AuthorDate: 2021-01-13 22:20:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-02-05 02:06:42 +0000 dev-libs/miniz: don't set visibility to hidden Needed by prusaslicer and symbols such as mz_zip_zero_struct Bug: https://bugs.gentoo.org/761541 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Ionen Wolkens <sudinave@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-libs/miniz/files/miniz-2.1.0-export-cmake-build-targets.patch | 4 +--- dev-libs/miniz/{miniz-2.1.0-r1.ebuild => miniz-2.1.0-r2.ebuild} | 0 2 files changed, 1 insertion(+), 3 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec1154b20bd709f9f9fa366b1a023d074c340220 commit ec1154b20bd709f9f9fa366b1a023d074c340220 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-02-05 08:55:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-02-05 08:55:15 +0000 media-gfx/prusaslicer: depend on newer miniz This should force a nudge to the newer miniz. Ensures that we get the export fixes from a previous commit. I use "Fixes" liberally here just so we have a reference to the commit I mean. Ionen did no wrong ;) Fixes: 37f0e16ff077f94d6e4de1f5481af94d5ca0ce36 Bug: https://bugs.gentoo.org/761541 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/prusaslicer/prusaslicer-2.3.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Great work, thanks everybody!
Further patching will be needed in the next versions. Background: https://github.com/prusa3d/PrusaSlicer/issues/2333