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!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

looo wrote: Thu Aug 16, 2018 8:35 pm Conda-forge freecad uses occt 7.3 for quite some time... There is simple a problem that the dependency solver prefers occt7.2 on windows...
Thanks, can I force occt at environment creation

Code: Select all

conda create --name freecad_py3 python=3.6 occt=7.3 freecad
or something similar, is netgen likely to break?
Of course I'm going to try it so the question is semi-rhetorical.
EDIT: I should have read UR_'s post more carefully. And I think this answers the second part of my question.
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

UR_ wrote: Thu Aug 16, 2018 5:16 pm There are 5 linker errors, but self tests are running fine. Only some FEM tests failed.
But hadn't a closer look ;) , so be aware
Can you post these errors?
"fight the good fight"
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: ana(conda) windows packaging

Post by UR_ »

sgrogan wrote: Thu Aug 16, 2018 8:52 pm Can you post these errors?

Code: Select all

1>------ Build started: Project: Mesh, Configuration: Release x64 ------
1>     Creating library C:/Users/aio/Miniconda3/envs/freecad_py3/Library/src/Mod/Mesh/App/Release/Mesh.lib and object C:/Users/aio/Miniconda3/envs/freecad_py3/Library/src/Mod/Mesh/App/Release/Mesh.exp


1>MeshIO.obj : error LNK2019: unresolved external symbol "public: bool __cdecl boost::re_detail_106600::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::match(void)" (?match@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail_106600@boost@@QEAA_NXZ) referenced in function "bool __cdecl boost::regex_match<char const *,class std::allocator<struct boost::sub_match<char const *> >,char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(char const *,char const *,class boost::match_results<char const *,class std::allocator<struct boost::sub_match<char const *> > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NPEBD0AEAV?$match_results@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@@0@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z)


1>MeshIO.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::re_detail_106600::perl_matcher<char const *,class std::allocator<struct boost::sub_match<char const *> >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::construct_init(class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail_106600@boost@@AEAAXAEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regex_constants@3@@Z) referenced in function "bool __cdecl boost::regex_match<char const *,class std::allocator<struct boost::sub_match<char const *> >,char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(char const *,char const *,class boost::match_results<char const *,class std::allocator<struct boost::sub_match<char const *> > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NPEBD0AEAV?$match_results@PEBDV?$allocator@U?$sub_match@PEBD@boost@@@std@@@0@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z)


1>MeshIO.obj : error LNK2019: unresolved external symbol "public: bool __cdecl boost::re_detail_106600::perl_matcher<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::find(void)" (?find@?$perl_matcher@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail_106600@boost@@QEAA_NXZ) referenced in function "bool __cdecl boost::regex_search<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > >,char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class boost::match_results<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags,class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >)" (??$regex_search@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NV?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@0AEAV?$match_results@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@@0@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@0@Z)


1>MeshIO.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::re_detail_106600::perl_matcher<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::construct_init(class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail_106600@boost@@AEAAXAEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regex_constants@3@@Z) referenced in function "public: __cdecl boost::re_detail_106600::perl_matcher<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::perl_matcher<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >(class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class boost::match_results<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > > > > > &,class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::_match_flags,class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >)" (??0?$perl_matcher@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail_106600@boost@@QEAA@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@0AEAV?$match_results@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@@boost@@@2@@2@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@2@W4_match_flags@regex_constants@2@0@Z)


1>C:\Users\aio\Miniconda3\envs\freecad_py3\Library\Mod\Mesh\Mesh.pyd : fatal error LNK1120: 4 unresolved externals
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

Thanks. I guess would be to "Clean Solution" and then "Build Solution" I'd also look at the installed Netgen package. I'll try this myself, but it will take sometime.

https://conda.io/docs/user-guide/tasks/ ... nvironment
This looks promising to fork off from a working environment. I've trashed my working environment enough to try and be disciplined enough to only mess with a clone.

Thanks again for testing.
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

Does this mean that the conda version of the release page is self working? or is (ana)conda needed?
Sorry Jee-Bee for missing this.

