Wiki Directions for Mac Compile via Homebrew Not working

Having trouble installing or compiling FreeCAD? Get help here.
jmdzampieron
Posts: 20
Joined: Wed Aug 26, 2020 1:44 am

Wiki Directions for Mac Compile via Homebrew Not working

Post by jmdzampieron » Wed Aug 26, 2020 1:17 pm

There's multiple problems with trying to follow the wiki directions using homebrew: (Mac OS 10.15.5 - Catalina)

`brew install --only-dependencies freecad --with-packaging-utils` fails b/c `python@2` no longer exists.

The problems are:

1. Python 2 is EOL and should be replaced w/ python 3.
2. The brew cask for freecad needs updating.
3. The wiki page for Compile on Mac needs updating.

I'm happy to fight through this and update the above, but some guidance on current status appreciated. I'm not familiar with how homebrew does packaging. Chasing down the deps for a mac build is no big deal as long as someone can point me to a starting point.

I can also back out the setup from the docker container if that's advisable.

In the meantime I'm going to try out the docker setup, but I suspect on Mac that the video is going to be horrifically slow b/c of the VM that underlies docker on mac.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by vocx » Wed Aug 26, 2020 2:53 pm

jmdzampieron wrote:
Wed Aug 26, 2020 1:17 pm
...
2. The brew cask for freecad needs updating.
3. The wiki page for Compile on Mac needs updating.
...
but some guidance on current status appreciated. I'm not familiar with how homebrew does packaging.
I think nobody has compiled FreeCAD on MacOS using that brew method in many years, which is the reason that page is very outdated. Unfortunately, only MacOS users can update the information appropriately, and seemingly not many users have experience compiling and packaging for MacOS.

Nowadays, the .dwg package that is available for install (Download) is generated using the Conda system, so maybe you'd like to look at this instead.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
rngadam
Posts: 3
Joined: Sun Aug 23, 2020 4:16 am

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by rngadam » Wed Aug 26, 2020 3:18 pm

Can someone deprecate the documentation at: https://wiki.freecadweb.org/Compile_on_MacOS

...since those instructions are a waste of time...
chrisb
Posts: 27900
Joined: Tue Mar 17, 2015 9:14 am

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by chrisb » Wed Aug 26, 2020 8:59 pm

I added a warning message to the wiki.

Looo, can you help documenting how to compile for MacOS or name someone who can.
looo wrote: pinged by pinger macro
jmdzampieron
Posts: 20
Joined: Wed Aug 26, 2020 1:44 am

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by jmdzampieron » Wed Aug 26, 2020 10:40 pm

I'm happy to take a crack at building on MacOS if someone gives a pointer to the "preferable" way to do it.

I'm used to using CMake to build QT5 apps and frameworks and then cpack product build (https://cmake.org/cmake/help/latest/cpa ... build.html) for the installer.

If that's the FreeCad preferred method I'll update the documentation once I have it down.

How is the DWG current generated? That download is from 2019 so how current is the process?
User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by sgrogan » Wed Aug 26, 2020 11:16 pm

jmdzampieron wrote:
Wed Aug 26, 2020 10:40 pm
I'm happy to take a crack at building on MacOS if someone gives a pointer to the "preferable" way to do it.
Welcome jmdzampieron :) I'm Very happy to see an OSX user here!
FreeCAD can always use an OSX packagers help. Historically we have less OSX users that can build FreeCAD.

An historical thread is here: https://forum.freecadweb.org/viewtopic. ... &start=160
The OSX heros created this https://github.com/FreeCAD/homebrew-freecad
Unfortunately this died. Up streaming things to homebrew became too much.

