Skip to content
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 build with upstream dependencies #696

Merged
merged 19 commits into from
Dec 17, 2022

Conversation

zhaofengli
Copy link
Contributor

Hello there,

This PR fixes build against newer dependencies like Boost 1.79 shipped with Linux distributions (specifically, NixOS). For distribution packaging, it's expected for applications to use libraries from the package set instead of bringing in their own vendored versions.

Ref: #12

@zhaofengli zhaofengli changed the title Fixes build with upstream dependencies Fix build with upstream dependencies Nov 22, 2022
@lanewei120
Copy link
Collaborator

can not pass compiling on macos and windows:

macos:
/Users/ci.slave/slicer/patch_build/0/bamboo_slicer/src/hints/HintsToPot.cpp:12:26: error: no matching constructor for initialization of 'boost::nowide::ofstream' (aka 'basic_ofstream')
10:27:05 boost::nowide::ofstream file(std::move(path), std::ios_base::app);
10:27:05 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

windows:
HintsToPot.cpp
10:34:28 D:\bambu-studio\patch_build\1\bamboo_slicer\src\hints\HintsToPot.cpp(12,66): error C2664: 'boost::nowide::basic_ofstream<char,std::char_traits>::basic_ofstream(const char *,std::ios_base::openmode)': cannot convert argument 1 from 'boost::filesystem::path' to 'const char *' [D:\bambu-studio\patch_build\1\bamboo_slicer\build\src\hints\hintsToPot.vcxproj]
10:34:28 D:\bambu-studio\patch_build\1\bamboo_slicer\src\hints\HintsToPot.cpp(12,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\bambu-studio\patch_build\1\bamboo_slicer\build\src\hints\hintsToPot.vcxproj]
10:34:28 D:\bambu-studio\patch_build\1\bamboo_slicer\src\boost/nowide/fstream.hpp(129,9): message : see declaration of 'boost::nowide::basic_ofstream<char,std::char_traits>::basic_ofstream' [D:\bambu-studio\patch_build\1\bamboo_slicer\build\src\hints\hintsToPot.vcxproj]

@zhaofengli
Copy link
Contributor Author

Hi, I have bumped Boost in the vendored deps following PrusaSlicer and tested building on Windows 11.

tamasmeszaros and others added 19 commits December 15, 2022 17:07
Fixes build on Boost 1.79.0.
Deprecated in Boost 1.79.0 and no longer included by
filesystem.hpp.
Fixes linking errors like:

/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: slic3r/liblibslic3r_gui.a(GUI_ObjectTable.cpp.o): in function `wxClassInfo::IsKindOf(wxClassInfo const*) const':
/nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:88: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo'
/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:93: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo'
/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:99: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo'
/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:93: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo'
/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/hzl7rsdq0k6affzy2rz35lhn51lq6zh3-wxwidgets-3.1.5/include/wx-3.1/wx/rtti.h:88: undefined reference to `wxGridCellEditorEvtHandler::ms_classInfo'
The wrapper isn't used in the Linux code path. Some distributions'
wxWidgets packages don't ship the private headers.
…encies using Visual Studio 2022

(cherry picked from commit 1376c9cffdb23351d35270ef5673ea98789dcaaf)
(cherry picked from commit 776a125b9b5fb4af1d9c57b78063012ad6421f4b)
(cherry picked from commit 62fb70d1cb9513f4e54481fac31a1c0771d2a30a)
(cherry picked from commit d3cf765a24cf54d0e2bae790cefb8d77444998f4)
(cherry picked from commit 8d25bf680165f5db0cfd398525199fad64e7642e)
(cherry picked from commit 8c6f67a1645c596189d6601c5ed758e70adfd172)
Let's just translate the comments into English while we are at it.
@zhaofengli
Copy link
Contributor Author

Rebased on top of latest master (congrats on the release!) with a couple of extra fixes. Tested building on Windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants