FreeCAD from conda forge

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

FreeCAD from conda forge

Postby bernd » Mon Mar 04, 2019 9:36 am

installed FreeCAD from conda-forge in my miniconda on Windows (https://anaconda.org/conda-forge/freecad) It does not show the commit number, but after playing a bit I found quit fast the package is outdated. On https://anaconda.org/conda-forge/freecad I found the package was updated 6 month ago.

Is this maintained by someone from the forum here?

bernd
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FreeCAD from conda forge

Postby bernd » Mon Mar 04, 2019 9:36 am

looo wrote: ping
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD from conda forge

Postby looo » Mon Mar 04, 2019 11:07 am

bernd wrote:
Mon Mar 04, 2019 9:36 am
On https://anaconda.org/conda-forge/freecad I found the package was updated 6 month ago.

Is this maintained by someone from the forum here?
no this is maintained by me, but I haven't updated the freecad-package on conda-forge for a while. The weekly builds go into the freecad/label/dev channel [1]. You can add this channel temporary by adding "-c freecad/label/dev" to the create/install command or add it directly to the ~/condarc file by eg "conda config --add channels freecad/label/dev".

Currently conda-forge is a bit broken for us as they forced us to use compilers provided by anaconda and added quite some additional changes which makes it very hard to compile c++ sources (especially with cmake, see for example smesh which I am currently fighting with: [2]). But using some older packages (channel= conda-forge/label/cf201901) allows to still build freecad with the old tools. So it's best to use "conda-forge/label/cf201901" instead of "conda-forge" channel. Again this channel should be listed in .condarc or used as argument for the install/create commands.

[1] https://anaconda.org/freecad/freecad/files
[2] https://github.com/conda-forge/smesh-feedstock/pull/21
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FreeCAD from conda forge

Postby bernd » Tue Jul 02, 2019 7:37 am

tried:

Code: Select all

conda install -c freecad/label/dev freecad


output:

Code: Select all

(base) C:\Users\BHA>conda install -c freecad/label/dev freecad
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - freecad -> boost-cpp[version='>=1.70.0,<1.70.1.0a0']
  - freecad -> coin3d
  - freecad -> hdf5[version='>=1.10.5,<1.10.6.0a0']
  - freecad -> occt[version='>=7.3.0,<7.4.0a0']
  - freecad -> pivy
  - freecad -> pyside2[version='>=5.9.0a.1,<6.0a0']
  - freecad -> smesh
  - freecad -> tbb[version='>=2019.7']

Current channels:

  - https://conda.anaconda.org/freecad/label/dev/win-64
  - https://conda.anaconda.org/freecad/label/dev/noarch
  - https://conda.anaconda.org/anaconda/win-64
  - https://conda.anaconda.org/anaconda/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.



(base) C:\Users\BHA>

Is there a list of the needed channels for FreeCAD somewhere, or do I need to go package by package find the channel and add it?

bernd
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD from conda forge

Postby looo » Tue Jul 02, 2019 8:22 am

Necessary channels for weekly builds are:

-freecad/label/dev
-conda-forge
-defaults

This is how the channels should be listed in the .condarc file. The order is important. If you have only conda-forge and defaults in the .condarc install/create/update via

Code: Select all

conda install/create/update ... -c freecad/label/dev
is equivalent.

If you install packages in an environment things get pinned (I am not sure how this works). So this adds some constraints to the packaging solver. In your case I would try to create a new environment which doesn't have any constraints and will look for the the most recent dependency-tree.

So it's best if you try:

Code: Select all

conda create -n <name> freecad -c freecad/label/dev
For more information you can have a look how we create the appimage with additional dependencies like (pandas, scipy, sympy,...):
https://github.com/FreeCAD/FreeCAD-AppI ... ev.sh#L2L9
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5475
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD from conda forge

Postby sgrogan » Thu Jul 04, 2019 3:00 pm

looo wrote:
Tue Jul 02, 2019 8:22 am
So it's best if you try:
Code: Select all

conda create -n <name> freecad -c freecad/label/dev
I'm getting this

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17068 (Git)
Build type: Release
Branch: master
Hash: 236f890864ef51a8a09b7e507a3a122c41fbb724
Python version: 3.7.1
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Code: Select all

(freecad-dev7) C:\Users\Chris>conda config --get channels
--add channels 'defaults'   # lowest priority
--add channels 'conda-forge'
--add channels 'freecad/label/dev'   # highest priority
FreeCAD should be 0.19.17175 I think? How do I get QT 5.9?
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD from conda forge

Postby looo » Fri Jul 05, 2019 4:52 am

sgrogan wrote:
Thu Jul 04, 2019 3:00 pm
FreeCAD should be 0.19.17175 I think? How do I get QT 5.9?
There are some dependency solver flags which have some influence on the result. Normally conda should find the qt5.9 based dependency tree. https://www.anaconda.com/understanding- ... rformance/

Also updating conda in the base directory makes sense.

If this all doesn't work you can always enforce version by specification:

Code: Select all

conda create -n <name> <package> qt=5.9.*
This works also with update and install command.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5475
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD from conda forge

Postby sgrogan » Sat Jul 06, 2019 5:54 pm

looo wrote:
Fri Jul 05, 2019 4:52 am
If this all doesn't work you can always enforce version by specification:
I force installed qt 5.9 into the env and everything now works.

When trying to use this env for the dependencies I'm getting a bunch of boost linking errors.
Where is the recipe used to build the weekly builds?
Do I need to set something for C++17, I saw some stuff in other threads but I don't know the final solution used.

EDIT: I also have this https://forum.freecadweb.org/viewtopic. ... 30#p315850
looo
Posts: 2965
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD from conda forge

Postby looo » Sun Jul 07, 2019 5:49 am

sgrogan wrote:
Sat Jul 06, 2019 5:54 pm
When trying to use this env for the dependencies I'm getting a bunch of boost linking errors.
Where is the recipe used to build the weekly builds?
Most likely you need to set:
-D Boost_NO_BOOST_CMAKE:BOOL=ON

Else cmake uses the cmake config from boost which is quite different.

Recipe I currently use for qt5.9 boost 1 70 is the master branch here:
https://github.com/looooo/freecad-feedstock
please help with my conda-packaging efforts: https://liberapay.com/looooo/