Ticket #4145 - build failure with assembly module enabled

Having trouble installing or compiling FreeCAD? Get help here.
efferre
Posts: 14
Joined: Tue Jul 03, 2018 12:41 pm

Ticket #4145 - build failure with assembly module enabled

Postby efferre » Mon Sep 30, 2019 9:55 am

when building freecad using Genoo Linux I get the following error related to the Assembly module:

Code: Select all

[ 95%] Building CXX object src/Mod/TechDraw/Gui/CMakeFiles/TechDrawGui.dir/ViewProviderSymbol.cpp.o
cd /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/TechDraw/Gui && /usr/bin/ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H
 -DHAVE_LIMITS_H -DMOD_TECHDRAW_HANDLE_FACES=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_XMLPATTERNS_LIB -DQT_XML_LIB -DTechDrawGui_EXPORTS -D_OCC64 -I/var/tmp/portage/media-gfx/freecad-9999/work/freecad-
9999_build -I/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src -I/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src -I/var/tmp
/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/TechDraw/Gui -I/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/TechDraw/G
ui -I/usr/include/coin -I/usr/include/python2.7 -I/usr/lib64/opencascade-7.3.0/ros/lin/inc -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtXmlPattern
s -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtXml -isystem /
usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include
/qt5/QtSvg -isystem /usr/include/qt5/QtUiTools -DNDEBUG -Wall -Wextra -Wno-write-strings -march=core2 -O2 -pipe -ggdb -fPIC -fPIC -std=gnu++11 -o CMake
Files/TechDrawGui.dir/ViewProviderSymbol.cpp.o -c /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/TechDraw/Gui/ViewProviderSymbol.cpp
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘void AssemblyGui::ViewProvid
erConstraintInternal::updateVis(const TopoDS_Shape&)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:85:23: error: no matching function for call to ‘A
ssemblyGui::ViewProviderConstraintInternal::updateVisual(const TopoDS_Shape&)’
     updateVisual(shape);
                       ^
In file included from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProvider.h:28,
                 from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.h:27,
                 from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:24:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProviderExt.h:150:10: note: candidate: ‘void PartGui::ViewProviderPartExt::u
pdateVisual()’
     void updateVisual();
          ^~~~~~~~~~~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProviderExt.h:150:10: note: candidate expects 0 arguments, 1 provided
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘virtual void AssemblyGui::Vi
ewProviderConstraint::setDisplayMode(const char*)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:110:57: warning: unused parameter ‘ModeName’ [-Wu
nused-parameter]
 void ViewProviderConstraint::setDisplayMode(const char* ModeName)
                                             ~~~~~~~~~~~~^~~~~~~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘void AssemblyGui::ViewProvid
erConstraint::draw()’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:255:20: error: no matching function for call to ‘AssemblyGui::ViewProviderConstraint::updateVisual(TopoDS_Shape&)’
     updateVisual(s1);
                    ^
In file included from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProvider.h:28,
                 from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.h:27,
                 from /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:24:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProviderExt.h:150:10: note: candidate: ‘void PartGui::ViewProviderPartExt::updateVisual()’
     void updateVisual();
          ^~~~~~~~~~~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Part/Gui/ViewProviderExt.h:150:10: note: candidate expects 0 arguments, 1 provided
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘virtual void AssemblyGui::ViewProviderConstraint::onSelectionChanged(const Gui::SelectionChanges&)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:336:78: warning: unused parameter ‘msg’ [-Wunused-parameter]
 void ViewProviderConstraint::onSelectionChanged(const Gui::SelectionChanges& msg)
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘virtual TopoDS_Shape AssemblyGui::ViewProviderConstraint::getConstraintShape(int)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:353:61: warning: unused parameter ‘link’ [-Wunused-parameter]
 TopoDS_Shape ViewProviderConstraint::getConstraintShape(int link)
                                                         ~~~~^~~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘virtual bool AssemblyGui::ViewProviderConstraint::setEdit(int)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:416:42: warning: unused parameter ‘ModNum’ [-Wunused-parameter]
 bool ViewProviderConstraint::setEdit(int ModNum)
                                      ~~~~^~~~~~
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp: In member function ‘virtual void AssemblyGui::ViewProviderConstraint::unsetEdit(int)’:
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999/src/Mod/Assembly/Gui/ViewProviderConstraint.cpp:440:44: warning: unused parameter ‘ModNum’ [-Wunused-parameter]
 void ViewProviderConstraint::unsetEdit(int ModNum)
                                        ~~~~^~~~~~
