unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 63d2a45be1c685781633cf8836e070ec8a8debfe 1361 bytes (raw)
name: gnu/packages/patches/prusa-slicer-backport-fix-5542.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
This patch backports a solution for the issue:
https://github.com/prusa3d/PrusaSlicer/issues/5542
that causes PrusaSlicer to crash when invoked
from the command line by means of the $PATH variable.
This fix is applied in:
https://github.com/prusa3d/PrusaSlicer/commit/293f85b6cf9b805af93b9f79f5ff878b6d673969
quite after the release of 2.3.3, so this backport is needed.

diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp
index b0df2c99a..31e30af81 100644
--- a/src/PrusaSlicer.cpp
+++ b/src/PrusaSlicer.cpp
@@ -28,6 +28,7 @@
 #include <boost/nowide/cenv.hpp>
 #include <boost/nowide/iostream.hpp>
 #include <boost/nowide/integration/filesystem.hpp>
+#include <boost/dll/runtime_symbol_info.hpp>
 
 #include "unix/fhs.hpp"  // Generated by CMake from ../platform/unix/fhs.hpp.in
 
@@ -612,7 +613,9 @@ bool CLI::setup(int argc, char **argv)
     // Detect the operating system flavor after SLIC3R_LOGLEVEL is set.
     detect_platform();
 
-    boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
+    // See Invoking prusa-slicer from $PATH environment variable crashes #5542
+    // boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
+    boost::filesystem::path path_to_binary = boost::dll::program_location();
 
     // Path from the Slic3r binary to its resources.
 #ifdef __APPLE__

debug log:

solving 63d2a45be1 ...
found 63d2a45be1 in https://yhetil.org/guix-patches/e2620c20-2558-6770-266f-a039eed4cf91@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/e2620c20-2558-6770-266f-a039eed4cf91@gmail.com/
diff --git a/gnu/packages/patches/prusa-slicer-backport-fix-5542.patch b/gnu/packages/patches/prusa-slicer-backport-fix-5542.patch
new file mode 100644
index 0000000000..63d2a45be1

1:24: trailing whitespace.
 
1:26: trailing whitespace.
 
1:30: trailing whitespace.
 
1:35: trailing whitespace.
 
Checking patch gnu/packages/patches/prusa-slicer-backport-fix-5542.patch...
Applied patch gnu/packages/patches/prusa-slicer-backport-fix-5542.patch cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 63d2a45be1c685781633cf8836e070ec8a8debfe	gnu/packages/patches/prusa-slicer-backport-fix-5542.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).