Yes, the Win build should be totally portable, with no dependency on Conda.
It's way easier to just stay in the Conda environment, your a python user, so think virtualenv. A lot of Windows users want an installer or at least a portable .7z Most Windows users don't have exposure or appreciation of a package manager.

I'd encourage any FreeCAD user to give (Mini)-Conda a try. It works cross-platform and most of the libs are more up to date (it's a Conda goal to make the packaging easier).
"fight the good fight"
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: ana(conda) windows packaging

Post by Jee-Bee »

i had used anaconda before on my old job( i needed to do some cslculations with python)
Now just sometimes a fem calculation etc so i don't want the hole package

Thanks fot your answer
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

In addition to @sgrogan:

the package for freecad and nearly all the dependencies are available from conda-forge channel. There are some packages (like mkl for windows) which are pulled from defaults channel (which is the base of the anaconda-distribution). Miniconda is also based on the defaults-channel. But once you add the conda-forge-channel on top of the channel-section in the .condarc (config) and do a conda update --all the defaults (anaconda) packages should be replaced with conda-forge (community) packages.

So FreeCAD doesn't need Anaconda at all. We only need the possibility to create environments via conda. Such an environment has packages mostly from conda-forge-channel and some packages from defaults-channel. Miniconda is the best way to get started.


FreeCAD depends on mkl via numpy. It's possible to replace mkl with openblas (also on windows). For this you have to specify blas in the create command:
[code]conda create <env_name> freecad blas=*=openblas[/code]
* ... any version
openblas ... use a blas package with the openblas-feature

How is this possible: openblas is available via conda-forge. I guess not many openblas-windows packages exists because openblas needs a fortran compiler on windows. But the guys from conda-forge succeeded in using flang+clang for windows. And packages should be compatible with packages compiled with visual-studio... As far as I know mkl is compiled with intel-compiler-set, which is not open.


To get information about all the current development in the conda-world I follow the conda-forge gitter chat: https://gitter.im/conda-forge/conda-forge.github.io
Often there are interesting links to github-issues/PR's which show the current difficulties. Currently there is a bot which updates all the recipies/feedstocks to make defaults- and conda-forge packages more compatible. Conda-forge currently uses system-compilers (on linux gcc4.8) but defaults uses a newer compiler (gcc7.2) which is available from the defaults-channel directly. The first step was to make recipes independent of the compilers and toolchains. Now it's possible to tell conda-build simple to depend on any compiler-type (c, c++, fortran) and use the toolchain which matches a specific pinning-config (conda_forge_pinnings in the case of conda-forge). This should make it possible to switch to a newer compiler without any changes to the recipes.
The other bigger task currently ongoing is the update to python3.7. Also here the bot is creating automatic PR's for the feedstocks/recipes. I didn'g get any PR regarding python3.7 yet, so I guess it's too early to move to python3.7 yet. But it's on the list: https://github.com/FreeCAD/FreeCAD_Cond ... n-37--1018
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

sgrogan wrote:or something similar, is netgen likely to break?
Of course I'm going to try it so the question is semi-rhetorical.
EDIT: I should have read UR_'s post more carefully. And I think this answers the second part of my question.
no everything should work. The latest freecad-packages on conda-forge is compiled with occt7.3.

Thanks, can I force occt at environment creation
yes you have to force to use occt7.3. I guess this is because of the removed vc15 feature. Some packages are pulling in the feature and the solver tries to use the feature where possible and falls back to occt7.2 for the freecad-dependency-tree. I guess this is solved once python3.7 packages for freecad are uploaded...
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ana(conda) windows packaging

Post by zbigg »

Conda x64 Win succeeds for me now - it has to be installed on primary='C' drive/MSVC2017/ with OCC 7.3/,
have only one error with MeshIO.obj/same as posts above/ and the icons on starting page are missing.
cheers,
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

Creating a new env with

Code: Select all

conda create --name freecad_py3-2 python=3.6 occt=7.3 freecad
and modifying the .bat to use this, I get no compilation errors with a clean build.

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

EDIT: Updated build w/OCCT7.3 https://github.com/FreeCAD/FreeCAD/rele ... 015_x64.7z
"fight the good fight"
Post Reply