ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Mar 21, 2017 7:02 pm

Kunda1 wrote:FYI, netgen devs are open to patches
https://ngsolve.org/forum/ngspy-forum/6 ... ng-patches
thanks for you're efforts! This will be a benefit for both projects.
Last time I waited half a year to get patches included :D
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Mar 21, 2017 8:38 pm

looo wrote:I am wondering if the cmake is using the wrong library to link to.
My CMAKE-GUI looks like this from my previous successful build
medfile.PNG
medfile.PNG (26.16 KiB) Viewed 948 times
I've cloned vejmaries medfile and downloaded the conda hdf5 package. I'll try to build manually using CMAKE_GUI.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Mar 21, 2017 10:15 pm

Using MEDFILE_USE_SHARED_LIBS=OFF, MEDFILE_USE_STATIC_LIBS=ON and HDF5_LIBRARIES=...\libhdf5.lib. ->
gives some "reference to unresolved extern Symbol":

Code: Select all

LINK : warning LNK4098: Standardbibliothek "MSVCRT" steht in Konflikt mit anderen Bibliotheken; /NOD
EFAULTLIB:Bibliothek verwenden.
libhdf5.lib(H5Zdeflate.c.obj) : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol "inflate" in Funktion "H5Z_filter_deflate".
libhdf5.lib(H5Zdeflate.c.obj) : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol "inflateEnd" in Funktion "H5Z_filter_deflate".
libhdf5.lib(H5Zdeflate.c.obj) : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol "compress2" in Funktion "H5Z_filter_deflate".
libhdf5.lib(H5Zdeflate.c.obj) : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol "inflateInit_" in Funktion "H5Z_filter_deflate".
tools\mdump\mdump.exe : fatal error LNK1120: 4 nicht aufgel÷ste Externe
Using MEDFILE_USE_SHARED_LIBS=ON, MEDFILE_USE_STATIC_LIBS=OFF -> always tries to link the hdf5.dll from the bin dir.
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Mar 21, 2017 10:36 pm

looo wrote:Using MEDFILE_USE_SHARED_LIBS=OFF, MEDFILE_USE_STATIC_LIBS=ON and HDF5_LIBRARIES=...\libhdf5.lib. ->
gives some "reference to unresolved extern Symbol":
This is the errors we got before.
What version of CMake does conda use. I just tried to repeat my previous build from scratch and I can't get thru cmake (3.5.1)
If I configure and generate from my successful build directory, I get some policy warnings but it succeeds. I have upgraded cmake in the meantime, I don't remember the previous version.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Mar 21, 2017 10:47 pm

It is also possible to use system cmake. Therefor remove the cmake dependency in the meta.yaml.I have no system cmake so I can't try this.
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Mar 21, 2017 11:44 pm

Code: Select all

-DHDF5_ROOT_DIR="C:/Users/Chris/GitHub/hdf5-install"

Code: Select all

-DHDF5_LIBRARIES="C:/Users/Chris/GitHub/hdf5-install/lib/libhdf5.lib"
I did this locally VC12 + Cmake 3.5.1, but I think the directory structure should be correct.
Locally I can't get Cmake to find my VC14 compilers.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 8:55 am

cmake is version 3.7, so I don't think this is a problem.

With your suggestion I get this undefined references aswell. (inflate, compress2,...) Searching for this results in messages about zlib compile problems. So I looked into hdf5 and there zlib is enabled. "-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON"
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 9:42 am

compiling hdf5 without zlib has vanished the undefined references, but it is still not working:

Code: Select all

C:\Users\fc_builder\Miniconda3\conda-bld\libmed_1490171278588\work\tools\medimport\2.3.1\MED231champ
RefInfoEtRenMaabuilt.cxx(98): error C3688: ungültiges Literalsuffix "IFORMAT"; Literaloperator oder
Literaloperator-Vorlage "operator ""IFORMAT" nicht gefunden
not valid literalsuffix... https://github.com/vejmarie/libMED/blob ... lt.cxx#L98

is there a newer version of libmed? Or would it be possible to compile smesh without it? maybe @vejmarie
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 10:40 am

after patching the mentioned line and another one libmed is finally building.
Build uploaded. hdf5, libMed
Patch added: https://github.com/looooo/FreeCAD_Conda ... ment.patch
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 4:19 pm

now to FreeCAD itself:

First try gave: "cannot find fc_wrap_cpp"-macro. It seems this is defined in cMake/UseLibPackXX.cmake . So we have to create a new UseLibPackXX.cmake file to build with conda? or can we use an old one?