Index: src/CLI/Setup.cpp
--- src/CLI/Setup.cpp.orig
+++ src/CLI/Setup.cpp
@@ -272,9 +272,11 @@ static bool setup_common()
     }
 #endif
 
+#ifndef SLIC3R_FHS
     // 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();
+#endif
 
     // Path from the Slic3r binary to its resources.
 #ifdef __APPLE__
@@ -338,4 +340,4 @@ bool setup(Data& cli, int argc, char** argv)
     return true;
 }
 
-}
\ No newline at end of file
+}
