MacOS version 500 commits late?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: MacOS version 500 commits late?

Post by looo »

Hmm, it worked on my mini. Maybe caused by a external module...
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS version 500 commits late?

Post by chrisb »

I have by a lucky coincidence an identical MacMini here. Alas, I have no powercable and have to tinker something (more or less dangerous) for the special plug. I will report back later.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: MacOS version 500 commits late?

Post by Kunda1 »

looo wrote: Sat Mar 09, 2019 4:42 am 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.
first, can you clarify what you mean by 'automatic way?
do you need a method to update or do you need a hosting place to update to?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: MacOS version 500 commits late?

Post by jmborer »

Ok I finally managed to compile FreeCAD from your first instructions (not tried the new ones). I first created a freecad environment then configured OSX to use the the MacOSX 10.9 SDKs: installation into /opt +conda_build_config.yaml. According to the errors in the build, the build system was still looking for the 10.9 SDKs in the XCode application (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/), but as I am running 10.14, those SDKs don't exist by default. I created there a simlink in the application to /opt. Then I could compile.

I will try your new instructions to see if they work properly.

Question: why 10.9 SDKs? Is FreeCAD able to compile with 10.14 ones and if yes, where do I have to change the dependency?

Cheers

JMB

PS: I am interested to build the sources, because I am a software engineer and I am interested to see if I can help to improve FreeCAD.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS version 500 commits late?

Post by chrisb »

looo wrote: Sat Mar 09, 2019 6:44 am For now I uploaded a dmg
I get (almost) the same error on the MacMini:

Code: Select all

localadmins-Mac-mini:Desktop localadmin$ FreeCAD.app/Contents/MacOS/FreeCAD
FreeCAD 0.18, Libs: 0.18R16079 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

FreeCAD.app/Contents/MacOS/FreeCAD: line 3:   756 Abort trap: 6           $script_dir/Resources/bin/FreeCAD $@
localadmins-Mac-mini:Desktop localadmin$ 
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS version 500 commits late?

Post by chrisb »

Hope this helps: the log file talks about cocoa missing.

Code: Select all

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

Log: Time = Sat Mar  9 14:42:54 2019
Log: AppDataSkipVendor = true
Log: AppHomePath = /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/
Log: AppIcon = freecad
Log: AppTempPath = /var/folders/g6/gndxh1551rq72dn3hc8dm0vc0000gn/T/
Log: BinPath = /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/bin/
Log: BuildRepositoryURL = https://github.com/FreeCAD/FreeCAD master
Log: BuildRevision = 16079 (Git)
Log: BuildRevisionBranch = master
Log: BuildRevisionDate = 2019/03/08 17:56:16
Log: BuildRevisionHash = 6363c90a20b296ab69d7b52230009928199d90df
Log: BuildVersionMajor = 0
Log: BuildVersionMinor = 18
Log: Console = 0
Log: CopyrightInfo = © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


Log: Debug = 0
Log: DocPath = /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/doc/
Log: ExeName = FreeCAD
Log: ExeVendor = FreeCAD
Log: ExeVersion = 0.18
Log: LoggingFile = 1
Log: LoggingFileName = /tmp/fc.log
Log: MaintainerUrl = http://www.freecadweb.org/wiki/Main_Page
Log: PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Log: PYTHONPATH = 
Log: PythonSearchPath = /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/lib/python37.zip:/Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7:/Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/lib/python3.7/lib-dynload
Log: RunMode = Gui
Log: SplashAlignment = Bottom|Left
Log: SplashInfoColor = #c8c8c8
Log: SplashScreen = freecadsplash
Log: SplashTextColor = #ffffff
Log: StartWorkbench = StartWorkbench
Log: SystemParameter = /Users/localadmin/Library/Preferences/FreeCAD/system.cfg
Log: UserAppData = /Users/localadmin/Library/Preferences/FreeCAD/
Log: UserHomePath = /Users/localadmin
Log: UserParameter = /Users/localadmin/Library/Preferences/FreeCAD/user.cfg
Log: Verbose = 
Log: Create Application
Log: Run App init script
Log: Init: starting App::FreeCADInit.py
Log: Init:   Searching for modules...
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/AddonManager... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Arch... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Complete... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Draft... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Drawing... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Fem... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Idf... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Image... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Import... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Inspection... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Material... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Measure... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Mesh... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/MeshPart... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/OpenSCAD... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Part... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/PartDesign... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Path... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Points... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Raytracing... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/ReverseEngineering... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Robot... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Show(Init.py not found)... ignore
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Sketcher... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Spreadsheet... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Start... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Surface... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/TechDraw... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Test... done
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Tux(Init.py not found)... ignore
Log: Init:      Initializing /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Web... done
Log: Using /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod as module path!
Log: System path after init:
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/bin
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/AddonManager
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Arch
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Complete
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Draft
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Drawing
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Fem
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Idf
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Image
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Import
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Inspection
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Material
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Measure
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Mesh
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/MeshPart
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/OpenSCAD
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Part
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/PartDesign
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Path
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Points
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Raytracing
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/ReverseEngineering
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Robot
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Show
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Sketcher
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Spreadsheet
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Start
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Surface
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/TechDraw
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Test
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Tux
Log:    /Users/localadmin/Desktop/FreeCAD.app/Contents/Resources/Mod/Web
Log:    /usr/bin
Log:    /bin
Log:    /usr/sbin
Log:    /sbin
Log:    /usr/local/bin
Log: Init: App::FreeCADInit.py done
Log: Init: Creating Gui::Application and QApplication
Log: This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".

