Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Hello all,
I have wanted to help on FreeCAD development since some years ago, when I worked with AutoCAD, Catia and other CAD/CAE tools before becoming a programmer. Now I use NetBSD and I thought it would be a nice objective to try to port it to NetBSD (and other BSD cousins). By doing that, I could get a general overview of the code, the building system and its dependencies.
To accomplish that, I had first to create packages of OpenCASCADE and SoQt to the pkgsrc package manager (www.pkgsrc.org). I will ask the pkgsrc-wip (pkgsrc-wip.sf.net) manager to add them. OpenCASCADE should compile out of the box on FreeBSD, but I had to patch one line to make it compile under NetBSD. I didn't had any bigger problem with SoQt, (besides a BSD Make vs. GNU Make issue) but I wondered why you are using SoQt 1.4.1 instead of Quarter or SoQt 1.5.0, because the Spaceball thing?
After having all dependencies installed and [probably] working on NetBSD, I checked out and tried to compile FreeCAD. I had to change some files in cMake/ directory, to make cmake find dependencies that were in unexpectedly places (pkgsrc by default installs everything in /usr/pkg). Let me make a note here: I found them a bit disorganized, since each .cmake file in that directory has a different way to find dependencies across the different system it supports. Would be a patch to standardize them welcome?
After having cmake find all the dependencies (which took some time), I started the compilation phase. Basically, I didn't have to do anything hard besides adding the FC_OS_BSD to FCConfig.h and append "|| defined(FC_OS_BSD)" on lines that have platform specific conditionals. The same code that runs on GNU/Linux seem to run fine on NetBSD.
I stopped the build at 37% because a crash that needs a "|| defined(FC_OS_BSD)" to be fixed, but I intend to resume the work tonight (GMT+03).
So, here are some questions...
1. Would support for BSD be acceptable? I can support that. I don't want to write down the advantages of portability just now, but we can talk about.
2. cMake/*.cmake needs refactoring to standardize those files?
3. Whenever a OS is not detected in FCConfig.h, should we suppose a general FC_OS_UNIX or something like that?
4. Are mailing lists dead? Is this forum the main place to talk about FreeCAD use and development?
It is just it for now...
Thank you very much!
I have wanted to help on FreeCAD development since some years ago, when I worked with AutoCAD, Catia and other CAD/CAE tools before becoming a programmer. Now I use NetBSD and I thought it would be a nice objective to try to port it to NetBSD (and other BSD cousins). By doing that, I could get a general overview of the code, the building system and its dependencies.
To accomplish that, I had first to create packages of OpenCASCADE and SoQt to the pkgsrc package manager (www.pkgsrc.org). I will ask the pkgsrc-wip (pkgsrc-wip.sf.net) manager to add them. OpenCASCADE should compile out of the box on FreeBSD, but I had to patch one line to make it compile under NetBSD. I didn't had any bigger problem with SoQt, (besides a BSD Make vs. GNU Make issue) but I wondered why you are using SoQt 1.4.1 instead of Quarter or SoQt 1.5.0, because the Spaceball thing?
After having all dependencies installed and [probably] working on NetBSD, I checked out and tried to compile FreeCAD. I had to change some files in cMake/ directory, to make cmake find dependencies that were in unexpectedly places (pkgsrc by default installs everything in /usr/pkg). Let me make a note here: I found them a bit disorganized, since each .cmake file in that directory has a different way to find dependencies across the different system it supports. Would be a patch to standardize them welcome?
After having cmake find all the dependencies (which took some time), I started the compilation phase. Basically, I didn't have to do anything hard besides adding the FC_OS_BSD to FCConfig.h and append "|| defined(FC_OS_BSD)" on lines that have platform specific conditionals. The same code that runs on GNU/Linux seem to run fine on NetBSD.
I stopped the build at 37% because a crash that needs a "|| defined(FC_OS_BSD)" to be fixed, but I intend to resume the work tonight (GMT+03).
So, here are some questions...
1. Would support for BSD be acceptable? I can support that. I don't want to write down the advantages of portability just now, but we can talk about.
2. cMake/*.cmake needs refactoring to standardize those files?
3. Whenever a OS is not detected in FCConfig.h, should we suppose a general FC_OS_UNIX or something like that?
4. Are mailing lists dead? Is this forum the main place to talk about FreeCAD use and development?
It is just it for now...
Thank you very much!
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Here we go again.
I just successfully built FreeCAD on NetBSD! Simple patches were necessary on the code, basically appending || defined(FC_OS_BSD) where defined(FC_OS_LINUX) was present, as I said in my last message. A place was a bit more difficult, though: implementing fcvt() used in src/Mod/Mesh/App/Core/MeshIO.cpp, since this function is available only in Windows and GNU LibC (not present in NetBSD).
As a prove, I give you a screenshot: http://img713.imageshack.us/img713/8791 ... otroot.png
As you can see, I'm having problems with PyQt and the OpenCascade, but FreeCAD is compiled and its first screen run on NetBSD
I'm still looking forward answers to this thread... Maybe answering questions I did in my last post.
Thank you very much.
I just successfully built FreeCAD on NetBSD! Simple patches were necessary on the code, basically appending || defined(FC_OS_BSD) where defined(FC_OS_LINUX) was present, as I said in my last message. A place was a bit more difficult, though: implementing fcvt() used in src/Mod/Mesh/App/Core/MeshIO.cpp, since this function is available only in Windows and GNU LibC (not present in NetBSD).
As a prove, I give you a screenshot: http://img713.imageshack.us/img713/8791 ... otroot.png
As you can see, I'm having problems with PyQt and the OpenCascade, but FreeCAD is compiled and its first screen run on NetBSD
I'm still looking forward answers to this thread... Maybe answering questions I did in my last post.
Thank you very much.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Hello,
On the Linux platforms we usually use the version of SoQt which is available there as package, e.g. 1.4.2 on Debian. On Windows we went back to 1.4.1 because with 1.5.0 we had a thread problem. Quarter is not an option at all at the moment because this would require many changes and btw. there is currently no Linux distribution offering this as package.but I wondered why you are using SoQt 1.4.1 instead of Quarter or SoQt 1.5.0, because the Spaceball thing?
Not sure what you mean!? If you provide a patch we can discuss this point.I found them a bit disorganized, since each .cmake file in that directory has a different way to find dependencies across the different system it supports. Would be a patch to standardize them welcome?
Sure, we are always interested in making FreeCAD to run on as many platforms as possible.1. Would support for BSD be acceptable? I can support that. I don't want to write down the advantages of portability just now, but we can talk about.
See above.2. cMake/*.cmake needs refactoring to standardize those files?
I have no idea if the API of system headers is the same on all UNIX versions or whether there are slightly differences.3. Whenever a OS is not detected in FCConfig.h, should we suppose a general FC_OS_UNIX or something like that?
We reanimated it a couple of months ago. Although 99% of the communication takes place in the php forum you can also the mailing list.4. Are mailing lists dead? Is this forum the main place to talk about FreeCAD use and development?
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
I don't remember what exactly this function does but we can check an alternative implementation without using this function.I just successfully built FreeCAD on NetBSD! Simple patches were necessary on the code, basically appending || defined(FC_OS_BSD) where defined(FC_OS_LINUX) was present, as I said in my last message. A place was a bit more difficult, though: implementing fcvt() used in src/Mod/Mesh/App/Core/MeshIO.cpp, since this function is available only in Windows and GNU LibC (not present in NetBSD).
OK, I see. But you're still not finished as the error messages tells meAs a prove, I give you a screenshot: http://img713.imageshack.us/img713/8791 ... otroot.png
In case OpenCascade was completely built you may set LD_LIBRARY_PATH accordingly!?As you can see, I'm having problems with PyQt and the OpenCascade, but FreeCAD is compiled and its first screen run on NetBSD
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Hi again.
Since it would be fine using the mailing list, I answered those questions there:
https://sourceforge.net/mailarchive/for ... evelopment
Anyway, just tell me if you prefer the forum.
Thanks!
Since it would be fine using the mailing list, I answered those questions there:
https://sourceforge.net/mailarchive/for ... evelopment
Anyway, just tell me if you prefer the forum.
Thanks!
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Hello
Is there any support for NetBSD? Binaries would be great.
I tried build from source too but preparing dependicies is hard or maybe impossible.
Is there any support for NetBSD? Binaries would be great.
I tried build from source too but preparing dependicies is hard or maybe impossible.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
OK, you win the award. I have never seen a necrobump of more than 8 years.
Gene
Gene
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Quick search indicates FreeBSD did get some FreeCAD packaging love in the past. As FreeCAD 0.17 was made available. But now it looks like, due to Qt 4 removal, first dependencies like PySide 2 will need to get tackled. Before FreeCAD will be able to get compiled against Qt 5 again.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
According to issue #3653 FreeCAD compiles on FreeBSD.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Yes that is correct. FreeCAD 0.17 should be available on FreeBSD. But i took a look in their changelog and noticed:
And unfortunately i can't find PySide2 package here:
https://www.freebsd.org/cgi/ports.cgi
Therefore FreeBSD will likely drop FreeCAD package in March 2019. Said that hopefully it won't take long before packages like PySide2 will get provided. And FreeCAD package to be made available again on FreeBSD.
https://svnweb.freebsd.org/ports/head/c ... /?view=logMark QT4 ports/functionality for removal on 2019-03-15
And unfortunately i can't find PySide2 package here:
https://www.freebsd.org/cgi/ports.cgi
Therefore FreeBSD will likely drop FreeCAD package in March 2019. Said that hopefully it won't take long before packages like PySide2 will get provided. And FreeCAD package to be made available again on FreeBSD.