make[2]: *** [src/Mod/Assembly/Gui/CMakeFiles/AssemblyGui.dir/build.make:182: src/Mod/Assembly/Gui/CMakeFiles/AssemblyGui.dir/ViewProviderConstraint.cpp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build'
make[1]: *** [CMakeFiles/Makefile2:4735: src/Mod/Assembly/Gui/CMakeFiles/AssemblyGui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
probably the build failure is related to the commit 6da72b9859f6d21119831d44a8d132c8e2dfb544 where someone left behind assembly module.

If the assembly module is deprecated probably it's better to remove it from the tree to avoid such kind of problems or by making it impossible to enable during configuration time.

I have opened also the ticket issue #4145
Last edited by Kunda1 on Wed Oct 02, 2019 1:41 am, edited 1 time in total.
Reason: Added ticket number to thread title
vocx
Posts: 1915
Joined: Thu Oct 18, 2018 9:18 pm

Re: build failure with assembly module enabled

Postby vocx » Mon Sep 30, 2019 3:54 pm

efferre wrote:
Mon Sep 30, 2019 9:55 am
when building freecad using Genoo Linux I get the following error related to the Assembly module:
...
probably the build failure is related to the commit 6da72b9859f6d21119831d44a8d132c8e2dfb544 where someone left behind assembly module.
...
I think git commit 6da72b9859 is part of the big merge of App::Link from realthunder.

I'm having trouble understanding what you are reporting.

First of all, according to your bug report, you have this version

Code: Select all

OS: Gentoo/Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16776 (Git)
Build type: Release
Branch: (HEAD detached at refs/git-r3/HEAD)
Hash: b547373f35c3fd2a12fca5035af575c835062056
Python version: 2.7.15
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
This isn't the most recent version. The current master branch has 1580 more commits than your version of the source. I just compiled this right now without errors.

Code: Select all

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18356 (Git)
Build type: Release
Branch: master
Hash: 12335c7d52376c140c5328d57902d2c0afdeb588
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
If the assembly module is deprecated probably it's better to remove it from the tree to avoid such kind of problems or by making it impossible to enable during configuration time.
...
The assembly workbench in the source code is basically old prototype code; it is right now a placeholder for when a real Assembly workbench is developed. However, it is completely deactivated currently; it is not built by default, and it has been like that for a long time. I've never had any compilation errors regarding assembly inside Mod/; therefore, I have to assume this is a problem with the way you are compiling, and not with FreeCAD itself.

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release ../freecad-source-vocx && make -j3
truf
Posts: 1
Joined: Fri Oct 18, 2019 7:04 pm

Re: Ticket #4145 - build failure with assembly module enabled

Postby truf » Fri Oct 18, 2019 8:19 pm

I can confirm this the issue with the way we configure/compile FreeCAD
I'm also having Gentoo and tried to enable all the modules including disabled by default assembly :)
Once disabled that assembly module i see no issues with compilation
efferre
Posts: 14
Joined: Tue Jul 03, 2018 12:41 pm

Re: build failure with assembly module enabled

Postby efferre » Mon Dec 02, 2019 10:18 am

vocx wrote:
Mon Sep 30, 2019 3:54 pm
efferre wrote:
Mon Sep 30, 2019 9:55 am
when building freecad using Genoo Linux I get the following error related to the Assembly module:
...
probably the build failure is related to the commit 6da72b9859f6d21119831d44a8d132c8e2dfb544 where someone left behind assembly module.
...
I think git commit 6da72b9859 is part of the big merge of App::Link from realthunder.

I'm having trouble understanding what you are reporting.

First of all, according to your bug report, you have this version

Code: Select all

OS: Gentoo/Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16776 (Git)
Build type: Release
Branch: (HEAD detached at refs/git-r3/HEAD)
Hash: b547373f35c3fd2a12fca5035af575c835062056
Python version: 2.7.15
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
I am sorry for the latency but I didn't receive any notification about your reply :-(

I have tested today updating from the repository (commit e583b2a468c09ec11b5e1287ff94fd8914b824dc) so I am updated. The result is the same and the error is identical to the one reported at the beginning. I am using gcc 8.3.0
vocx wrote:
Mon Sep 30, 2019 3:54 pm

The assembly workbench in the source code is basically old prototype code; it is right now a placeholder for when a real Assembly workbench is developed. However, it is completely deactivated currently; it is not built by default, and it has been like that for a long time. I've never had any compilation errors regarding assembly inside Mod/; therefore, I have to assume this is a problem with the way you are compiling, and not with FreeCAD itself.
Ok, if it's kept as a reference I would say it must at least compile successfully :-) In the past I have already sent a pull request to fix build problems when the assembly module option is activated, in this case the issue is out of my knowledge and I am not able to fix it by myself.

I have not problems in compiling freecad, the building process only fails with -DBUILD_ASSEMBLY=ON (which is by default disabled as you say above).
vocx wrote:
Mon Sep 30, 2019 3:54 pm

Code: Select all

cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release ../freecad-source-vocx && make -j3
What happens if you insert also the -DBUILD_ASSEMBLY=ON option to your flags? Which compiler version are you using?
ezzieyguywuf
Posts: 636
Joined: Tue May 19, 2015 1:11 am

Re: Ticket #4145 - build failure with assembly module enabled

Postby ezzieyguywuf » Mon Dec 02, 2019 10:52 pm

efferre wrote:
Mon Dec 02, 2019 10:18 am
Ok, if it's kept as a reference I would say it must at least compile successfully
I agree with this: if the user is able to select a portion of the code base in the build system, then it should compile.

If the only reason to keep the code is for reference, then we should remove the BUILD_ASSEMBLY cmake variable altogether, so that it is impossible to try and compile this old code.
truf wrote:
Fri Oct 18, 2019 8:19 pm
I'm also having Gentoo
Who knew there were so many of us gentoo users around!

This is off-topic, but I’ve been toying with and compiling freecad In gentoo for years now, so if you have any issues or questions please feel free to reach out via ping or dm
vocx
Posts: 1915
Joined: Thu Oct 18, 2018 9:18 pm

Re: build failure with assembly module enabled

Postby vocx » Tue Dec 03, 2019 12:52 am

efferre wrote:
Mon Dec 02, 2019 10:18 am
Ok, if it's kept as a reference I would say it must at least compile successfully ...
No. Do not compile the Assembly workbench. It doesn't work. I don't understand why you try to compile it. It hasn't been updated or maintained by anybody in ages. You don't need to do anything with it. Unless you are going to pick it apart to learn more about the code, there is no point in using it. Just leave it there.