Page 2 of 5
Re: conda-packages for osx
Posted: Sun May 05, 2019 7:01 am
by ballan
Hi, I've been trying to build FreeCAD locally on Mac OS Mojave using conda, but I keep running into errors related to the SDK version.
I started by cloning the freecad-feedstock repo, and tried to build the recipe inside it:
Code: Select all
conda build recipe -m .ci_support/osx_python3.7.yaml
I've already downloaded the older SDKs and put them under /opt, and added this path to my conda_build_config.yaml file:
Code: Select all
$ cat ~/.conda/conda_build_config.yaml
CONDA_BUILD_SYSROOT:
- /opt/MacOSX10.9.sdk
$ ls /opt
MacOSX10.10.sdk MacOSX10.11.sdk MacOSX10.12.sdk MacOSX10.13.sdk MacOSX10.9.sdk X11 apps
When running conda build, it seems to pick up my conda_build_config:
Code: Select all
...
Adding in variants from internal_defaults
Adding in variants from /Users/ben/.conda/conda_build_config.yaml
Adding in variants from .ci_support/osx_python3.7.yaml
...
Here's the error I get, I presume because the wrong version of the SDK is being referenced somewhere.
Code: Select all
ninja: error: '/Applications/Xcode-9.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AppKit.framework', needed by 'Mod/Import/Import.so', missing and no known rule to make it
I'm not really sure why CONDA_BUILD_SYSROOT isn't being respected. Can anyone advise me on what I'm doing wrong? I wasn't sure if you'd prefer this post to go here or in a new thread, apologies if it's the wrong place.
Re: conda-packages for osx
Posted: Thu May 09, 2019 11:09 pm
by vectronic
I've managed to do a repeatable build on macOS using the steps I've posted on my blog:
https://vectronic.io/posts/building-fre ... ing-conda/
Posting here in case it helps someone out at some point.
Re: conda-packages for osx
Posted: Sat May 11, 2019 12:07 am
by ballan
Thanks a lot for posting those instructions vectronic! I’m away from my mac so won’t be able to try it for a while, but the step I was missing was creating the symlinks to the SDK in a place where the ci scripts could find them.
Re: conda-packages for osx
Posted: Sun May 12, 2019 11:52 am
by Brutha
Perfect, thank you very much for that, have been looking for this for some time! I will link to this post in my older message about the space navigator.
Couple of quick questions in case you or someone else has some ideas:
1) Do you know if we could take the latest dev version of Freecad instead of 18? This gives me a version info below.
2) Do you know if we can package this as an app, rather than running from Terminal?
Cheers,
Brutha
Code: Select all
OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.1)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Re: conda-packages for osx
Posted: Sun May 26, 2019 3:10 pm
by vectronic
NOTE: To modify the version of FreeCAD which is build, edit
recipe/meta.yaml and change the
version variable e.g.:
I have been unable to build a MacOS app. I have had an attempt with the following but have given up...
1. Editing
recipe/build.sh and adding:
2. Modifying the checked out source in the folder such as:
Code: Select all
/Users/vectronic/miniconda3/envs/freecad_master/conda-bld/freecad_1558826326190/work/src/MacAppBundle/CMakeLists.txt
so that:
Code: Select all
install(PROGRAMS "${Qt5Core_DIR}/../../../libexec/Assistant.app/Contents/MacOS/Assistant" DESTINATION ${CMAKE_INSTALL_PREFIX}/MacOS)
reads:
Code: Select all
install(PROGRAMS "${Qt5Core_DIR}/../../../bin/Assistant.app/Contents/MacOS/Assistant" DESTINATION ${CMAKE_INSTALL_PREFIX}/MacOS)
With these changes, I was able to get a
FreeCAD.app to be built in the conda package. However, the conda test phase fails and MacOS tells me the
FreeCAD.app is corrupt...
Re: conda-packages for osx
Posted: Sun May 26, 2019 3:17 pm
by looo
vectronic wrote: ↑Sun May 26, 2019 3:10 pm
With these changes, I was able to get a FreeCAD.app to be built in the conda package. However, the conda test phase fails and MacOS tells me the FreeCAD.app is corrupt...
I guess the tests doesn't make much sense if the package is modified this way.
Re: conda-packages for osx
Posted: Thu May 30, 2019 1:02 pm
by looo
Finally a conda-package for freecad (qt5.9) was uploaded to freecad/label/testing.
Would be nice if a mac user can try this. I have currently no access to my mac:
as usual install miniconda and then create environment with:
Code: Select all
conda create -n freecad_qt59 freecad -c freecad/label/testing -c conda-forge
Re: conda-packages for osx
Posted: Thu May 30, 2019 1:18 pm
by chrisb
I will look at this later. I don't have a development environment, so I will wait until it occurs at the official download page at
https://github.com/FreeCAD/FreeCAD/releases/
Re: conda-packages for osx
Posted: Fri May 31, 2019 8:17 am
by looo
I updated osx 0.19 bundle to use qt5.9 The generated bundle should include FreeCAD 0.19.16881.
Please report back. Maybe you can also try to close the WebGui widget. This results in a crash on linux.
Re: conda-packages for osx
Posted: Fri May 31, 2019 9:24 am
by vectronic
No dice...
Code: Select all
/Applications/FreeCAD.app/Contents/MacOS/FreeCAD
FreeCAD 0.19, Libs: 0.19R16881 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
/Applications/FreeCAD.app/Contents/MacOS/FreeCAD: line 10: 14378 Abort trap: 6 "$PREFIX/bin/FreeCAD" $@
Let me know if there is something I should run to get more useful output...
Also, did you build this using conda and then package as a macOS app? If so do you have any instructions to take the binary produced from the conda build and produce the app/dmg?