-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 2.8.1 build errors on Linux #13609
Conversation
Hello @jmickelin, these thank you for you fixes. These are all very useful. Yet, there are some minor thinks that need to be addressed. Some minor things:
Bigger issues:
Anyway all these should be easy to address. Thank you for your time, we intend to use this. |
Just to clarify. What I mean by "should probably not link against boost_headeronly" is the target_link_libraries in the cmake sense. Not actual linking - that makes no sense. |
Awesome! I'll hand it off to you to iron out the details, then? Regarding Thank you :) |
FYI, I'm getting a couple of new errors on boost::log linker error in
|
This solves the build error with the missing `Eigen3::Eigen` build target. Partially fixes prusa3d#13608
This solves the build error with missing headers. Partially fixes prusa3d#13608.
This solves the linker error about missing `boost::log` symbols. Fixes prusa3d#13608.
…versions The method boost::filesytem::directory_entry.is_regular_file was added starting in version 1.83, but the lowest Boost version of this project is 1.66.0.
cb59b22
to
f73ed7f
Compare
Done! I changed the commit which added the |
Hi can you rebase this? seems #13608 has been merged (if this pr is still needed) greetings EDIT: maybe diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index 82e91bb10b1..27c226120dd 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -462,6 +462,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
${DBus1_LIBRARIES}
OpenSSL::SSL
OpenSSL::Crypto
+ boost_headeronly
)
elseif (APPLE)
target_link_libraries(libslic3r_gui PUBLIC ${DISKARBITRATION_LIBRARY} ${COREWLAN_LIBRARY})
diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp
index 67df537d5cc..fc9ba340229 100644
--- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp
+++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp
@@ -120,7 +120,7 @@ BackgroundSlicingProcess::~BackgroundSlicingProcess()
std::string prefix = boost::filesystem::path(m_temp_output_path).filename().string();
prefix = prefix.substr(0, prefix.find('_'));
for (const auto& entry : boost::filesystem::directory_iterator(temp_dir)) {
- if (entry.is_regular_file()) {
+ if (boost::filesystem::is_regular_file(entry.path())) {
const std::string filename = entry.path().filename().string();
if (boost::starts_with(filename, prefix) && boost::ends_with(filename, ".gcode"))
boost::filesystem::remove(entry); |
@sl1pkn07 Hi, I believe it's not necessary, since all of these fixes were cherry picked onto 2.9.0-beta1: The first thing in your diff is in 20a02b5 and the second one was solved by bumping the version requirement for Boost to 1.83 here 78a0470. If you are still experiencing build issues mentioning Boost, I would double check that your system has the right version installed and rerun the configure script. But yes, to backport it to work with older Boost versions, the second half of the diff would do the trick (unless other changes in Since all the remaining commits are also merged, I think this can be closed, so I'll do that now :) |
ok, then this is for older boost. then can i drop it any plans to update boost to 1.86.0? greetings |
Correct. For the second question, I think you can use any newer version you want, and the build system should pick up on it. The version check is just a lower bound (to check whether a feature that is being used is present or not). Boost is just a utility library, and there aren't any bleeding edge features visible to end users by using the very latest one or anything. |
i asked because this [ 86%] Building CXX object src/slic3r/CMakeFiles/libslic3r_gui.dir/GUI/Jobs/NotificationProgressIndicator.cpp.o
/tmp/makepkg/prusa-slicer-git/src/PrusaSlicer/src/slic3r/Config/Version.cpp: In static member function ‘static std::vector<Slic3r::GUI::Config::Index> Slic3r::GUI::Config::Index::load_db()’:
/tmp/makepkg/prusa-slicer-git/src/PrusaSlicer/src/slic3r/Config/Version.cpp:246:51: error: ‘directory_iterator’ is not a member of ‘boost::filesystem’; did you mean ‘directory_entry’?
246 | for (auto &dir_entry : boost::filesystem::directory_iterator(cache_dir))
| ^~~~~~~~~~~~~~~~~~
| directory_entry
/tmp/makepkg/prusa-slicer-git/src/PrusaSlicer/src/slic3r/Config/Version.cpp:259:47: error: ‘directory_iterator’ is not a member of ‘boost::filesystem’; did you mean ‘directory_entry’?
259 | for (auto &dir_entry : boost::filesystem::directory_iterator(vendor_dir))
| ^~~~~~~~~~~~~~~~~~
| directory_entry with boost 1.86.0 EDIT: seems gentoo have patches for this and other boost things https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch |
Interesting! Really good catch, sorry I misunderstood you. I can't replicate it on Nix, but I did find this: It looks like Apparently that file was using it for some deprecated code, and the include was removed along with the code when it was removed: https://www.boost.org/doc/libs/1_86_0/libs/filesystem/doc/release_history.html#:~:text=Removed%20APIs%20that,and%20features%20section. It's not entirely clear to me whether Do you mind sharing what OS/distro you are using, and (if possible -- I have no clue how 😛 ) the build flags that were used to compile Boost? Since neither of those changes from the Gentoo patches were related to any of the issues I ran into, I did gloss over them when I wrote this PR, but that also means that I have no way of testing them now. Does the build succeed for you if you just add #include <boost/filesystem/directory.hpp> to |
This PR incorporates the changes suggested in #13608.
It builds partially on #13080 but additionally solves the new errors introduced between versions 2.8.0 and 2.8.1.