[DONE] OpenBSD Port

AFAIK libarea hasn’t been maintained for quite some time and I think realthunder made some changes/fixes to it when he worked on the integration.

https://github.com/FreeCAD/FreeCAD/pull/10804

Sorry if this is a ports newbie question (I’ve read: https://man.openbsd.org/bsd.port.mk.5), but what’s the policy to deal with

Error: Libraries in packing-lists…and libraries from installed packages don’t match

Particularly, I’m first seeing it in:

— /tmp/dep_cache.eKYcVSCQn/portstree-libarchive-3.6.2p0 Sat Sep 30 15:10 :46 2023
+++ /tmp/dep_cache.eKYcVSCQn/inst-libarchive-3.6.2p0 Sat Sep 30 15:10:46 2023
@@ -8,4 +8,4 @@

Although, tbh I am not sure if this is a mismatch, or why it is. The versions look the same, the prefix does not.

If I interpreted this correctly the FreeCAD package asks for libarchive-3.6.2p0, but it is not installed.

Although, I am not sure where the packing-list for this even is.

Hi mavavilj,

Could you perhaps provide a little more context to what you are trying to achieve? Are you trying to port a dependency of FreeCAD?

What exactly are you running to get that error? I think it could be that your packages and ports tree are out-of-sync, but I’m not entirely sure. If you are running -current (which you should if you are trying to port something) make sure to update to the latest snapshot with sysupgrade and update your packages after the reboot with pkg_add -u. Lastly update your ports tree.

Hope this helps.

I am running “make” in the freecad directory of jasperla/openbsd-wip.

I think the problem was that my ports tree wasn’t up to date. And as a newbie I was confused about where to get the dependencies. Then I asked, and now I think I must get the dependencies from the ports tree, and not via pkg_add.

Also, is one supposed to run release, stable or current to build these?

This should fail anyways as not all required dependencies have been ported yet.

AFAIK you can use pkg_add but then your ports and packages have to be both up-to-date. Of course ports should always be a little bit ahead than packages since I don’t think snapshots are made after every commit to the ports tree, so I guess there could be times when you will need to use ports to get the newest version/revision of a dependency. I’m used to installing dependencies with pkg_add to avoid having to compile them and so far I haven’t had any issues.

If you are working with ports, you should be using current.

Then what am I supposed to run? I thought the whole porting thing is about running make and fixing the errors it gives.

Absolutely and the errors you’ll initially get are about missing dependencies. So we first have to port those and then come back to FreeCAD.

I see, thanks. Could you please clarify this for us realthunder?

Thanks yorik! I’ll backport this in the port until next release to avoid the soqt dependency.

wmayer, quick question: Does occt need to be compiled with VTK support to use it in FreeCAD? Currently there is only oce available on OpenBSD and I’m working on replacing it with occt, but I’m not sure what options to use.

For an overview of the occt compile options see here. From those only FreeType and Tcl/Tk seem to be required.

Does occt need to be compiled with VTK support to use it in FreeCAD?

No. For rendering we don’t use OCCT or vtk but Coin3D. From OCC we only use the modelling algorithms and little parts of the OCAF framework

Got it, thanks!

So how probable is it that you’ve interpreted that the port is even feasible?

Linuxes and BSDs have no binary compatibility, but source is compatible with standard libraries. If the project uses libraries that are non-standard, then we might be looking at a mess.

Why wouldn’t it? FreeCAD is built to be multiplatform.

Yup, welcome to the mess. As explained before, we need to port those non-standard libraries (listed in the first post) before even thinking about porting FreeCAD.

Now I did with a fresh fetch of openbsd-wip (in /freecad/):

make

(notice cmake is missing. Install it via pkg_add, then remove it due to it being wrong version)

pkg_delete -a (to delete extra stuff that may have gotten)

make

(notice the make output is different)

Not sure if pkg_delete -a retained coherency of the build.

mavavilj I’m not sure what you need.

I was just giving an example that at this point I am not sure if even standard

pkg_

or

make

commands behave as they should. To me

pkg_delete -a

seemed to delete some deps installed during an incomplete

make

in /freecad/ repo. After trying

make

again I am not sure if the build started from zero and is equivalent to the “virgin” build.

You probably need to clean the build directory with

make clean

Have you read the OpenBSD Porting guide?

Yes, but I found no guarantees that even make clean is implemented by the Makefile.