Trouble finding OpenCamLib [FIXED]

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
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Trouble finding OpenCamLib [FIXED]

Post by freman »

FreeCAD built from master is having trouble finding OpenCamLib

Code: Select all

09:45:52  This operation requires OpenCamLib to be installed.
09:45:52  Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
files are installed in /usr/local/include and so in /usr/local/lib

Code: Select all

#ls  /usr/local/lib/opencamlib/libocl.so.2019.07.21
/usr/local/lib/opencamlib/libocl.so.2019.07.21
I run cmake with fairly explict rules:

Code: Select all

cmake  -Wno-dev -S ../FreeCAD -DBUILD_FEM=OFF -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3  -DCCACHE_PROGRAM=  -DBUILD_OPENSCAD=OFF -DBUILD_SMESH=ON

Code: Select all

==============
Summary report
==============

-- Build type:          
-- Compiler:            /bin/c++ (11.1.1)
-- Flags:               -Wall -Wextra -Wno-write-strings 
-- Standard:            Requires C++17
-- Python:              3.9.5 [/usr/bin/python3] [.cpython-39-x86_64-linux-gnu]
-- PCL:                 not enabled
-- pybind11:            not enabled
-- Boost:               1.75.0 (107500)
-- XercesC:             3.2.3 [/usr/lib64/libxerces-c.so] [/usr/include]
-- ZLIB:                1.2.11
-- PyCXX:               6.2.8 [/svn/FreeCAD/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.1.0 [/usr/lib64/libmedC.so;/usr/lib64/libmed.so] [/usr/include/med]
--  HDF5:               1.10.6
--  VTK:                9.0.1
-- NETGEN:              not enabled
-- SWIG:                4.0.2
-- Eigen3               3.3.9
-- Qt5Core:             5.15.2
-- Qt5Network:          5.15.2
-- Qt5Xml:              5.15.2
-- Qt5XmlPatterns:      5.15.2
-- Qt5Widgets:          5.15.2
-- Qt5PrintSupport:     5.15.2
-- Qt5OpenGL:           5.15.2
-- Qt5Svg:              5.15.2
-- Qt5UiTools:          5.15.2
-- Qt5Concurrent:       5.15.2
-- Qt5WebKitWidgets:    5.212.0
-- Shiboken2:           5.15.2 [/lib64/cmake/Shiboken2-5.15.2] [/usr/include/shiboken2;/usr/include/python3.9]
-- PySide2:             5.15.2 [/usr/include/PySide2]
-- PySide2Tools:        [/bin/uic-qt5] [/bin/rcc-qt5]
-- Freetype:            2.10.4
-- OpenGL:              /usr/lib64/libGL.so
-- OpenGLU:             [/usr/lib64/libGLU.so][/usr/include]
-- Coin3D:              4.0.0 [Coin] [/usr/include/Coin4]
-- Pivy:                0.6.5
-- SPNAV:               [SPNAV_LIBRARY-NOTFOUND] [SPNAV_INCLUDE_DIR-NOTFOUND]
-- Matplotlib:          3.4.1
-- Rift:                not enabled (BUILD_VR)
-- Doxygen:             1.9.1
--  Language:           English
--  Coin3D_DOC:         not found
=================================================
Now run 'cmake --build /svn/freecad-build' to build FreeCAD
=================================================

I was expecting to see some mention there but it's neither found nor missing. :?

I had all this working previously but just did a distro upgrade and I'm still trying to pick up the pieces.

Previously, I did a local build, ran make install and that seems to be still OK.

What am I missing for FC not to be finding it when it starts Path WB ?

TIA.
Last edited by freman on Sun May 16, 2021 10:27 am, edited 1 time in total.
Syres
Veteran
Posts: 2901
Joined: Thu Aug 09, 2018 11:14 am

Re: Trouble finding OpenCamLib

Post by Syres »

freman wrote: Sun May 16, 2021 8:17 am

Code: Select all

#ls  /usr/local/lib/opencamlib/libocl.so.2019.07.21
/usr/local/lib/opencamlib/libocl.so.2019.07.21

Code: Select all

-- Python:              3.9.5 [/usr/bin/python3] [.cpython-39-x86_64-linux-gnu]
OpenCamLib isn't built and as far as I know has never been built with the FreeCAD unless you have the Conda packaging. It's always been a separate library that in my case I would need to build to match my Linux Python version 3.6.9. I was always under the impression that Ocl had to be built on the Python major and minor version that it's being used but the Wiki only talks about the major version. If I am correct, then you might be lucky in that the Appimage which contains the Ocl library is I believe Python 3.9.x, so you could extract and use that one.

https://wiki.freecadweb.org/OpenCamLib#Linux
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Trouble finding OpenCamLib

Post by freman »

Thanks, I added -DBUILD_PY_LIB=ON -DUSE_PY_3=ON to cmake line and it seems to have fixed it.

Not sure why this was not needed before, it must have been 18mo since I migrated to py3.

Thanks for the help .
Post Reply