Bug 285542 - cad/freecad build failure
Summary: cad/freecad build failure
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: 2025-03-20 06:12 UTC by Chad Jacob Milios
Modified: 2025-03-24 22:17 UTC (History)
0 users

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


Attachments
FIX: place into cad/freecad/files/ (981 bytes, patch)
2025-03-20 06:12 UTC, Chad Jacob Milios
milios: maintainer-approval?
Details | Diff
FAIL: full log of failure @ports/a6f288b8 without patch (49.95 KB, application/octet-stream)
2025-03-20 06:17 UTC, Chad Jacob Milios
no flags Details
INFO: my pkg info, in case relevent (88.86 KB, application/octet-stream)
2025-03-20 06:21 UTC, Chad Jacob Milios
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Jacob Milios 2025-03-20 06:12:52 UTC
Created attachment 258826 [details]
FIX: place into cad/freecad/files/

not sure what about my system causes this problem to surface. perhaps some input related port? clang19? i could only find the pkg-builder logs from 13.4/amd64 and 14.1/amd64 but i'm on 13.5-RELEASE/amd64

at any rate, i backported the attachment from their master repo and now all is well (though i do not possess this 3Dconnexion SpaceMouse or CadMouse thing for any testing of that)

CPUTYPE?=opteron-sse3
DEFAULT_VERSIONS= bdb=18 guile=3.0 linux=rl9 mono=6.8 mysql=9.1 ruby=3.3 samba=4.20 go=1.23 llvm=19 tcltk=9.0 perl5=5.40 php=8.4 java=23 nodejs=23 ssl=openssl34 gcc=14 pgsql=17

has anyone had success building for a comparison log on 13.5 or 14.2 in any environment?

(fyi, in a parallel build this error happens at ~60%)
[ 17%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/GuiApplicationNativeEventAware.cpp.o
cd /usr/ports/cad/freecad/work/.build/src/Gui && /usr/local/bin/ccache /usr/bin/c++ -DBOOST_PP_VARIADICS=1 -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"Release\" -DFMT_SHARED -DFreeCADGui_EXPORTS -DH5_BUILT_AS_DYNAMIC_LIB -DHAVE_CONFIG_H -DHAVE_DRACO -DHAVE_FFMPEG -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_GLES2_EXT -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_PYSIDE6 -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_SHIBOKEN6 -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DNDEBUG -DOCC_CONVERT_SIGNALS -DPYCXX_6_2_COMPATIBILITY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVGWIDGETS_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSPNAV_FOUND -DVTK_OPENGL2_BACKEND -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-1.0.0/src -I/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui -I/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/Quarter -I/usr/ports/cad/freecad/work/.build/src/Gui -I/usr/ports/cad/freecad/work/FreeCAD-1.0.0/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/qt6/QtDBus -I/usr/local/include/qt6/QtUiPlugin -I/usr/local/include/PySide6/QtCore -I/usr/local/include/PySide6/QtGui -I/usr/local/include/PySide6/QtWidgets -isystem /usr/local/include/python3.11 -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/include/qt6 -isystem /usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtGui -isystem /usr/local/include/qt6/QtOpenGL -isystem /usr/local/include/qt6/QtPrintSupport -isystem /usr/local/include/qt6/QtSvg -isystem /usr/local/include/qt6/QtSvgWidgets -isystem /usr/local/include/qt6/QtNetwork -isystem /usr/local/include/qt6/QtUiTools -isystem /usr/local/include/qt6/QtOpenGLWidgets -isystem /usr/local/include/qt6/QtXml -isystem /usr/local/include/shiboken6 -isystem /usr/local/include/PySide6 -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -Wall -Wextra -Wpedantic -Wno-write-strings -O2 -pipe -march=opteron-sse3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wno-undefined-var-template -O2 -pipe -march=opteron-sse3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=gnu++17 -fPIC -I/usr/local/include -I/usr/local/mpi/openmpi/include -pthread -fPIC -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/GuiApplicationNativeEventAware.cpp.o -MF CMakeFiles/FreeCADGui.dir/GuiApplicationNativeEventAware.cpp.o.d -o CMakeFiles/FreeCADGui.dir/GuiApplicationNativeEventAware.cpp.o -c /usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/GuiApplicationNativeEventAware.cpp
/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/GuiApplicationNativeEventAware.cpp:53:23: error: allocation of incomplete type 'Gui::GuiNativeEvent'
   53 |     nativeEvent = new Gui::GuiNativeEvent(this);
      |                       ^~~~~~~~~~~~~~~~~~~
/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/GuiApplicationNativeEventAware.h:35:11: note: forward declaration of 'Gui::GuiNativeEvent'
   35 |     class GuiNativeEvent;
      |           ^
/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/GuiApplicationNativeEventAware.cpp:62:16: error: member access into incomplete type 'GuiNativeEvent'
   62 |     nativeEvent->initSpaceball(window);
      |                ^
/usr/ports/cad/freecad/work/FreeCAD-1.0.0/src/Gui/GuiApplicationNativeEventAware.h:35:11: note: forward declaration of 'Gui::GuiNativeEvent'
   35 |     class GuiNativeEvent;
      |           ^
2 errors generated.
gmake[2]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/build.make:1277: src/Gui/CMakeFiles/FreeCADGui.dir/GuiApplicationNativeEventAware.cpp.o] Error 1
gmake[2]: Leaving directory '/usr/ports/cad/freecad/work/.build'
gmake[1]: *** [CMakeFiles/Makefile2:10931: src/Gui/CMakeFiles/FreeCADGui.dir/all] Error 2
gmake[1]: Leaving directory '/usr/ports/cad/freecad/work/.build'
gmake: *** [Makefile:139: all] Error 2
*** Error code 1
Comment 1 Chad Jacob Milios 2025-03-20 06:17:17 UTC
Created attachment 258827 [details]
FAIL: full log of failure @ports/a6f288b8 without patch
Comment 2 Chad Jacob Milios 2025-03-20 06:21:26 UTC
Created attachment 258828 [details]
INFO: my pkg info, in case relevent
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-03-24 22:14:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=46d3b8f4a28431fbacb8029f905d1175ba3ae61e

commit 46d3b8f4a28431fbacb8029f905d1175ba3ae61e
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2025-03-24 22:04:24 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2025-03-24 22:04:24 +0000

    cad/freecad: optionize SpaceMouse support

    Originially, FreeCAD picked up libspnav (SpaceMouse) support
    when the library was present in the system during build. That
    alone would be a minor problem, but people still insist on
    building in unclean systems.
    Additionally, libspnav support in FreeCAD was broken and resulted
    in build failure when accidentially building with libspnav (see
    above).
    Upstream fixed this in a series of changes touching many places
    and sometimes even depending on otherwise unrelated changes:
    importing all that would be close to updating to a snapshot.
    Instead, adopt the relevant fix for building with libspnav from
    upstream, and put the whole libspnav detection behind a cmake
    option (made accessible as a port option).

    PR:             285542
    Reported by:    Chad Jacob Milios

 cad/freecad/Makefile                        |  7 ++-
 cad/freecad/files/patch-spnav-support (new) | 94 +++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+), 2 deletions(-)
Comment 4 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2025-03-24 22:17:53 UTC
There's even way more of a mess - FreeCAD built just fine without libspnav, but automatically enabled libspnav support when the build system found the library in the system. That needed some more patching to get somewhat reliable builds.