FreeCAD Compile and Build - Ubuntu 20.04

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

Hello Everyone,

I am trying to compile FreeCAD but I occurs this error during running make -j$(nproc --ignore=2)
Any suggestion about it?

I attached summary with the results from this command.


Thanks so much.

Error displayed:

Code: Select all

/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `SoInput::setBuffer(void*, unsigned long)'
/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `SoTextureEnabledElement::set(SoState*, SoNode*, int)'
/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `ScXML::readBuffer(char const*)'
/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `SoGLTextureEnabledElement::set(SoState*, SoNode*, int)'
/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `SbPList::find(void*) const'
/usr/local/bin/ld: ../../lib/libFreeCADGui.so: undefined reference to `SoGLTexture3EnabledElement::set(SoState*, SoNode*, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/Main/CMakeFiles/FreeCADMain.dir/build.make:123: bin/FreeCAD] Error 1
make[1]: *** [CMakeFiles/Makefile2:2749: src/Main/CMakeFiles/FreeCADMain.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Built target PathGui
[ 86%] Built target MeshPartGui
[ 88%] Built target SketcherGui
[ 90%] Built target FemGui
[ 93%] Built target TechDraw
make: *** [Makefile:130: all] Error 2

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Unknown
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
summary.txt
(8.42 KiB) Downloaded 39 times
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

Re: FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

Hello Everyone,


About the error described above, for my case the solution was install the follow lib:

Code: Select all

 sudo apt-get install -y libsoqt520-dev
This lib is reefer to SoQt resource.

After it, the command make -j$(nproc --ignore=2) was done successfully. :D

But... during the initialization the FreeCAD 0.20 brings new errors! Lol

During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/igor-medeiros/freecad-build/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/igor-medeiros/freecad-build/Mod/Draft/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/igor-medeiros/freecad-build/Mod/AddonManager/InitGui.py
Please look into the log file for further information
During initialization the error "name '_init_pyside_extension' is not defined" occurred in /home/igor-medeiros/freecad-build/Mod/Tux/InitGui.py
Please look into the log file for further information
Attachments
initialization.txt
(2.65 KiB) Downloaded 35 times
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

Re: FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

So,

this topic brought easily the solution:

https://forum.freecadweb.org/viewtopic.php?f=4&t=54829

I think I got it! :geek:

Thanks!
Attachments
Screenshot from 2021-06-17 13-45-24.png
Screenshot from 2021-06-17 13-45-24.png (142.25 KiB) Viewed 1913 times
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

Re: FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

Hello Everyone,


Now I getting a new error:

Code: Select all

During initialization the error "UI file does not exist" occurred in /home/igor-medeiros/freecad-build/Mod/Arch/InitGui.py
Please look into the log file for further information
During initialization the error "UI file does not exist" occurred in /home/igor-medeiros/freecad-build/Mod/Draft/InitGui.py
Please look into the log file for further information
UI file does not exist
Traceback (most recent call last):
  File "<string>", line 118, in Initialize
FreeCAD open but when I try to initialize any WB it crashs!
So, could someone give me any idea what I can do! Thx.

Summary from cmake build is attached.
Attachments
summary.txt
(6.83 KiB) Downloaded 31 times
Screenshot from 2021-06-17 20-05-00.png
Screenshot from 2021-06-17 20-05-00.png (22.83 KiB) Viewed 1866 times
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

Re: FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

I think that there is any issue with my python and my path.

When I try to code in python console "import FreeCAD" the module didn't found. So when I change PYTHONPATH and added the lib path to FreeCAD.so so this error disappear. But for all MODs the python path is missing the *.py modules and classes.

So, I removed my build folder and when I try to compile again... the pyside2 issue appears. But it is installed.

Code: Select all

-- Compiler: GNU, version: 9.3.0
-- prefix: /usr/local
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.16.3
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.5") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so
-- PyCXX found:
--   Headers:  /home/igor-medeiros/freecad-source/src
--   Sources:  /home/igor-medeiros/freecad-source/src/CXX
--   Version:  6.2.8
-- -- Found OCE/OpenCASCADE version: 7.5.0
-- -- OCE/OpenCASCADE include directory: /usr/local/include/opencascade
-- -- OCE/OpenCASCADE shared libraries directory: /usr/local/lib
-- The imported target "vtkParseOGLExt" references the file
   "/usr/bin/vtkParseOGLExt-7.1"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- The imported target "pvtk" references the file
   "/usr/bin/pvtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake"
but not all the files it references.

-- VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkIOMPIParallel;vtkParallelMPI;vtkhdf5;vtkFiltersParallelDIY2;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType;vtkRenderingOpenGL2
-- Check for medfile (libmed and libmedc) ...
-- We guess that libmed was built using hdf5-openmpi version
-- Checking for module 'Coin'
--   Found Coin, version 4.0.1
-- Coin3D libraries found
-- Shiboken2Config: Using default python: .cpython-38-x86_64-linux-gnu
-- Found PythonInterp: /usr/bin/python3.8 (found suitable version "3.8.5", minimum required is "3") 
-- SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '/usr/include/python3.8'
-- SHIBOKEN_PYTHON_LIBRARIES computed to value: ''
-- libshiboken built for RelWithDebInfo
-- PYTHON_CONFIG_SUFFIX: .cpython-38-x86_64-linux-gnu
-- libshiboken built for RelWithDebInfo
-- ===============================================
PySide2 Python module found at /usr/lib/python3/dist-packages/PySide2.
===============================================

-- Found Matplotlib: /home/igor-medeiros/.local/lib/python3.8/site-packages/matplotlib (found version "3.4.2")
-- Platform is 64-bit, set -D_OCC64
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- setting gcc options: -Wall -Werror -Wno-deprecated -pedantic-errors
-- area module (for Path Workbench) will be installed to: lib
-- Coin3D doc is not installed
-- 
==============
Summary report
==============

-- Build type:          
-- Compiler:            /usr/bin/c++ (9.3.0)
-- Flags:               -Wall -Wextra -Wno-write-strings 
-- Standard:            Requires C++17
-- Python:              3.8.5 [/usr/bin/python3.8] [.cpython-38-x86_64-linux-gnu]
-- PCL:                 not enabled
-- pybind11:            2.4.3
-- Boost:               1.71.0 (1.71.0)
-- XercesC:             3.2.3 [/usr/local/lib/libxerces-c.so] [/usr/local/include]
-- ZLIB:                1.2.11
-- PyCXX:               6.2.8 [/home/igor-medeiros/freecad-source/src]
-- OCC:                 7.5.0 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat] [/usr/local/lib] [/usr/local/include/opencascade]
-- SMESH:               build internal
--  MEDFile:            4.0.0 [/usr/lib/x86_64-linux-gnu/libmedC.so] [/usr/include]
--  HDF5:               1.10.4
--  VTK:                7.1.1
-- NETGEN:              not enabled
-- SWIG:                4.0.1
-- Eigen3               3.3.91
-- Qt5Core:             5.12.8
-- Qt5Network:          5.12.8
-- Qt5Xml:              5.12.8
-- Qt5XmlPatterns:      5.12.8
-- Qt5Widgets:          5.12.8
-- Qt5PrintSupport:     5.12.8
-- Qt5OpenGL:           5.12.8
-- Qt5Svg:              5.12.8
-- Qt5UiTools:          5.12.8
-- Qt5Concurrent:       5.12.8
-- Qt5WebKitWidgets:    5.212.0
-- Shiboken2:           5.14.0 [/usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.14.0] [/usr/include/shiboken2;/usr/include/python3.8]
-- PySide2:             5.14.0 [/usr/lib/../include/PySide2]
-- PySide2Tools:        [/home/igor-medeiros/.local/bin/pyside2-uic] [/home/igor-medeiros/.local/bin/pyside2-rcc]
-- Freetype:            2.10.1
-- OpenGL:              /usr/lib/x86_64-linux-gnu/libGL.so
-- OpenGLU:             [/usr/lib/x86_64-linux-gnu/libGLU.so][/usr/include]
-- Coin3D:              4.0.1 [Coin] [/usr/local/include]
-- Pivy:                0.6.5
-- SPNAV:               [/usr/lib/libspnav.so] [/usr/include]
-- Matplotlib:          3.4.2
-- Rift:                not enabled (BUILD_VR)
-- Doxygen:             1.8.17
--  Language:           English
--  Coin3D_DOC:         not found
=================================================
Now run 'cmake --build /home/igor-medeiros/freecad-build' to build FreeCAD
=================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/igor-medeiros/freecad-build
So... if anyone have any idea to help me I would appreciate!
User avatar
igormedeiros
Posts: 14
Joined: Tue Jun 08, 2021 2:19 pm
Contact:

Re: FreeCAD Compile and Build - Ubuntu 20.04

Post by igormedeiros »

Hello Everyone.


Mission Done!

Lol
Attachments
Screenshot from 2021-06-18 13-12-02.png
Screenshot from 2021-06-18 13-12-02.png (289.57 KiB) Viewed 1778 times
Post Reply