How to activate openCamLib after compiling it

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Erich Schulz
Posts: 141
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: How to activate openCamLib after compiling it

Post by Erich Schulz »

done
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: How to activate openCamLib after compiling it

Post by chrisb »

Thanks!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: How to activate openCamLib after compiling it

Post by sgrogan »

I made a small update.
"fight the good fight"
Erich Schulz
Posts: 141
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: How to activate openCamLib after compiling it

Post by Erich Schulz »

so...

I have successfully compiled OCL... (using the readme https://github.com/aewallin/opencamlib per https://www.freecadweb.org/wiki/OpenCamLib)

and have a functioning version of freecad daily...

but I am getting `OpenCamLib is not working!` (twice AND in red!!!) when I open the path workbench.

any clues??? :?

OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: How to activate openCamLib after compiling it

Post by sgrogan »

Erich Schulz wrote: Wed Jun 26, 2019 12:13 am any clues??? :?
I think you need to set this in CMake

Code: Select all

cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=OFF ../src
See also here: https://forum.freecadweb.org/viewtopic. ... 20#p311763
This is part of zach's GSoC so I think it's OK to ping him in that topic. He had an upstream ocl pull request merged that helps this.
You can turn off or leave on the cxx libs and doc's (FreeCAD doesn't need them).
"fight the good fight"
Erich Schulz
Posts: 141
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: How to activate openCamLib after compiling it

Post by Erich Schulz »

ok... i've been banging at the keyboard randomly....

I've added the following to my bash history :-)

Code: Select all

cmake -DBUILD_PY_LIB=ON -DUSE_PY_3=OFF ../src
sudo make install
cmake -DBUILD_PY_LIB=ON ../src
sudo make install
history | tail
at this point I seem to have several likely looking files based on the end of the last install:

Code: Select all

Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Installing: /usr/local/lib/python2.7/dist-packages/ocl.so
-- Up-to-date: /usr/local/lib/python2.7/dist-packages
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/camvtk.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/pyocl.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/procmemory.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/STLTools.py
-- Up-to-date: /usr/local/lib/opencamlib/libocl.so.2018.08.122
-- Up-to-date: /usr/local/lib/opencamlib/libocl.so
-- Up-to-date: /usr/local/include/opencamlib/arc.hpp
-- Up-to-date: /usr/local/include/opencamlib/bbox.hpp
-- Up-to-date: /usr/local/include/opencamlib/ccpoint.hpp
-- Up-to-date: /usr/local/include/opencamlib/clpoint.hpp
-- Up-to-date: /usr/local/include/opencamlib/line.hpp
-- Up-to-date: /usr/local/include/opencamlib/path.hpp
-- Up-to-date: /usr/local/include/opencamlib/stlreader.hpp
-- Up-to-date: /usr/local/include/opencamlib/stlsurf.hpp
-- Up-to-date: /usr/local/include/opencamlib/triangle.hpp
-- Up-to-date: /usr/local/include/opencamlib/point.hpp
-- Up-to-date: /usr/local/include/opencamlib/ballcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/bullcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/compositecutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/conecutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/cylcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/ellipseposition.hpp
-- Up-to-date: /usr/local/include/opencamlib/millingcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/ellipse.hpp
-- Up-to-date: /usr/local/include/opencamlib/adaptivepathdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/pathdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/batchdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/pointdropcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/brent_zero.hpp
-- Up-to-date: /usr/local/include/opencamlib/kdnode.hpp
-- Up-to-date: /usr/local/include/opencamlib/kdtree.hpp
-- Up-to-date: /usr/local/include/opencamlib/numeric.hpp
-- Up-to-date: /usr/local/include/opencamlib/lineclfilter.hpp
-- Up-to-date: /usr/local/include/opencamlib/clfilter.hpp
-- Up-to-date: /usr/local/include/opencamlib/halfedgediagram.hpp
-- Up-to-date: /usr/local/include/opencamlib/operation.hpp
-- Up-to-date: /usr/local/include/opencamlib/batchpushcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/fiberpushcutter.hpp
-- Up-to-date: /usr/local/include/opencamlib/fiber.hpp
-- Up-to-date: /usr/local/include/opencamlib/interval.hpp
-- Up-to-date: /usr/local/include/opencamlib/waterline.hpp
-- Up-to-date: /usr/local/include/opencamlib/adaptivewaterline.hpp
-- Up-to-date: /usr/local/include/opencamlib/weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/simple_weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/smart_weave.hpp
-- Up-to-date: /usr/local/include/opencamlib/weave_typedef.hpp
-- Up-to-date: /usr/local/include/opencamlib/tsp.hpp
but still I get "OpenCamLib is not working!"
Erich Schulz
Posts: 141
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: How to activate openCamLib after compiling it

Post by Erich Schulz »

I am getting some warnings during the build about boost - but the process seems to roll on - is that the problem or is this a path issue??
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: How to activate openCamLib after compiling it

Post by Russ4262 »

Evening, Sir.
Was just looking through your posts here.
Erich Schulz wrote: Wed Jun 26, 2019 12:13 am so...
I have successfully compiled OCL... (using the readme https://github.com/aewallin/opencamlib per https://www.freecadweb.org/wiki/OpenCamLib)
and have a functioning version of freecad daily...
but I am getting `OpenCamLib is not working!` (twice AND in red!!!) when I open the path workbench.
any clues??? :?

OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)

and this one...
Erich Schulz wrote: Wed Jun 26, 2019 3:34 am ok... i've been banging at the keyboard randomly....
at this point I seem to have several likely looking files based on the end of the last install:

Code: Select all

Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Installing: /usr/local/lib/python2.7/dist-packages/ocl.so
-- Up-to-date: /usr/local/lib/python2.7/dist-packages
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/camvtk.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/pyocl.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/procmemory.py
-- Up-to-date: /usr/local/lib/python2.7/dist-packages/STLTools.py
-- Up-to-date: /usr/local/lib/opencamlib/libocl.so.2018.08.122
-- Up-to-date: /usr/local/lib/opencamlib/libocl.so
...
but still I get "OpenCamLib is not working!"
My observation is that your nightly build is for Python 3.6 and your recent successful build of OCL is for Python 2.7 based upon quoted code snippet above.

You will need to attempt an OCL build with Python 3.6 - probably a CMake flag or similar in the source/build files.
OR
You will need to install a nightly build based on Python 2.7 that should be compatible with your successful OCL build for Python 2.7.

Disclaimer: I don't have a Linux machine, so perhaps I don't have the whole picture.

Best wishes,
Russ
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to activate openCamLib after compiling it

Post by quick61 »

Your FreeCAD Python version is 3.6.8 and your building OCL for 2.7. Not going to work. Please let me know if you get OCL to build with Python 3.6.8. on 18.04.2, and how you did it. Haven't figured that one out yet....

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Erich Schulz
Posts: 141
Joined: Tue May 07, 2019 10:50 pm
Location: Brisbane, Australia

Re: How to activate openCamLib after compiling it

Post by Erich Schulz »

thanks Russ - I thought I had both a 3.x and 2 version - but like you I'm a bit out of my depth :-/
Post Reply