[DONE] OpenBSD Port

The targets are not defined in the port Makefile, but are included by the line .include <bsd.port.mk>.
Please consider asking questions that are not specific to the FreeCAD port in the mailing list (ports@openbsd.org).

I think you will want to move the discussion elsewhere eventually anyways. It could use categories etc.

How long does the build take approximately?

I was building it on a 3740QM and it was running over 2 hours until I decided that I will see whether to get a faster build machine.

wmayer, I see most ports out there use the Salome SMESH included in the FreeCAD source tree. Is there any specific reason for this? Also I’m having trouble finding documentation on how to compile it from source. Could you perhaps provide any useful hints about this please?

wmayer Also, regarding orocos-kdl, are the python bindings needed? Or only the C++ library?

Is there any specific reason for this?

It’s because there are no official packages for most Linux distributions. But in our CMake there is an option to use an external SMESH library if you need it (FREECAD_USE_EXTERNAL_SMESH).

If you prefer you can use trelau’s fork of SMESH https://github.com/trelau/SMESH which was/is used for the Conda builds AFAIK.

Also I’m having trouble finding documentation on how to compile it from source.

The included SMESH has dependencies to other 3rd party libraries: medC, hdf5 and optionally netgen/nglib. The most difficult part is to get working the netgen/nglib support because the versioning of this library is a big mess. It’s not a big issue if netgen support is not working because as alternative gmsh (as external application) can be used.

Also, regarding orocos-kdl, are the python bindings needed? Or only the C++ library?

The C++ library is sufficient.

Ah nice! I see that other distros (e.g. fedora) are using this fork for their ports. I’ll see how far I can get with it. Thanks!

Got it, thanks!

Can you set up some more organized place for keeping track of things, in particular ports of dependencies?

I was going to work with Shiboken, but then I read this thread and it just has some info on where the source might be (although I couldn’t find the said “tar”). Further, I am not sure what the current state is with the Shiboken port.