Reinstalling the application may fix this problem.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: MacOS version 500 commits late?

Post by jmborer »

Ok guys. Now that I was able to build FreeCAD with freecad-feedstock, I got those messages at the end:

Code: Select all

TEST END: /Users/jeanmarc/miniconda3/conda-bld/osx-64/freecad-0.18b0-py36h4f6ecc2_41.tar.bz2
Renaming work directory,  /Users/jeanmarc/miniconda3/conda-bld/freecad_1552136826140/work  to  /Users/jeanmarc/miniconda3/conda-bld/freecad_1552136826140/work_moved_freecad-0.18b0-py36h4f6ecc2_41_osx-64_main_build_loop
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:

anaconda upload /Users/jeanmarc/miniconda3/conda-bld/osx-64/freecad-0.18b0-py36h4f6ecc2_41.tar.bz2

# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes

anaconda_upload is not set.  Not uploading wheels: []
####################################################################################
Resource usage summary:

Total time: 1:15:26.7
CPU usage: sys=0:19:21.5, user=2:36:43.8
Maximum memory usage observed: 1.7G
Total disk usage observed (not including envs): 3.5M


####################################################################################
Source and build intermediates have been left in /Users/jeanmarc/miniconda3/conda-bld.
Now the build results seem to be freecad-0.18b0-py36h4f6ecc2_41.tar.bz2. So I suppose I have to extract this archive to find FreeCAD. But now if I start developping, I want to use the build results directly and not beeing obliged to always use an archive.

So 2 questions:
1) how do you guys work when you compile from the sources and modify them?
2) I suppose conda-build is only meant for CI integration, correct? Then where can I find the FreeCAD binary before it is bundled?

By the way the content of archive doesn't work. Not even from the terminal, where the "brew" build worked fine. Still wondering how to make conda properly work on my Mac and build FreeCAD for OS X...

Code: Select all

Last login: Sat Mar  9 15:36:18 on ttys001
(base) mac-mini:~ jeanmarc$ /Users/jeanmarc/miniconda3/conda-bld/osx-64/freecad-0.18b0-py36h4f6ecc2_41/bin/FreeCAD ; exit;
dyld: Library not loaded: @rpath/libpython3.6m.dylib
  Referenced from: /Users/jeanmarc/miniconda3/conda-bld/osx-64/freecad-0.18b0-py36h4f6ecc2_41/bin/FreeCAD
  Reason: image not found
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Cheers,

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

Re: MacOS version 500 commits late?

Post by jmborer »

looo wrote: Fri Mar 08, 2019 9:12 am
jmborer wrote: Fri Mar 08, 2019 7:44 am 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?
I modified the list:

1. setup your system: https://github.com/FreeCAD/FreeCAD_Cond ... ild.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
jmborer wrote: Fri Mar 08, 2019 7:44 am What about creating a "freecad" environment. Is this still necessary?
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.
small mistake at last step should be: conda build . -m .ci_support/osx_python3.7.yaml

I am still no comfortable with conda. Could you please explain what you mean with the create environment with the built package?

conda create freecad-test .... --use-local ....

Sorry for my stupid questions but I try to get on the train...
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: MacOS version 500 commits late?

Post by looo »

chrisb wrote: Sat Mar 09, 2019 1:45 pm Hope this helps: the log file talks about cocoa missing.
thanks for testing.

Maybe this is a problem with absolutepaths. Maybe the appimage-equivalent way of building the package doesn't work for the mac. I guess it's best to ask @peterl94 how he did his build.

jmborer wrote: Sat Mar 09, 2019 2:45 pm Now the build results seem to be freecad-0.18b0-py36h4f6ecc2_41.tar.bz2. So I suppose I have to extract this archive to find FreeCAD. But now if I start developping, I want to use the build results directly and not beeing obliged to always use an archive.
You have to install it with conda. The archive only contains freecad, but not it's dependencies... To test it you need to create an environment.

There is no simple way to setup an interactive development environment with conda. I tried it with conda-build (and it also works) but you need a deeper understanding how conda works to do it right.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: MacOS version 500 commits late?

Post by looo »

jmborer wrote: Sat Mar 09, 2019 3:06 pm small mistake at last step should be: conda build . -m .ci_support/osx_python3.7.yaml
you are right. This has changed recently.
I am still no comfortable with conda. Could you please explain what you mean with the create environment with the built package?
Please have a look at the basics of conda. I guess it's the best reference:
https://docs.conda.io/projects/conda/en ... vironments
Post Reply