Bug 269018 - cad/freecad: FTBFS (possibly following Boost 1.81 update)
Summary: cad/freecad: FTBFS (possibly following Boost 1.81 update)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Christoph Moench-Tegeder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-17 21:30 UTC by ice
Modified: 2023-01-21 22:46 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cmt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ice 2023-01-17 21:30:42 UTC
cad/freecad suddenly started doing

[ 65%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/SoFCUnifiedSelection.cpp.o
cd /usr/ports/cad/freecad/work/.build/src/Gui && /usr/bin/c++ -DBOOST_PP_VARIADICS=1 -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"Release\" -DFreeCADGui_EXPORTS -DH5_BUILT_AS_DYNAMIC_LIB -DHAVE_CONFIG_H -DHAVE_PYSIDE2 -DHAVE_SHIBOKEN2 -DNDEBUG -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_OCC64 -I/usr/ports/cad/freecad/work/.build/src/Gui/FreeCADGui_autogen/include -I/usr/ports/cad/freecad/work/.build -I/usr/ports/cad/freecad/work/.build/src -I/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src -I/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui -I/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui/Quarter -I/usr/ports/cad/freecad/work/.build/src/Gui -I/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui/.. -I/usr/ports/cad/freecad/work/.build/src/Gui/.. -I/usr/ports/cad/freecad/work/.build/src/Gui/Language -I/usr/ports/cad/freecad/work/.build/src/Gui/propertyeditor -I/usr/ports/cad/freecad/work/.build/src/Gui/TaskView -I/usr/ports/cad/freecad/work/.build/src/Gui/Quarter -I/usr/ports/cad/freecad/work/.build/src/Gui/DAGView -I/usr/local/include/eigen3 -I/usr/local/include/Inventor/annex -I/usr/local/include/PySide2/QtCore -I/usr/local/include/PySide2/QtGui -I/usr/local/include/PySide2/QtWidgets -isystem /usr/local/include/python3.9 -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtOpenGL -isystem /usr/local/include/qt5/QtPrintSupport -isystem /usr/local/include/qt5/QtSvg -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtUiTools -isystem /usr/local/include/shiboken2 -isystem /usr/local/include/PySide2 -isystem /usr/local/include/qt5/QtXml -Wall -Wextra -Wpedantic -Wno-write-strings -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wno-undefined-var-template -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -fPIC -I/usr/local/include/hdf5-110 -I/usr/local/mpi/openmpi/include -fexceptions -pthread -fPIC -std=gnu++17 -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/SoFCUnifiedSelection.cpp.o -MF CMakeFiles/FreeCADGui.dir/SoFCUnifiedSelection.cpp.o.d -o CMakeFiles/FreeCADGui.dir/SoFCUnifiedSelection.cpp.o -c /usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui/SoFCUnifiedSelection.cpp
--- src/Gui/CMakeFiles/FreeCADGui.dir/SoFCSelection.cpp.o ---
/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui/SoFCSelection.cpp:407:28: error: implicit instantiation of undefined template 'std::array<std::pair<double, std::string>, 3>'
                auto pts = schemaTranslatePoint(pt[0], pt[1], pt[2], 1e-7);
                           ^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^

This looks broadly similar to what 8f5465b fixed in devel/simgear, and indeed sprinkling a couple of "#include <array>"s in

src/Gui/Selection.cpp
src/Gui/SoFCSelection.cpp
src/Gui/SoFCUnifiedSelection.cpp
src/Gui/ViewProviderLink.cpp
src/Mod/Import/App/ImportOCAF2.cpp

enables a successful build (no diff since I don't know what makes C++ tick, I just stick random things in random places).
Comment 1 alt2600 2023-01-20 00:31:02 UTC
can confirm same behavior on amd64, 13.1p5 building on live system, trying to update ports after the boost updates

--- src/Gui/CMakeFiles/FreeCADGui.dir/SoFCSelection.cpp.o ---
/usr/ports/cad/freecad/work/FreeCAD-0.20.2/src/Gui/SoFCSelection.cpp:407:28: error: implicit instantiation of undefined template 'std::array<std::pair<double, std::string>, 3>'
                auto pts = schemaTranslatePoint(pt[0], pt[1], pt[2], 1e-7);
                           ^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;


didn't try sprinkling in a few #include <array>  , but I'm game to try any patches that come out.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-21 22:46:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4b02b30706b21f3986cc67f44888c267809266dc

commit 4b02b30706b21f3986cc67f44888c267809266dc
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2023-01-21 22:42:53 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2023-01-21 22:45:23 +0000

    cad/freecad: fix build after ebbef4b5f8

    PR:             269018

 cad/freecad/files/patch-src_Gui_Selection.h (new)             | 10 ++++++++++
 cad/freecad/files/patch-src_Gui_SoFCSelection.h (new)         | 11 +++++++++++
 cad/freecad/files/patch-src_Gui_SoFCUnifiedSelection.h (new)  | 10 ++++++++++
 .../files/patch-src_Mod_Import_App_ImportOCAF2.h (new)        | 10 ++++++++++
 4 files changed, 41 insertions(+)