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
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

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

Re: ana(conda) windows packaging

Post by sgrogan »

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 2076 times
I've cloned vejmaries medfile and downloaded the conda hdf5 package. I'll try to build manually using CMAKE_GUI.
"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 »

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

Re: ana(conda) windows packaging

Post by sgrogan »

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.
"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 »

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

Re: ana(conda) windows packaging

Post by sgrogan »

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.
"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 »

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
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

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
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

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
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

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?
Post Reply