Skip to content

super-slicer: fix build with GCC 14#362194

Merged
bendlas merged 1 commit intoNixOS:masterfrom
FliegendeWurst:super-slicer-fix
Dec 9, 2024
Merged

super-slicer: fix build with GCC 14#362194
bendlas merged 1 commit intoNixOS:masterfrom
FliegendeWurst:super-slicer-fix

Conversation

@FliegendeWurst
Copy link
Member

@FliegendeWurst FliegendeWurst commented Dec 5, 2024

Continued from #361477

Things done

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 5, 2024
@bendlas
Copy link
Contributor

bendlas commented Dec 5, 2024

I'm getting a build error, when applying this on latest unstable:

± nix-build . -A super-slicer-latest
this derivation will be built:
  /nix/store/47j1v340k32jn3v46bjkzqi9k42xdzlr-super-slicer-2.4.58.5.drv
building '/nix/store/47j1v340k32jn3v46bjkzqi9k42xdzlr-super-slicer-2.4.58.5.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/vfqwfnc0m23mlndi80amcfagyk3dddrn-source
source root is source
Running phase: patchPhase
substituteStream() in derivation super-slicer-2.4.58.5: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'src/PrusaSlicer.cpp')
substituteStream() in derivation super-slicer-2.4.58.5: WARNING: pattern list\(APPEND\ wxWidgets_LIBRARIES\ libexpat\) doesn't match anything in file 'src/CMakeLists.txt'
substituteStream() in derivation super-slicer-2.4.58.5: WARNING: pattern libexpat doesn't match anything in file 'src/libslic3r/CMakeLists.txt'
applying patch /nix/store/a1vdclpnypig8j0n419590qjk9vgqdki-superslicer-2.4.58.3-boost-1.79-port-v2.patch
patching file src/hints/HintsToPot.cpp
patching file src/libslic3r/AppConfig.cpp
patching file src/libslic3r/AppConfig.hpp
patching file src/libslic3r/LocalesUtils.cpp
patching file src/libslic3r/Preset.cpp
patching file src/slic3r/GUI/CreateMMUTiledCanvas.cpp
patching file src/slic3r/GUI/DesktopIntegrationDialog.cpp
patching file src/slic3r/GUI/GUI_App.cpp
patching file src/slic3r/GUI/HintNotification.cpp
patching file src/slic3r/GUI/Preferences.cpp
patching file src/slic3r/GUI/ScriptExecutor.cpp
applying patch /nix/store/xgd5yzxl0ln024327ipsz2kdjmdslcwf-meshboolean-const.patch
patching file src/libslic3r/MeshBoolean.cpp
Hunk #1 FAILED at 147.
1 out of 1 hunk FAILED -- saving rejects to file src/libslic3r/MeshBoolean.cpp.rej
error: builder for '/nix/store/47j1v340k32jn3v46bjkzqi9k42xdzlr-super-slicer-2.4.58.5.drv' failed with exit code 1;
       last 23 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/vfqwfnc0m23mlndi80amcfagyk3dddrn-source
       > source root is source
       > Running phase: patchPhase
       > substituteStream() in derivation super-slicer-2.4.58.5: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'src/PrusaSlicer.cpp')
       > substituteStream() in derivation super-slicer-2.4.58.5: WARNING: pattern list\(APPEND\ wxWidgets_LIBRARIES\ libexpat\) doesn't match anything in file 'src/CMakeLists.txt'
       > substituteStream() in derivation super-slicer-2.4.58.5: WARNING: pattern libexpat doesn't match anything in file 'src/libslic3r/CMakeLists.txt'
       > applying patch /nix/store/a1vdclpnypig8j0n419590qjk9vgqdki-superslicer-2.4.58.3-boost-1.79-port-v2.patch
       > patching file src/hints/HintsToPot.cpp
       > patching file src/libslic3r/AppConfig.cpp
       > patching file src/libslic3r/AppConfig.hpp
       > patching file src/libslic3r/LocalesUtils.cpp
       > patching file src/libslic3r/Preset.cpp
       > patching file src/slic3r/GUI/CreateMMUTiledCanvas.cpp
       > patching file src/slic3r/GUI/DesktopIntegrationDialog.cpp
       > patching file src/slic3r/GUI/GUI_App.cpp
       > patching file src/slic3r/GUI/HintNotification.cpp
       > patching file src/slic3r/GUI/Preferences.cpp
       > patching file src/slic3r/GUI/ScriptExecutor.cpp
       > applying patch /nix/store/xgd5yzxl0ln024327ipsz2kdjmdslcwf-meshboolean-const.patch
       > patching file src/libslic3r/MeshBoolean.cpp
       > Hunk #1 FAILED at 147.
       > 1 out of 1 hunk FAILED -- saving rejects to file src/libslic3r/MeshBoolean.cpp.rej
       For full logs, run 'nix log /nix/store/47j1v340k32jn3v46bjkzqi9k42xdzlr-super-slicer-2.4.58.5.drv'.

@FliegendeWurst
Copy link
Member Author

I moved the custom patches to postPatch.

@srounce
Copy link
Contributor

srounce commented Dec 6, 2024

Can happily confirm that super-slicer-beta builds again and works correctly.

I've found that the postInstall is also incorrect for super-slicer packages. It should be as below, otherwise the OCCTWrapper.so that is output to the bin directory will fail to load. This is done in the original prusa-slicer derivation but postInstall is set to null in super-slicer.

    postInstall = ''
      mkdir -p "$out/lib"
      mv -v $out/bin/*.so $out/lib/
    '';

I'd submit a PR for this but given the build is currently broken I'll hold off until this PR is merged.

@ofborg ofborg bot requested review from cab404 and hesiod December 6, 2024 22:44
Copy link
Contributor

@srounce srounce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three attributes (super-slicer, super-slicer-beta, super-slicer-latest) are building and functional again.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 8, 2024
@bendlas
Copy link
Contributor

bendlas commented Dec 9, 2024

Works. Thanks for the fix!

@bendlas bendlas merged commit 1008102 into NixOS:master Dec 9, 2024
vcunat pushed a commit that referenced this pull request Jan 6, 2025
(cherry picked from commit 1008102 from PR #362194)
Uh, this wouldn't pick cleanly due to mass reformatting (oh yeah),
so some manual fixups were needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants