prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.79k stars 1.94k forks source link

Fix 2.8.1 build errors on Linux #13609

Open jmickelin opened 1 week ago

jmickelin commented 1 week ago

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.

SachCZ commented 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.

SachCZ commented 1 week ago

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.

jmickelin commented 1 week ago

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 :)

jmickelin commented 1 week ago

FYI, I'm getting a couple of new errors on 2.9.0-alpha1 now:

boost::log linker error in 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)
CMake output ``` [ 64%] Building CXX object tests/libslic3r/CMakeFiles/libslic3r_tests.dir/test_surface_mesh.cpp.o ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `Slic3r::arr2::extract_selected(Slic3r::arr2::ArrangeTask&, Slic3r::arr2::ArrangeableModel const&, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#1}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/ArrangeTaskImpl.hpp:44:(.text._ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x345): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/ArrangeTaskImpl.hpp:44:(.text._ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x383): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x390): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_17SimpleArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x4a3): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger, boost::log::v2s_mt_posix::sources::multi_thread_model, boost::log::v2s_mt_posix::sources::features > >::open_record > >(boost::parameter::aux::tagged_argument_list_of_1 > const&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/basic_logger.hpp:460:(.text._ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_[_ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_]+0x15): undefined reference to `boost::log::v2s_mt_posix::core::get_logging_enabled() const' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::sources::aux::severity_level::set_value(boost::log::v2s_mt_posix::trivial::severity_level)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/severity_feature.hpp:137:(.text._ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_[_ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_]+0x2b): undefined reference to `boost::log::v2s_mt_posix::sources::aux::get_severity_level()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger, boost::log::v2s_mt_posix::sources::multi_thread_model >::open_record_unlocked > >(boost::parameter::aux::tagged_argument_list_of_1 > const&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/basic_logger.hpp:260:(.text._ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_[_ZN5boost3log12v2s_mt_posix7sources22basic_composite_loggerIcNS2_18severity_logger_mtINS1_7trivial14severity_levelEEENS2_18multi_thread_modelINS1_3aux14light_rw_mutexEEENS2_8featuresIJNS2_8severityIS6_EEEEEE11open_recordINS_9parameter3aux25tagged_argument_list_of_1INSJ_15tagged_argumentINS1_8keywords3tag8severityEKS6_EEEEEENS1_6recordERKT_]+0x3d): undefined reference to `boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::core::push_record(boost::log::v2s_mt_posix::record&&)': build/src/slic3r-arrange-wrapper/include/boost/log/core/core.hpp:308:(.text._ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev[_ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev]+0x31): undefined reference to `boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::auto_release::~auto_release()': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:493:(.text._ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev[_ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev]+0x41): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::release_compound(boost::log::v2s_mt_posix::aux::stream_provider::stream_compound*)' ld: build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:493:(.text._ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev[_ZN5boost3log12v2s_mt_posix3aux11record_pumpINS1_7sources18severity_logger_mtINS1_7trivial14severity_levelEEEED2Ev]+0x55): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::release_compound(boost::log::v2s_mt_posix::aux::stream_provider::stream_compound*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `Slic3r::arr2::extract(Slic3r::arr2::FillBedTask&, Slic3r::arr2::Scene const&, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#3}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/FillBedTaskImpl.hpp:108:(.text._ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x5d1): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/FillBedTaskImpl.hpp:108:(.text._ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x60f): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x61c): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_17SimpleArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x72f): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `Slic3r::arr2::MultiplySelectionTask::create(Slic3r::arr2::Scene const&, unsigned long, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#2}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/MultiplySelectionTaskImpl.hpp:66:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x5b7): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/MultiplySelectionTaskImpl.hpp:66:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x5f5): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x602): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(SimpleArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_17SimpleArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x715): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `Slic3r::arr2::extract_selected(Slic3r::arr2::ArrangeTask&, Slic3r::arr2::ArrangeableModel const&, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#1}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/ArrangeTaskImpl.hpp:44:(.text._ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x1ee): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/ArrangeTaskImpl.hpp:44:(.text._ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x22f): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x23e): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_[_ZZN6Slic3r4arr216extract_selectedINS0_11ArrangeItemEEEvRNS0_11ArrangeTaskIT_EERKNS0_16ArrangeableModelERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE_clESG_]+0x353): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `Slic3r::arr2::extract(Slic3r::arr2::FillBedTask&, Slic3r::arr2::Scene const&, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#3}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/FillBedTaskImpl.hpp:108:(.text._ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x2b5): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/FillBedTaskImpl.hpp:108:(.text._ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x2f6): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x305): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_[_ZZN6Slic3r4arr27extractINS0_11ArrangeItemEEEvRNS0_11FillBedTaskIT_EERKNS0_5SceneERKNS0_26ArrangeableToItemConverterIS4_EEENKUlRKNS0_11ArrangeableEE1_clESG_]+0x41a): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `Slic3r::arr2::MultiplySelectionTask::create(Slic3r::arr2::Scene const&, unsigned long, Slic3r::arr2::ArrangeableToItemConverter const&)::{lambda(Slic3r::arr2::Arrangeable const&)#2}::operator()(Slic3r::arr2::Arrangeable const&) const': src/slic3r-arrange-wrapper/src/Tasks/MultiplySelectionTaskImpl.hpp:66:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x28f): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: src/slic3r-arrange-wrapper/src/Tasks/MultiplySelectionTaskImpl.hpp:66:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x2d0): undefined reference to `boost::log::v2s_mt_posix::trivial::logger::get()' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::aux::record_pump >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt&, boost::log::v2s_mt_posix::record&)': build/src/slic3r-arrange-wrapper/include/boost/log/sources/record_ostream.hpp:508:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x2df): undefined reference to `boost::log::v2s_mt_posix::aux::stream_provider::allocate_compound(boost::log::v2s_mt_posix::record&)' ld: ../../src/slic3r-arrange-wrapper/libslic3r-arrange-wrapper.a(ArrangeItem.cpp.o): in function `boost::log::v2s_mt_posix::record::reset()': build/src/slic3r-arrange-wrapper/include/boost/log/core/record.hpp:157:(.text._ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_[_ZZN6Slic3r4arr221MultiplySelectionTaskINS0_11ArrangeItemEE6createERKNS0_5SceneEmRKNS0_26ArrangeableToItemConverterIS2_EEENKUlRKNS0_11ArrangeableEE0_clESD_]+0x3f4): undefined reference to `boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)' [ 64%] Building CXX object src/slic3r/CMakeFiles/libslic3r_gui.dir/GUI/WebViewDialog.cpp.o clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [tests/arrange/CMakeFiles/arrange_tests.dir/build.make:186: tests/arrange/arrange_tests] Error 1 make[1]: *** [CMakeFiles/Makefile2:1513: tests/arrange/CMakeFiles/arrange_tests.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ```

Missing member 'is_regular_file' in 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:

Compare 1.82 with 1.83.

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);

CMake output
[ 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.

jmickelin commented 1 week ago

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.