FAILED: src/Gui/QSint/actionpanel/moc_actionbox.cpp /tmp/portage/media-gfx/freecad-0.21.2/work/FreeCAD-0.21.2_build/src/Gui/QSint/actionpanel/moc_actionbox.cpp cd /tmp/portage/media-gfx/freecad-0.21.2/work/FreeCAD-0.21.2_build/src/Gui/QSint/actionpanel && @/tmp/portage/media-gfx/freecad-0.21.2/work/FreeCAD-0.21.2_build/src/Gui/QSint/acs /bin/sh: line 1: @/tmp/portage/media-gfx/freecad-0.21.2/work/FreeCAD-0.21.2_build/src/Gui/QSint/actionpanel/moc_actionbox.cpp_parameters: No such file or directory This reproduces with MAKEOPTS="-j1"
Created attachment 881377 [details] build log
The problem may be related to the upgrade to boost-1.84.0
(In reply to Andrew Ammerlaan from comment #2) > The problem may be related to the upgrade to boost-1.84.0 Nope, that's not it.
It looks to me like something is going wrong in the qtcore cmake files. With ninja as cmake generator I get the log as attached, interestingly enough the file it complains about does exist, there is just a leftover "@" in the path that breaks it. If I try emake instead I get '--name' command not found where we should have '/lib64/qt5/bin/rcc --name ....' Downgrading cmake to 3.27.9 did not help.
I "guess" the @ is from there: /usr/lib64/cmake/Qt5Core/Qt5CoreMacros.cmake: set(_moc_extra_parameters_file @${_moc_parameters_file}) Albeit that has existed for a while that I can see and is also in Qt6. Haven't dug into this and moc usage but I'd assume the cmake files are not incorrect (haven't tried building freecad ftr). I think(?) it's missing an element and meant to pass that to moc or something (aka calling a blank command)
Maybe the logic to find moc for Qt5 has issues in https://github.com/FreeCAD/FreeCAD/blob/main/cMake/FreeCAD_Helpers/SetupQt.cmake It could potentially be passed manually for qt5 using qmake-utils eclass and -DQt5Core_MOC_EXECUTABLE="$(qt5_get_bindir)/moc" (entirely untested, just guessing by looking at the file -- option name could be wrong)
Alternatively, how's the Qt6 support now? Does the USE still need to be masked? While the idea is to not rush to forcing Qt6 for nicer desktop integration until at least plasma 6, when it comes to FreeCAD dropping qt5 would (as you know) mean getting rid of pyside2.
(In reply to Ionen Wolkens from comment #6) > Maybe the logic to find moc for Qt5 has issues in > https://github.com/FreeCAD/FreeCAD/blob/main/cMake/FreeCAD_Helpers/SetupQt. > cmake > > It could potentially be passed manually for qt5 using qmake-utils eclass and > -DQt5Core_MOC_EXECUTABLE="$(qt5_get_bindir)/moc" Thanks, this helped. I don't understand why it worked before but now needs this to be specified explicitly, but I don't really feel like investigating further because this is slow to build. Now to test if this also fixed the Qt6 build problem I encountered before.
(In reply to Andrew Ammerlaan from comment #8) > (In reply to Ionen Wolkens from comment #6) > > Maybe the logic to find moc for Qt5 has issues in > > https://github.com/FreeCAD/FreeCAD/blob/main/cMake/FreeCAD_Helpers/SetupQt. > > cmake > > > > It could potentially be passed manually for qt5 using qmake-utils eclass and > > -DQt5Core_MOC_EXECUTABLE="$(qt5_get_bindir)/moc" > > Thanks, this helped. I don't understand why it worked before but now needs > this to be specified explicitly, but I don't really feel like investigating > further because this is slow to build. > > Now to test if this also fixed the Qt6 build problem I encountered before. By "this" do you mean the moc thing? That's only needed for Qt5 given there's elseif (FREECAD_QT_MAJOR_VERSION EQUAL 6) set (Qt6Core_MOC_EXECUTABLE Qt6::moc) But seems it's lacking an equivalent to set Qt5Core_MOC for Qt5 in this version. The option will likely give unused option QA with Qt6, so may want to $(usev qt5 -DQt5...) guard it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0c575c52de9730980683c2f458bceda127be3eb commit a0c575c52de9730980683c2f458bceda127be3eb Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2024-01-05 10:22:53 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2024-01-05 10:23:37 +0000 media-gfx/freecad: fix qt5 build, fix designer dep Closes: https://bugs.gentoo.org/919492 Closes: https://bugs.gentoo.org/921298 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> ...{freecad-0.21.2.ebuild => freecad-0.21.2-r1.ebuild} | 18 +++++++++++++----- media-gfx/freecad/freecad-9999.ebuild | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-)
(In reply to Ionen Wolkens from comment #9) > The option will likely give unused option QA with Qt6, so may want to $(usev > qt5 -DQt5...) guard it. Seems okay, didn't get any unused option complaints. However qt6 build still fails at: FAILED: src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"RelWithDebInfo\" -DFMT_SHARED -DFreeCADGui_EXPORTS -DHAVE_CONFIG_H -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_GLES2_EXT -DHAVE_OPENGL_EXT -DHAVE_PYSIDE6 -DHAVE_RAPIDJSON -DHAVE_SHIBOKEN6 -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DPYCXX_6_2_COMPATIBILITY -DPy_LIMITED_API=0x03060000 -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/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/FreeCADGui_autogen/include -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build -I/usr/include/eigen3 -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Quarter -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/.. -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/.. -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/Language -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/propertyeditor -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/TaskView -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/Quarter -I/tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Gui/DAGView -I/usr/include/qt6/QtDBus -I/usr/include/qt6/QtUiPlugin -I/usr/include/PySide6/QtCore -I/usr/include/PySide6/QtGui -I/usr/include/PySide6/QtWidgets -isystem /usr/include/python3.11 -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtPrintSupport -isystem /usr/include/qt6/QtSvg -isystem /usr/include/qt6/QtSvgWidgets -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtUiTools -isystem /usr/include/qt6/QtOpenGLWidgets -isystem /usr/include/shiboken6 -isystem /usr/include/PySide6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtXml -Wall -Wextra -Wno-write-strings -march=native -mtune=native -O3 -pipe -frecord-gcc-switches -flto=16 -std=gnu++17 -fPIC -fPIC -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o -MF src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o.d -o src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o -c /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp In file included from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Base/BaseClassPy.h:7, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/Base/PersistencePy.h:7, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/App/PropertyContainerPy.h:7, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/App/ExtensionContainerPy.h:7, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2_build/src/App/DocumentObjectPy.h:7, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp:48: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Base/PyObjectBase.h: In function ‘void Base::PyTypeCheck(PyObject**, PyTypeObject*, const char*)’: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Base/PyObjectBase.h:536:43: error: invalid use of incomplete type ‘PyTypeObject’ {aka ‘struct _typeobject’} 536 | str << "Type must be " << type->tp_name << " or None, not " << (*ptr)->ob_type->tp_name; | ^~ In file included from /usr/include/python3.11/Python.h:42, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Base/PyObjectBase.h:38: /usr/include/python3.11/pytypedefs.h:20:16: note: forward declaration of ‘PyTypeObject’ {aka ‘struct _typeobject’} 20 | typedef struct _typeobject PyTypeObject; | ^~~~~~~~~~~ /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Base/PyObjectBase.h:536:91: error: invalid use of incomplete type ‘PyTypeObject’ {aka ‘struct _typeobject’} 536 | str << "Type must be " << type->tp_name << " or None, not " << (*ptr)->ob_type->tp_name; | ^~ /usr/include/python3.11/pytypedefs.h:20:16: note: forward declaration of ‘PyTypeObject’ {aka ‘struct _typeobject’} 20 | typedef struct _typeobject PyTypeObject; | ^~~~~~~~~~~ In file included from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/CXX/Python3/Extensions.hxx:183, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/CXX/Extensions.hxx:42, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Base/Interpreter.h:44, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp:50: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/CXX/Python3/PythonType.hxx: At global scope: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/CXX/Python3/PythonType.hxx:206:14: error: declaration does not declare anything [-fpermissive] 206 | std::unordered_map<int, void*> slots; | ^~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp: In member function ‘QStringList Gui::Application::workbenches() const’: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp:1659:30: error: ‘PyUnicode_AsUTF8’ was not declared in this scope; did you mean ‘PyUnicode_AsUCS4’? 1659 | const char* wbName = PyUnicode_AsUTF8(key); | ^~~~~~~~~~~~~~~~ | PyUnicode_AsUCS4 /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp: In static member function ‘static void Gui::Application::runApplication()’: /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp:2256:28: warning: ‘static void QApplication::setActiveWindow(QWidget*)’ is deprecated: Use QWidget::activateWindow() instead. [-Wdeprecated-declarations] 2256 | mainApp.setActiveWindow(&mw); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/qt6/QtWidgets/QApplication:1, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/GuiApplicationNativeEventAware.h:26, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/GuiApplication.h:27, from /tmp/portage/media-gfx/freecad-0.21.2-r1/work/FreeCAD-0.21.2/src/Gui/Application.cpp:74: /usr/include/qt6/QtWidgets/qapplication.h:84:17: note: declared here 84 | static void setActiveWindow(QWidget* act); | ^~~~~~~~~~~~~~~
(In reply to Andrew Ammerlaan from comment #11) > (In reply to Ionen Wolkens from comment #9) > > The option will likely give unused option QA with Qt6, so may want to $(usev > > qt5 -DQt5...) guard it. > > Seems okay, didn't get any unused option complaints. Well yeah, you've set Qt5's behind a conditional already. It wasn't necessary to add these for Qt6 as well though (as I said, moc was a Qt5-only problem). wrt the designer dep, change is likely wrong for Qt6 and it shouldn't unconditionally depend on qttools[designer] (that flag is off by default and will be annoying). There's a bit of a catch that Qt5's designer provided *two* things, designer and Qt5UiTools. If you want Qt6UiTools, then what you need is qttools[widgets] So something like: dev-qt/qttools:6[widgets] designer? ( dev-qt/qttools:6[designer] fwiw I made a note of this in [1] [1] https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88fa919633c4a2289bf6ff08b9f53dfa334d2634 commit 88fa919633c4a2289bf6ff08b9f53dfa334d2634 Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2024-01-05 13:10:35 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2024-01-05 13:11:53 +0000 media-gfx/freecad: fix uitools dep for qt6 no revbump because qt6 flag is masked anyway Bug: https://bugs.gentoo.org/921298 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> media-gfx/freecad/freecad-0.21.2-r1.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
(In reply to Ionen Wolkens from comment #12) > There's a bit of a catch that Qt5's designer provided *two* things, designer > and Qt5UiTools. If you want Qt6UiTools, then what you need is > qttools[widgets] > > So something like: > > dev-qt/qttools:6[widgets] > designer? ( dev-qt/qttools:6[designer] > > fwiw I made a note of this in [1] > > [1] https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes Thanks! I had somehow missed the migration notes.
(In reply to Andrew Ammerlaan from comment #14) > > [1] https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes > > Thanks! I had somehow missed the migration notes. That's because I wrote that page a few days ago :) Sorry this wasn't done earlier. Please spread it if you see someone confused with differences.