As explained in the top post, you can find my work on the dependencies in my personal repo which you can clone (see the ssh://anon… url) and tweak as you please.

It’s pretty much done IMO, but testing is welcome. Also see here for a discussion about the port in the ports@ mailing list.

Source tarballs for PySide6 and shiboken6 can be found at https://download.qt.io/official_releases/QtForPython/pyside6/
Unlike with older versions it’s now a single tarball that contains the code for PySide6 and shiboken6.

It says in the README:

Unless otherwise stated (e.g. in a commit message), the ports listed here may be at any stage in their development, so use them at your own risk.

This is not exactly what I was asking for. I am asking for a way to know how to avoid duplicate work in case someone has already fixed a part of a port or a dependency port.

Once again, you can clone my personal git repo of WIP ports and make any tweaks you want. If you want me to include those changes is my repo, send me an E-Mail with a patch or suggest them in the mailing list post I sent before (also with a patch). Lastly you can always rebase your work on my changes if you want to track my work. Standard git. If this doesn’t answer your question, then I don’t know what you want.

I kindly ask you to reply to this post privately as I don’t want to fill this thread with more noise. Thanks.

OpenBSD relevance?
I studied this topic a bit more, and I am thinking that porting to OpenBSD could be non-sensical, because the port already exists for FreeBSD, and the reason is that FreeBSD is more general-purpose than OpenBSD. I am not sure, if people will actually want to run CAD on OpenBSD, because OpenBSD seems more geared towards servers and the sorts, not desktop use.

On top of that, many industry players release code for FreeBSD, not OpenBSD:

https://www.nvidia.com/en-us/drivers/unix/

Or Linux, in which case you want the Linuxulator, which OpenBSD does not support.

OpenBSD just does not seem built for this kind of stuff.


I was just checking that you’re aware of the differences mentioned above.

I want to use it, which is why I’m working on the port. Whether it gets imported to the ports repository or not, that’s another issue. OpenBSD is great for desktop and more CAD programs are welcome. If you prefer FreeBSD, then please go ahead and use it instead.

Now I don’t mean to be rude, but this thread is about discussing work for porting FreeCAD to OpenBSD and not for expressing your opinion about if it should be done or not. If you want to work on the port, your help is welcomed and appreciated, if not, great, just don’t.

An interesting effort, which I applaud; the work of porting is a great way to uncover issues and make improvements in areas that rarely see any attention, so kudos to you and I look forward to seeing continued updates.

Thank you for the kind words kkremitzki, they motivate me a lot. I’m almost finished with porting all FreeCAD dependencies (only VTK left; EDIT: and maybe SMESH), so hopefully I can post some good news here soon :slight_smile:

wmayer The pyside6-tools package installs some binaries that are named very generically (e.g. deploy.py, project.py, assistant). I’m considering following what was done for the FreeBSD package and store these binaries under a dedicated directory e.g. /usr/local/bin/pyside6-tools/. However I’m not sure if this could cause any issues with FreeCAD. The FreeBSD FreeCAD port still uses pyside2, so they can’t tell either.

The following is the list of binaries installed by pyside6-tools. Do you know if any of these are required by FreeCAD?

bin/android_deploy.py
@bin bin/assistant
bin/deploy.py
bin/deploy_lib/
bin/deploy_lib/__init__.py
${MODPY_COMMENT}bin/deploy_lib/${MODPY_PYCACHE}/
bin/deploy_lib/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/${MODPY_PYCACHE}commands.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/${MODPY_PYCACHE}config.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/${MODPY_PYCACHE}deploy_util.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/${MODPY_PYCACHE}nuitka_helper.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/${MODPY_PYCACHE}python_helper.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/android/
bin/deploy_lib/android/__init__.py
${MODPY_COMMENT}bin/deploy_lib/android/${MODPY_PYCACHE}/
bin/deploy_lib/android/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/android/${MODPY_PYCACHE}android_helper.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/android/${MODPY_PYCACHE}buildozer.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/android/android_helper.py
bin/deploy_lib/android/buildozer.py
bin/deploy_lib/android/recipes/
bin/deploy_lib/android/recipes/PySide6/
bin/deploy_lib/android/recipes/PySide6/__init__.tmpl.py
${MODPY_COMMENT}bin/deploy_lib/android/recipes/PySide6/${MODPY_PYCACHE}/
bin/deploy_lib/android/recipes/PySide6/${MODPY_PYCACHE}__init__.tmpl.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/android/recipes/shiboken6/
bin/deploy_lib/android/recipes/shiboken6/__init__.tmpl.py
${MODPY_COMMENT}bin/deploy_lib/android/recipes/shiboken6/${MODPY_PYCACHE}/
bin/deploy_lib/android/recipes/shiboken6/${MODPY_PYCACHE}__init__.tmpl.${MODPY_PYC_MAGIC_TAG}pyc
bin/deploy_lib/commands.py
bin/deploy_lib/config.py
bin/deploy_lib/default.spec
bin/deploy_lib/deploy_util.py
bin/deploy_lib/nuitka_helper.py
bin/deploy_lib/pyside_icon.jpg
bin/deploy_lib/python_helper.py
@bin bin/designer
@bin bin/linguist
@bin bin/lrelease
@bin bin/lupdate
bin/metaobjectdump.py
bin/project/
bin/project.py
bin/project/__init__.py
${MODPY_COMMENT}bin/project/${MODPY_PYCACHE}/
bin/project/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
bin/project/${MODPY_PYCACHE}newproject.${MODPY_PYC_MAGIC_TAG}pyc
bin/project/${MODPY_PYCACHE}project_data.${MODPY_PYC_MAGIC_TAG}pyc
bin/project/${MODPY_PYCACHE}utils.${MODPY_PYC_MAGIC_TAG}pyc
bin/project/newproject.py
bin/project/project_data.py
bin/project/utils.py
bin/pyside_tool.py
bin/qml.py
@bin bin/qmlcachegen
@bin bin/qmlformat
@bin bin/qmlimportscanner
@bin bin/qmllint
@bin bin/qmlls
@bin bin/qmltyperegistrar
bin/qtpy2cpp.py
bin/qtpy2cpp_lib/
${MODPY_COMMENT}bin/qtpy2cpp_lib/${MODPY_PYCACHE}/
bin/qtpy2cpp_lib/${MODPY_PYCACHE}astdump.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/${MODPY_PYCACHE}formatter.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/${MODPY_PYCACHE}nodedump.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/${MODPY_PYCACHE}qt.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/${MODPY_PYCACHE}tokenizer.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/${MODPY_PYCACHE}visitor.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/astdump.py
bin/qtpy2cpp_lib/formatter.py
bin/qtpy2cpp_lib/nodedump.py
bin/qtpy2cpp_lib/qt.py
bin/qtpy2cpp_lib/tests/
${MODPY_COMMENT}bin/qtpy2cpp_lib/tests/${MODPY_PYCACHE}/
bin/qtpy2cpp_lib/tests/${MODPY_PYCACHE}test_qtpy2cpp.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/tests/baseline/
${MODPY_COMMENT}bin/qtpy2cpp_lib/tests/baseline/${MODPY_PYCACHE}/
bin/qtpy2cpp_lib/tests/baseline/${MODPY_PYCACHE}basic_test.${MODPY_PYC_MAGIC_TAG}pyc
bin/qtpy2cpp_lib/tests/baseline/basic_test.cpp
bin/qtpy2cpp_lib/tests/baseline/basic_test.py
bin/qtpy2cpp_lib/tests/test_qtpy2cpp.py
bin/qtpy2cpp_lib/tokenizer.py
bin/qtpy2cpp_lib/visitor.py
@bin bin/rcc
@bin bin/uic

The most relevant utilities are:

@bin bin/lrelease
@bin bin/lupdate
@bin bin/rcc
@bin bin/uic

I don’t think that any of the others are needed by FreeCAD.

Thank you, I’ll bring this up for discussion with other porters when submitting the port.

What’s the status of the port? If there’s still work to be done, I’d be happy to help.