OpenCamLib is not working! Fixed for python 2.7

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: OpenCamLib is not working!

Post by freman »

Thanks, so what is the bottom line here?

Is there a fix or is FreeCAD broken until someone at OCL debugs the bindings mess?
What does this affect, can it just be ignored?

mlampert says:
you actually need to build the python 3 ocl bindings
How do you do that ?
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: OpenCamLib is not working!

Post by herbk »

OCL is only used for creating 3D milling path and it's the only thing what is not working for me.
Gruß Herbert
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: OpenCamLib is not working!

Post by herbk »

looo wrote: Thu May 30, 2019 10:43 am ....Once done ocl can be installed via conda and we can include the results in the bundles (appimage/ dmg) if wanted.
Having OCL as part of FC would be great...
Gruß Herbert
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCamLib is not working!

Post by sgrogan »

Guys, notice freman's OP, he's using Py2
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCamLib is not working!

Post by sgrogan »

I little more research and I think libocl.so is the C++ library. The python binding should be ocl.so.

I don't have a working linux box at the moment, but who has cmake-gui and wants to be my eyes?

EDIT: Who has working an ocl and how? OS/Distro/PY2-3? Maybe also CMake version boost detection seems different on more recent cmakes.
"fight the good fight"
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: OpenCamLib is not working!

Post by freman »

Code: Select all

file /usr/local/lib/opencamlib/libocl.so.2018.08.122
/usr/local/lib/opencamlib/libocl.so.2018.08.122: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=74a492995509aff8809bb1b55dd5e7a310c89e60, not stripped
I have just installed cmake-gui, never used it.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCamLib is not working!

Post by sgrogan »

freman wrote: Fri May 31, 2019 10:07 pm I have just installed cmake-gui, never used it.
If you run

Code: Select all

cmake-gui .
from the ocl build directory, what does it look like? Mine is like this on Win (there are problems), notice I have Grouped and Adavanced checked.
Capture.PNG
Capture.PNG (55.58 KiB) Viewed 1016 times
"fight the good fight"
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: OpenCamLib is not working!

Post by freman »

I ran configure and PY_BUILD_LIB and USE_PY_3 are not checked.
Nothing about python under boost.
the text window notably shows this:

Code: Select all

Detecting CXX compile features - done
 Note: will NOT build python library
 Note: will NOT build emscripten library
C++ compiler version: 8.3.1 [/bin/c++]
I then checked the missing items and reran configure, the result is below.
I checked with my package manager:

Code: Select all

Package boost-python3-devel-1.66.0-14.fc29.x86_64 is already installed.
Package boost-python2-devel-1.66.0-14.fc29.x86_64 is already installed.
Package python3-devel-3.7.3-3.fc29.x86_64 is already installed.
Attachments
cmake-gui.png
cmake-gui.png (53.38 KiB) Viewed 1007 times
Last edited by freman on Sat Jun 01, 2019 10:17 am, edited 1 time in total.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCamLib is not working!

Post by sgrogan »

You should not check USE_PY_3.
Your OP shows that your FreeCAD uses 2.7.x, you want to match this version.
"fight the good fight"
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: OpenCamLib is not working!

Post by freman »

OK, I flipped that one off again. There seems to be some double use going on.

Code: Select all


CMake Error at src/cxxlib/cxxlib.cmake:5 (add_subdirectory):
  The binary directory

    ~/opencamlib/src/cutters

  is already used to build a source directory.  It cannot be used to build
  source directory

    ~/opencamlib/src/cutters

  Specify a unique binary directory name.
Call Stack (most recent call first):
  src/CMakeLists.txt:254 (include)
I get this for all the subdirectories at that level. I manually removed them and re-ran, it produced the same errors. No idea whether that is a real problem.
During building FreeCAD there was similar messages about not finding Boostdir but later output clearly showed it had detect boost 1.6.6 . As noted above, both boost-python devel packages are installed as are the two versions of python headers.

Code: Select all

Package python3-devel-3.7.3-3.fc29.x86_64 is already installed.
Package python2-devel-2.7.15-11.fc29.x86_64 is already installed.
Attachments
cmake-gui2.png
cmake-gui2.png (67.26 KiB) Viewed 991 times
Last edited by freman on Sat Jun 01, 2019 10:16 am, edited 1 time in total.
Post Reply