0.17 & Mac Mojave total crash

Having trouble installing or compiling FreeCAD? Get help here.
chrisb
Posts: 22357
Joined: Tue Mar 17, 2015 9:14 am

Re: 0.17 & Mac Mojave total crash

Postby chrisb » Fri Mar 01, 2019 2:09 pm

User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: 0.17 & Mac Mojave total crash

Postby jmborer » Fri Mar 01, 2019 3:17 pm

I too want to try to build the sources with the "conda build".

How does it work on Mac?

By the way I managed to create a terminal launchable application by using brew. See https://forum.freecadweb.org/viewtopic.php?f=10&t=34537

Only the start page is missing after the build.
Jee-Bee
Posts: 1992
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: 0.17 & Mac Mojave total crash

Postby Jee-Bee » Fri Mar 01, 2019 5:11 pm

conda is more or less executable.

Don't know if there is some documentation or scrips to replicate builds self...
leonardshelby
Posts: 50
Joined: Sat Feb 24, 2018 6:09 pm

Re: 0.17 & Mac Mojave total crash

Postby leonardshelby » Fri Mar 01, 2019 6:23 pm

Here's how you can get a conda build on your mac:
looo wrote:
Sun May 01, 2016 10:47 am
Here is a short instruction how to install a python3 version of freecad with conda: (by now only a linux version is available, maybe someone want to make a conda paykage of freecad for windows and mac)

INSTALL MINICONDA:
  1. first get miniconda: http://conda.pydata.org/miniconda.html choose python3 (it's not necessary, you could also choose python2, but then it will download python3 stuff in the "create-env-step")
  2. install miniconda: bash <miniconda-file>.sh (not as root!!!)
  3. at the end of the install it will ask you if you want to add the anaconda-dir to the $PATH, say yes.
  4. if you do not want anaconda to be the default python open the ~/.bashrc and edit the new line:
    -from this: export PATH="path_to_anaconda/bin:$PATH"
    -to this: alias initConda='export PATH="path_to_anaconda/bin:$PATH" '
    : this way anaconda isn't perpended by default. As soon as you call "initConda" python will be the anaconda version.
CREATE A NEW ENV
  1. type in terminal: initConda (now the "conda" command should be available)
  2. create an env: conda create -n <env-name> python=3.5 # with <env-name> is the name of the env, eg. fc_test
    (it will install some packages, but I think most of them are available within miniconda, so it will only link this packages to the env)
  3. at the end of this process a short statement is printed how to activate the new env.: source activate <env-name>
  4. now you have a minimal setup of python (only packages in this env are available)
INSTALL FREECAD
  1. first we have to add some channels to get all the necesarry packages:
    - you can add them one by one with: conda config --add channels <name>
    - or you can open the ~/.condarc and add them directly to this file
    at the end this file should look like this:

    Code: Select all

    channels:
      - spyder-ide
      - dlr-sc
      - looooo
      - defaults
    
    the channels hosting this libraries:
    looooo: freecad, coin, pivy, boost,...
    dlr-sc: oce
    spyder-ide: libuci
  2. install freecad: conda install freecad
  3. start freecad: FreeCAD
    If you had freecad previously on your machine this will maybe work. otherwise there will be errors about missing libraries. Please report this and search if the missing packages are available on anaconda.org.
User avatar
looo
Posts: 3174
Joined: Mon Nov 11, 2013 5:29 pm

Re: 0.17 & Mac Mojave total crash

Postby looo » Fri Mar 01, 2019 7:42 pm

leonardshelby wrote:
Fri Mar 01, 2019 6:23 pm
Here's how you can get a conda build on your mac:
Currently we can not use latest conda-forge packages. But it's still possible to create environments for freecad by using the cf201901 label. So use this command to create the environment:

Code: Select all

conda create -n freecad freecad blas=*=openblas -c freecad/label/dev -c conda-forge/label/cf201901
for linux there is also the possibility to create an environment with latest stuff. But the version of FreeCAD is a bit older.

Code: Select all

conda create -n freecad freecad blas=*=openblas -c freecad/label/testing -c conda-forge/label
For the rest of the instruction please have a look at the conda-docs:
https://docs.conda.io/projects/conda/en ... index.html

If there are any problems/difficulties please ask.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
looo
Posts: 3174
Joined: Mon Nov 11, 2013 5:29 pm

Re: 0.17 & Mac Mojave total crash

Postby looo » Fri Mar 01, 2019 7:42 pm

leonardshelby wrote:
Fri Mar 01, 2019 6:23 pm
Here's how you can get a conda build on your mac:
Currently we can not use latest conda-forge packages. But it's still possible to create environments for freecad by using the cf201901 label. So use this command to create the environment:

Code: Select all

conda create -n freecad freecad blas=*=openblas -c freecad/label/dev -c conda-forge/label/cf201901
for linux there is also the possibility to create an environment with latest stuff. But the version of FreeCAD is a bit older.

Code: Select all

conda create -n freecad freecad blas=*=openblas -c freecad/label/testing -c conda-forge/label
For the rest of the instruction please have a look at the conda-docs:
https://docs.conda.io/projects/conda/en ... index.html

If there are any problems/difficulties please ask.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
looo
Posts: 3174
Joined: Mon Nov 11, 2013 5:29 pm

Re: 0.17 & Mac Mojave total crash

Postby looo » Fri Mar 01, 2019 9:50 pm

For buildin conda-packages have a look here:
https://conda.io/projects/conda-build/e ... index.html

I also made some notes for freecad but this is not up to date:
https://github.com/FreeCAD/FreeCAD_Cond ... r/build.md

Would be nice if someone can spend some time and add instructions for Mac-OS. In principle building conda-packages is the same for all platforms but there are some specific parts which are not that trivial.

For the Mac I followed this instructions: https://www.anaconda.com/utilizing-the- ... ibution-5/

It would be nice to have more people working on conda-packages. Conda makes it simple to compile for different platforms, but there is always some work necessary to keep the packages up-to-date.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
lingmar
Posts: 1
Joined: Mon Apr 08, 2019 10:49 am

Re: 0.17 & Mac Mojave total crash

Postby lingmar » Mon Apr 08, 2019 10:54 am

This is the result when I run the command in the same folder as I ran cmake:

Code: Select all

$ for i in `grep -Rl '\-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include'` ; do sed -e 's?-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include??' $i >/tmp/junk ; mv /tmp/junk $i ; done
grep: warning: recursive search of stdin
<...nothing happens...>
How do I use this command?
federico.carminati wrote:
Tue Dec 11, 2018 9:40 am
I managed to build FreeCAD on Mojave. After cmake I run

Code: Select all

for i in `grep -Rl '\-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include'` ; do sed -e 's?-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include??' $i >/tmp/junk ; mv /tmp/junk $i ; done
Really not elegant, but I think this is a cmake problem. best,

Federico Carminati
pablogil
Posts: 805
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: 0.17 & Mac Mojave total crash

Postby pablogil » Tue May 07, 2019 8:25 am

Hi,

Just as confirmation: the freeze bug in Mojave is not fixed, doesn't it?

The FC 0.18 binaries are still freezing my computer (mostly Finder related stuff) and the Automator hack is a little weird (it's the one I use but day by day I hate it more and more, hehehe).

Cheers
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
looo
Posts: 3174
Joined: Mon Nov 11, 2013 5:29 pm

Re: 0.17 & Mac Mojave total crash

Postby looo » Tue May 07, 2019 8:55 am

pablogil wrote:
Tue May 07, 2019 8:25 am
Just as confirmation: the freeze bug in Mojave is not fixed, doesn't it?
Is it the same for 0.18.1 and latest 0.19? Maybe you can test.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/