OpenCAMlib for Windows

Here's the place for discussion related to CAM/CNC and the development of the Path module.
mlampert
Posts: 1489
Joined: Fri Sep 16, 2016 9:28 pm

Re: OpenCAMlib for Windows

Postby mlampert » Mon Jul 10, 2017 6:13 pm

opencamlib is GPLv3 - I thought we can't use it, can we?
User avatar
looo
Posts: 3482
Joined: Mon Nov 11, 2013 5:29 pm

Re: OpenCAMlib for Windows

Postby looo » Mon Jul 10, 2017 7:07 pm

mlampert wrote:opencamlib is GPLv3 - I thought we can't use it, can we?
I think once you have a GPL3 library available in your FreeCAD package and it is used by internal code (ocl is used by Path) your FreeCAD will be converted to GPL3. So if directly provided by the libpacks, I think FreeCAD for windows will be GPL3.
User avatar
looo
Posts: 3482
Joined: Mon Nov 11, 2013 5:29 pm

Re: OpenCAMlib for Windows

Postby looo » Mon Jul 10, 2017 7:37 pm

With windows and py3 I get the known issue:

Code: Select all

ocl_algo.cpp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""class ocl
::Point const volatile * __cdecl boost::get_pointer<class ocl::Point const volat
ile >(class ocl::Point const volatile *)" (??$get_pointer@$$CDVPoint@ocl@@@boost
@@YAPEDVPoint@ocl@@PEDV12@@Z)".
ocl_geometry.cpp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Sy
mbol ""class ocl::Bbox const volatile * __cdecl boost::get_pointer<class ocl::Bb
ox const volatile >(class ocl::Bbox const volatile *)" (??$get_pointer@$$CDVBbox
@ocl@@@boost@@YAPEDVBbox@ocl@@PEDV12@@Z)" in Funktion ""public: static struct _o
bject * __cdecl boost::python::objects::make_instance_impl<class ocl::Bbox,struc
t boost::python::objects::pointer_holder<class ocl::Bbox *,class ocl::Bbox>,stru
ct boost::python::objects::make_ptr_instance<class ocl::Bbox,struct boost::pytho
n::objects::pointer_holder<class ocl::Bbox *,class ocl::Bbox> > >::execute<class
 ocl::Bbox *>(class ocl::Bbox * &)" (??$execute@PEAVBbox@ocl@@@?$make_instance_i
mpl@VBbox@ocl@@U?$pointer_holder@PEAVBbox@ocl@@V12@@objects@python@boost@@U?$mak
e_ptr_instance@VBbox@ocl@@U?$pointer_holder@PEAVBbox@ocl@@V12@@objects@python@bo
ost@@@456@@objects@python@boost@@SAPEAU_object@@AEAPEAVBbox@ocl@@@Z)".
ocl_algo.cpp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
 ""class ocl::CCPoint const volatile * __cdecl boost::get_pointer<class ocl::CCP
oint const volatile >(class ocl::CCPoint const volatile *)" (??$get_pointer@$$CD
VCCPoint@ocl@@@boost@@YAPEDVCCPoint@ocl@@PEDV12@@Z)" in Funktion ""public: stati
c struct _object * __cdecl boost::python::objects::make_instance_impl<class ocl:
:CCPoint,struct boost::python::objects::pointer_holder<class ocl::CCPoint *,clas
s ocl::CCPoint>,struct boost::python::objects::make_ptr_instance<class ocl::CCPo
int,struct boost::python::objects::pointer_holder<class ocl::CCPoint *,class ocl
::CCPoint> > >::execute<class ocl::CCPoint *>(class ocl::CCPoint * &)" (??$execu
te@PEAVCCPoint@ocl@@@?$make_instance_impl@VCCPoint@ocl@@U?$pointer_holder@PEAVCC
Point@ocl@@V12@@objects@python@boost@@U?$make_ptr_instance@VCCPoint@ocl@@U?$poin
ter_holder@PEAVCCPoint@ocl@@V12@@objects@python@boost@@@456@@objects@python@boos
t@@SAPEAU_object@@AEAPEAVCCPoint@ocl@@@Z)".
ocl.pyd : fatal error LNK1120: 4 nicht aufgelöste Externe
maybe similar to this one here: https://github.com/inducer/meshpy/issue ... -310701623
mlampert
Posts: 1489
Joined: Fri Sep 16, 2016 9:28 pm

Re: OpenCAMlib for Windows

Postby mlampert » Mon Jul 10, 2017 8:29 pm

looo wrote:
Mon Jul 10, 2017 7:07 pm
I think once you have a GPL3 library available in your FreeCAD package and it is used by internal code (ocl is used by Path) your FreeCAD will be converted to GPL3. So if directly provided by the libpacks, I think FreeCAD for windows will be GPL3.
I wasn't aware we already use it - if we do, should we make its use optional? Enable that functionality only if ocl is installed?
User avatar
looo
Posts: 3482
Joined: Mon Nov 11, 2013 5:29 pm

Re: OpenCAMlib for Windows

Postby looo » Mon Jul 10, 2017 9:15 pm

mlampert wrote:I wasn't aware we already use it - if we do, should we make its use optional? Enable that functionality only if ocl is installed?
It is used only if available (optional): https://github.com/FreeCAD/FreeCAD/blob ... y#L305L310
It is not a problem this way. But if it is provided by libpacks the license of the win-build is GPL3. I don't think this is currently a problem for anybody.?
mlampert
Posts: 1489
Joined: Fri Sep 16, 2016 9:28 pm

Re: OpenCAMlib for Windows

Postby mlampert » Mon Jul 10, 2017 11:55 pm

I don't use Windows - but I wouldn't necessarily want a GPL v3 on my FC - personal choice.
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: OpenCAMlib for Windows

Postby peterl94 » Tue Jul 11, 2017 2:41 am

Licenses... :( Couldn't we just provide a windows build of ocl? Sure it is not as convenient as bundling it with freecad, but it would certainly be less of a barrier than having to compile it yourself. If we are going to bundle it with freecad, than we should provide an additional download that shows it is GPL. FreeCAD should be available under the same licence on all platforms.
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Postby sgrogan » Tue Jul 11, 2017 9:02 pm

peterl94 wrote:
Tue Jul 11, 2017 2:41 am
Licenses... :( Couldn't we just provide a windows build of ocl?
OK, how about something like this? https://github.com/sgrogan/opencamlib/r ... ag/8612634
"fight the good fight"
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: OpenCAMlib for Windows

Postby peterl94 » Tue Jul 11, 2017 9:55 pm

sgrogan wrote:
Tue Jul 11, 2017 9:02 pm
OK, how about something like this?
Yeah, that is what I was thinking of.
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: OpenCAMlib for Windows

Postby sgrogan » Tue Jul 11, 2017 10:16 pm

peterl94 wrote:
Tue Jul 11, 2017 9:55 pm
Yeah, that is what I was thinking of.
It works as a FreeCAD module but not as a site-package. We would need some sort of _init_.py?
Anyway, this is good for now, thanks again Peter for the cmake support. I wanna go back to Py3.x for Win, which will eventually come back here.
If you submit the stuff upstream and it's accepted I will rework the fork, or maybe just offer upstream the binaries. I packaged the lib as a module and as a .zip file, so maybe we can handle it with a win specific block in the add-ons installer.
"fight the good fight"