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 »

I had

Code: Select all

# conda environments:
#
fcocc71                  C:\Users\Chris\Miniconda3\envs\fcocc71
fcooc7                   C:\Users\Chris\Miniconda3\envs\fcooc7
root                  *  C:\Users\Chris\Miniconda3
I removed both occ envs (even the one with the typo) then

Code: Select all

conda create -n <name> freecad occt=7.1.0
activate <name>
Same missing dll at FEM load.
Maybe my root is polluted?
"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 »

I can confirm this on on another machine with win8. I think there is most-likely a problem with netgen. Maybe you can ty to compile it yourself:

Code: Select all

git clone FreeCAD_Conda
cd FreeCAD_Conda/netgen
conda build . --python=3.5 # maybe disable the -DUSE_PYTHON in bld.bat
activate freecad-env
conda install netgen --use-local -f
I have tried to compile this myself, on win8 but here no visual-studio 2015 is available.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

just compiled netgen with win10. It doesn't solve the missing dll.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

recompiling freecad on win10 doesn't solve the issue either...
On win10 I cannot import MeshPart. I have no idea how to debug this.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

looo wrote:recompiling freecad on win10 doesn't solve the issue either...
On win10 I cannot import MeshPart. I have no idea how to debug this.
In the gui I can switch to Mesh Design but both Mefisto and Netgen meshers are greyed out. Maybe something with one of the SMESH dependencies VTK?
I'll try again to get dependency walker working.
"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 »

just tried to compile vtk on windows10. There are some problems regarding hdf5 reported. No such problems on win7.

Code: Select all

-- HDF5: Performing CXX Test OLD_HEADER_FILENAME - Failed
-- HDF5: Performing CXX Test H5_NO_NAMESPACE - Failed
-- HDF5: Performing CXX Test H5_NO_STD - Failed
-- HDF5: Performing CXX Test BOOL_NOTDEFINED - Failed
-- HDF5: Performing CXX Test NO_STATIC_CAST - Failed
-- HDF5: Checking for InitOnceExecuteOnce:
-- HDF5: Performing Test InitOnceExecuteOnce - Failed
-- HDF5: Performing Other Test INLINE_TEST_inline - Success
-- HDF5: Performing Other Test INLINE_TEST___inline__ - Failed
-- HDF5: Performing Other Test INLINE_TEST___inline - Success
-- HDF5: Checking for appropriate format for 64 bit long:
HDF5: Width test failed with result: FAILED_TO_RUN
-- HDF5: Checking for appropriate format for 64 bit long: not found
-- HDF5: checking IF converting from long double to integers is accurate... yes
-- HDF5: checking IF accurately converting from integers to long double... yes
-- HDF5: Checking IF accurately converting unsigned long to float values... no
-- HDF5: Checking IF accurately roundup converting floating-point to unsigned long long values... no
-- HDF5: Checking IF right maximum converting floating-point to unsigned long long values... no
-- HDF5: Checking IF correctly converting long double to unsigned int values... no
-- HDF5: Checking IF compiling unsigned long long to floating-point typecasts work... yes
-- HDF5: Checking IF compiling long long to floating-point typecasts work... yes
-- HDF5: Checking IF overflows normally converting floating-point to integer values... no
-- HDF5: Checking IF your system converts long double to (unsigned) long values with special algorithm... no
-- HDF5: Checking IF your system can convert (unsigned) long to long double values with special algorithm... no
-- HDF5: Checking IF correctly converting long double to (unsigned) long long values... no
-- HDF5: Checking IF correctly converting (unsigned) long long to long double values... no
-- HDF5: Checking IF your system generates wrong code for log2 routine... no
-- HDF5: Checking IF alignment restrictions are strictly enforced... no
ps.: and this is caused by missing crt-library:
Capture.PNG
Capture.PNG (13.89 KiB) Viewed 1611 times
Maybe this is the problem we are facing with win10 /win8. @peterl94 has fixed this for smesh by adding some additional libraries:
https://github.com/looooo/FreeCAD_Conda ... 2d8dafb0a9

issue for conda-forge: https://github.com/conda-forge/hdf5-feedstock/issues/67
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

I haven't looked into the HDF5 error yet, but I have narrowed down the MeshPart error to a problem with netgen. Trying to load NETGENPlugin.dll using ctypes.cdll.LoadLibrary from python.exe shows that it can't resolve the symbol:

Code: Select all

public: virtual void __cdecl netgen::OCCGeometry::Save(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const __ptr64
But I haven't gotten as far as figuring out why.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Post by looo »

The HDF5 problem seems to be only a problem with building...
Nice you have figured out what is causing the netgen issue. I really have no clue how to solve it. I even cannot find where this function is used.
If this symbol is unresolved, does it mean the function is used somewhere in freecad but not available anymore in netgen? Or again a missing DLL-export?
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

looo wrote:Or again a missing DLL-export?
It seems to be, but I don't understand how. That function has DLL_HEADER in front of it so it should be exported, but it is not. However, it is exported when exporting the whole class instead of individual members. I'll make a PR tonight.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

Gah! The problem was not the problem! Although it looked like it was installing the latest netgen package, it was actually using an older cached package that had the same name but the dll didn't contain the needed symbol. The dll in the latest netgen package does contain the symbol, so I deleted all netgen packages from Miniconda3\pkgs and reinstalled.

Now the question is, are you having the same problem or is it something else? Just for kicks, maybe you can try deleting any cached netgen packages?
Post Reply