jmdzampieron wrote:
Wed Aug 26, 2020 10:40 pm
How is the DWG current generated? That download is from 2019 so how current is the process?
It's .dmg available here https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
The release page was created at the beginning of FreeCAD_dev 0.19
The binaries are updated weekly (you may need to expand the assets tab at the bottom)
These builds use https://conda-forge.org/ as package manager/build system
The conda builds are created here: https://github.com/looooo/freecad-feedstock
There is some magic in the build system, but it uses this script:https://github.com/looooo/freecad-feeds ... e/build.sh
We then package the build using Travis-CI:https://github.com/freecad/freecad-appimage
"fight the good fight"
jmdzampieron
Posts: 20
Joined: Wed Aug 26, 2020 1:44 am

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by jmdzampieron » Thu Aug 27, 2020 12:54 am

That was all helpful.

I'll first try to get a developer build up and running and then see if I can run the packaging tooling.

Is there a way to correlate the .dmg file name with a travis build and a git hash?

FreeCAD_0.19-22284-macOS-x86_64-conda.dmg -> I see the latest Travis CI build of Master is https://travis-ci.org/github/FreeCAD/Fr ... /720661644 -- #14879.

I don't see one with MacOS listed as an arch, so maybe I'll work on that after I get my feet under me.

Stay tuned.
User avatar
sgrogan
Posts: 6087
Joined: Wed Oct 22, 2014 5:02 pm

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by sgrogan » Thu Aug 27, 2020 11:39 am

jmdzampieron wrote:
Thu Aug 27, 2020 12:54 am
Is there a way to correlate the .dmg file name with a travis build and a git hash?
The travis build on master is disabled. It used homebrew and is broken like the wiki instructions. https://github.com/FreeCAD/FreeCAD/blob ... s.yml#L204
The conda build is triggered manually, usually on Sundays, The latest log is here:https://dev.azure.com/sppedflyer/feedst ... 173a7d951b
The version number 22284 is the commit count on FreeCAD master. If you have the .dmg installed the easiest way to get the hash is to start FreeCAD and Help > About FreeCAD
You can also get this from git, but I don't remember the command.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22284 (Git)
Build type: Release
Branch: master
Hash: bf1e8e48389f5e9e25bd77b67fe98da4213e797c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
jmdzampieron wrote:
Thu Aug 27, 2020 12:54 am
I don't see one with MacOS listed as an arch, so maybe I'll work on that after I get my feet under me.
This would indeed be greatly appreciated.

If there is anything I can do to help or questions to answer don't hesitate to ping me.
"fight the good fight"
User avatar
Kunda1
Posts: 8378
Joined: Thu Jan 05, 2017 9:03 pm

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by Kunda1 » Thu Aug 27, 2020 12:57 pm

sgrogan wrote:
Thu Aug 27, 2020 11:39 am
You can also get this from git, but I don't remember the command
Source_code_management#Latest_revision_number
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3465
Joined: Mon Nov 11, 2013 5:29 pm

Re: Wiki Directions for Mac Compile via Homebrew Not working

Post by looo » Fri Aug 28, 2020 10:23 am

chrisb wrote:
Wed Aug 26, 2020 8:59 pm
I added a warning message to the wiki.

Looo, can you help documenting how to compile for MacOS or name someone who can.
looo wrote: pinged by pinger macro
I gave instructions on how to build with conda several times. So I guess it's best to search in the forum. Also there is lot's of documentation for conda [1], conda-forge [2], conda-build[3]. Building FreeCAD is difficult. Conda tries to solve some things and actually it really works great for freecad (I guess we are doing the weekly builds for over a year now, 3 different os).
The downside is that people don't understand why there is a need for environments and how the whole process with conda-build works. I was lucky/unlucky to get introduced to conda the slow way. First, they used a much simpler setup, but it had problems. Then they switched to the current way of handling the builds which is more complicated but solves some of the issues. Understanding the issues one will understand the solution and so on.

Sorry for the rant, but if anyone wants to build with conda, please go ahead and get your hands dirty. If there are question please ask. And if you finally made it through go ahead and start documenting the necessary stuff. If I do the documentation on how to build with conda, this will not help a lot (at least this is the experience I made).

[1] https://docs.conda.io/en/latest/
[2] https://conda-forge.org/docs/
[3] https://docs.conda.io/projects/conda-build/en/latest/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests