ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: ana(conda) windows packaging

Post by UR_ »

After today's
conda update --all
Build fails with:

Code: Select all

2>c:\users\aio\miniconda3\envs\freecad_py3\library\include\vtk-8.1\vtkAtomic.h(28): fatal error C1083: Cannot open include file: 'tbb/atomic.h': No such file or directory
3>c:\users\aio\miniconda3\envs\freecad_py3\library\include\vtk-8.1\vtkAtomic.h(28): fatal error C1083: Cannot open include file: 'tbb/atomic.h': No such file or directory
3>  TaskCreateNodeSet.cpp
3>c:\users\aio\miniconda3\envs\freecad_py3\library\include\vtk-8.1\vtkAtomic.h(28): fatal error C1083: Cannot open include file: 'tbb/atomic.h': No such file or directory
3>  ViewProviderAnalysis.cpp
3>c:\users\aio\miniconda3\envs\freecad_py3\library\include\vtk-8.1\vtkAtomic.h(28): fatal error C1083: Cannot open include file: 'tbb/atomic.h': No such file or directory
FreeCAD_trunk - Microsoft Visual Studio-000071.png
FreeCAD_trunk - Microsoft Visual Studio-000071.png (15.04 KiB) Viewed 1918 times

only reverting upgrade with:

Code: Select all

(freecad_py3) C:\Users\aio>conda install --revision 14

## Package Plan ##

  environment location: C:\Users\aio\Miniconda3\envs\freecad_py3

  added / updated specs:
    - eigen
    - freecad
    - gitpython
    - occt=7.3
    - pybind11
    - python=3.6
    - swig


The following packages will be DOWNGRADED:

    sqlite: 3.25.1-hfa6e2cd_1000 conda-forge --> 3.24.0-he980bc4_1001 conda-forge
    tbb:    2019.0-he980bc4_0    conda-forge --> 2018_20171205-vc14_0 conda-forge [vc14]

Proceed ([y]/n)?

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
gives a working build.

Howto fix that, without being bound to tbb 2018_20171205-vc14_0 conda-forge [vc14]
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

I updated windows today without problems. Maybe you have not the freecad/label/dev in your channels. I can imagine that the latest build from last Sunday is compiled against latest tbb. So either add freecad/label/dev to the channels or try this:

"conda update --all -c freecad/label/dev"

But I am not sure if the latter works.

BTW. Didn't know about the reverting tools. Seems like a nice feature.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

triplus wrote: Fri Sep 21, 2018 12:02 am Therefore if mkl will get pulled in i will just remove it and that is that.
mkl may be a dependency of numpy and scipy, I'm not sure how the conda-forge packages are linked.

BTW: For those of us using conda as a package manager, this was a good read: https://jakevdp.github.io/blog/2016/08/ ... nceptions/
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

sgrogan wrote: Fri Sep 21, 2018 9:09 pm mkl may be a dependency of numpy and scipy, I'm not sure how the conda-forge packages are linked.
exactly. And openblas is an alternative to mkl. So specifying the feature openblas will pull in only packages which are compiled with openblas. I think openblas should also work on windows, but mkl is better tested.
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: ana(conda) windows packaging

Post by UR_ »

looo wrote: Fri Sep 21, 2018 4:59 pm add freecad/label/dev to the channels
Done!
Added to channels, but still no luck :(

Still had to downgrade with:

Code: Select all

conda install "tbb 2018_20171205 vc14_0"
in order to get a working build :(
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

so you are building freecad yourself? I assumed you are using a build from conda-forge.

In this case I don't know. I will report back if I encounter the same problem when I create new builds tomorrow. tbb was updated 2 days ago, so it is possible some incompatibility where introduced.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

ok for linux and osx I get a tbb linking error. I guess it's because occt is still build with the older version of tbb, but the dependency-solver doesn't care about the tbb-version and pulls in the newer tbb-version. So to get a fast solution for this problem, I have created a PR for occt [1] to build with the latest tbb and pin the runtimedependency of occt to the tbb-version it was build with. In the long run we might add tbb to conda-forge-pinnings [2].


Btw.: I do not have the problem on windows because there I do not build occt with tbb enabled. Does anyone know what the advantages of tbb are?

[1] https://github.com/conda-forge/occt-feedstock/pull/25
[2] https://github.com/conda-forge/conda-fo ... issues/123
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: ana(conda) windows packaging

Post by UR_ »

Just ran this snippet

Code: Select all

import json
import glob
from os.path import join, basename
# install this with "conda install -c conda-forge python-graphviz"
import graphviz as gv

# path to your conda environment
path = 'C:/Users/aio/Miniconda3/envs/freecad_py3'

dg = gv.Digraph(filename='env-%s' % basename(path), format='svg')

for json_file in glob.glob(join(path, 'conda-meta', '*.json')):
    print('reading', json_file)
    j = json.load(open(json_file))
    dg.node(j['name'])
    for dep in j.get('depends', []):
        dg.edge(j['name'], dep.split(' ')[0])

dg.render()
from here: https://gist.github.com/ericdill/9942ac ... d2dc3653a4

and got this spaghetti:

env-freecad_py3.svg
(90.43 KiB) Downloaded 305 times

tbb can be found a little bit above zlib :roll: but it points to vtk :roll:
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

UR_ wrote: Sun Sep 23, 2018 4:42 pm and got this spaghetti:
:lol: :lol: I feel your pain. I wish vtk would split the package upstream, on Ubuntu, at least, python-vtk6 is a separate package.
Maybe this gives some clues: https://github.com/conda-forge/vtk-feedstock/issues/46?
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

vtk is one of the most painful dependencies. As it seems to depend on tbb it has to be updated too. But I remeber big troubles when I worked the last time on the vtk-feedstock... At least I think that the recipe won't work out of the box, if we only rerender and try to build.
Post Reply