Open jmickelin opened 1 week ago
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 test_common
I realized I did not try compiling it after just adding the link to slic3r
and not test_common
. It's possible that would have been enough to make it available in the tests.
Thank you :)
FYI, I'm getting a couple of new errors on 2.9.0-alpha1
now:
slic3r-arrange-wrapper
and arrange_tests
This seems to creep up later in the fff_print
tests as well.
I added yet another boost_headeronly
link, but this time to a dependency (libslic3r
), and made it PUBLIC
.
This ought to be enough to satisfy tests/sla_print
as well.
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -596,6 +596,7 @@ target_link_libraries(libslic3r PUBLIC
libigl
agg
ankerl
+ boost_headeronly
)
if (APPLE)
boost::filesystem::directory_entry
This wasn't added as a method to directory_entry
until Boost version 1.83, by the looks of it. I was running 1.81 on my system. It does however exist as a normal function in prior versions:
I suggest to either bump the version bound to Boost (which is at 1.66.0 now), or rewrite it in a way that works in both older and newer versions.
Here is a patch for the latter:
--- 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);
[ 66%] Building CXX object tests/fff_print/CMakeFiles/fff_print_tests.dir/test_flow.cpp.o
src/slic3r/GUI/BackgroundSlicingProcess.cpp:123:19: error: no member named 'is_regular_file' in 'boost::filesystem::directory_entry'
123 | if (entry.is_regular_file()) {
| ~~~~~ ^
1 error generated.
make[2]: *** [src/slic3r/CMakeFiles/libslic3r_gui.dir/build.make:301: src/slic3r/CMakeFiles/libslic3r_gui.dir/GUI/BackgroundSlicingProcess.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1451: src/slic3r/CMakeFiles/libslic3r_gui.dir/all] Error 2
With both of these, I can successfully build 2.9.0-alpha1
. I'll rebase this PR onto that and add these changes in a minute.
Done! I changed the commit which added the boost_headeronly
link in test_common
to do it in libslic3r
instead, fixing both the original issue and this new one from 2.9.1-alpha1
. I kept the commits for OpenSSL and the new FindEigen3.cmake
around, in case you would need them in your cherry-pick.
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.