MacOS version 500 commits late?

Hi there,

I just reported a few bugs of the lates 0.18 (at least the packaged one), and was told that the MacOS version in ~500 commits late compared to the Linux or Win versions.

How is this possible? May I help (I am a software engineer).

Cheers

JMB

Hi @JMB

Packaging is still a rather hard task, requiring a lot of knowledge and effort. On macOS side currently people involved can’t invest as much effort, as they did in the past. If you are familiar with Conda, there is a weekly FreeCAD development package available there. In addition there is an ongoing effort, to re-package Conda builds for macOS platform.

If you have any experience in mentioned areas, for sure you can help.

Hi triplus,

I don’t know Conda (yet), but I am used to other packaging system and dependencies like Maven (if you know). I am currently trying to compile the sources for MacOS by following the explanations on https://www.freecadweb.org/wiki/CompileOnMac. Let see if I manage to build the app. I then will have a look at Conda.

Any insights about the project status or documents except the wiki link above?

If I get the latest sources from GitHub, will I be able to build the latest FreeCAD version for MacOS?

I am currently using “brew”. Is conda appropriate for MacOS?

To be honest ATM i am not 100% sure on what is the exact cause. For development builds to stop being produced for macOS. Yes, likely you would need to overcome similar challenges involved. In addition i never installed or tested Conda based FreeCAD package on macOS.

Said that, i am sure that you will get more precise answer in a couple of hours. From people more involved in macOS side of things.

See https://forum.freecadweb.org/viewtopic.php?f=4&t=33152&p=277412#p277412.

I’m sure the wiki is out of date. Some links that may help?
https://forum.freecadweb.org/viewtopic.php?f=4&p=289964#p289964
https://github.com/FreeCAD/homebrew-freecad
https://github.com/FreeCAD/FreeCAD-ports-cache

Also look at the https://github.com/FreeCAD/FreeCAD/blob/master/.travis.yml in FreeCAD sources. Some update to Travis/Homebrew broke this, so we had to disable the OSX builds as they always failed. If you have the time/skills/interest, we could re-enable the Travis for OSX.

Conda is the package manager for Anaconda or miniconda (miniconda is all you will need for FreeCAD). It’s been reported that the weekly builds work, so the dependencies should be in order.

Thanks for your interest, there is a large OSX user base for FreeCAD, unfortunately we have to few developers at this time.

Good news.

I was able to compile FreeCAD by using the instructions of https://github.com/FreeCAD/homebrew-freecad
As I used the --HEAD option, I suppose it is the latest version of “master”. I reported several 3D rendering issues that are now gone it seems. However this version is missing the web module.

Now I will try to do the same with conda, but I am still not sure how to use it. Any instructions somewhere?

Did you had to do some changes?? to run everything?

Actually no. There was just an issue in the brew script at the very end that I easily fixed.

However, the application seems not to be perfect: the start page is missing, because it seems the web module is missing (the application complaints). I double checked in the build and the module is actually absent even though it is there in the sources. Not sure if a real MacOS app was build (I mean the usual structure that make is recognized as app), because I launched it from the terminal.

My goal now would be to reverse engineer the brew script to better understand the pieces involved in the build process. I have developed during 7 years in C++ and used Makefile, but that is quite far away now. So I need to remember. I still don’t know how to produce FreeCAD with conda on Mac…

Basically all you need to do is:

  1. setup your system: https://github.com/FreeCAD/FreeCAD_Conda/blob/master/build.md#osx
  2. install miniconda: https://docs.conda.io/en/latest/miniconda.html
  3. clone the freecad-feedstock: https://github.com/looooo/freecad-feedstock
  4. configure the conda-channels ( conda config --add channels conda-forge/label/cf201901 )
  5. install conda-build ( conda install conda-build )
  6. cd into the freecad-feedstock
  7. call conda-build: conda build . -m .ci_support/osx_.yaml

Thanks for the info. I’ll try this the next days.

Some questions:

  1. Is it really necessary to add this exact channel? channels conda-forge/label/cf201901
  2. Will the feedstock retrieve the latest FreeCAD sources and compile them?
  3. Shall I create a freecad environment: conda create -n freecad freecad blas=*=openblas -c freecad/label/dev -c conda-forge/label/cf201901?

No, not anymore. All dependencies are now updated and use the new compilers. But the feedstock needs to be updated. I am currently using this branch: https://github.com/looooo/freecad-feedstock/tree/conda-forge_master

Which libraries get used is decided by the dependency solver + the .yaml file which is specified in the conda-build command. The .yaml file is created by conda-smithy when you rerender the feedstock. For this task a pinning package is used. With this pinnings it’s possible to keep all cond-forge packages a bit more consistent. Eg. Vtk is pinned to 8.1.1. But for py37 and new compilers we need 8.1.2 so I replaced this in the .yaml file.

OK. So if I understand properly all I have to do is add the channel “conda-forge” and checkout the master branch from feedstock, right?

What about creating a “freecad” environment. Is this still necessary?

I modified the list:

  1. setup your system: https://github.com/FreeCAD/FreeCAD_Conda/blob/master/build.md#osx # [optional if you want to use custom sdk, I would not reccomend]
  2. install miniconda: https://docs.conda.io/en/latest/miniconda.html
  3. clone the freecad-feedstock: https://github.com/looooo/freecad-feedstock
    3.a checkout conda-forge_master branch: cd freecad-feedstock && git checkout conda-forge_master
  4. configure the conda-channels ( conda config --add channels conda-forge )
  5. install conda-build ( conda install conda-build )
  6. cd into the freecad-feedstock
  7. call conda-build: conda build . -m .ci_support/osx_.yaml

conda-build (if succesful) will create a conda-package. For testing the package you have to create an environment. To test a local package you have to add “–use-local” to the “conda create” command.

Hi,

I have tried your instructions and I could not get to install FreeCAD… too many error that I don’t know where they came from…
Just a question: is this thread investigating on how to successfully compile FreeCAD for macOS Mojave and then, add the builds into the official 0.18_Pre?
For regular macOS users compiling for themselves (including me) is pretty difficult and, so that, inaccessible :blush:

The instruction is about compiling freecad with conda. Installing a weekly build of freecad with conda is a simpler task.

Weekly dmg’s can hopefully be offered soon. Building them on ci should be possible, we only need to figure out how to upload these builds in an automatic way.

I believe that what we have http://chunk.io for, right?
I have the credentials if you need them

hmmm, I am not sure I understand why we need the chunk.io. Can you explain?

For now I uploaded a dmg to:
https://www.dropbox.com/sh/tcpg7xrvjdun1wa/AACORZUqJeKs1Yws1Bt5Oteia?dl=0

Thanks for the efforts. Great to see this going forward. It seems we are back to normal sizes with download 200 MB smaller, unpacked 700MB smaller. Alas, it doesn’t start:

FreeCAD 0.18, Libs: 0.18R16079 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

/Users/cb/Desktop/FreeCAD.app/Contents/MacOS/FreeCAD: line 3:  3195 Abort trap: 6           $script_dir/Resources/bin/FreeCAD $@