Just installed a virgin Debian Jessie on one off my machines. I tried to compile FreeCAD with nglig to be able to make FEM meshes inside FreeCAD. I used the commands provided by vejmarie here: https://gist.github.com/vejmarie/817f77 ... 3c24cf17be
vtk, occt, netgen all compiled and installed. But FreeCAD has problems to find nglibs. I had to specify them manually. I tried:
- Configuring done
WARNING: Target "Driver" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverDAT" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverDAT" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SMDS" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverSTL" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverSTL" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverUNV" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "DriverUNV" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SMESHDS" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SMESHDS" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "MEFISTO2" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "NETGENPlugin" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "NETGENPlugin" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SMESH" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "SMESH" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "StdMeshers" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "StdMeshers" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "MeshPart" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "MeshPartGui" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "Fem" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "FemGui" requests linking to directory "/opt/netgen/lib". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
running make gives errors in linking. In that direcktory I have a couple of libs and do not know which one I should take?
When looking at the FindNETGEN.cmake file I think it doesn't handle this correctly. On (older) Ubuntus the used netgen package only offers a single lib libnglib.so and for Linux the cmake file only expects this one. For OSX it already handles the split libraries. So, you could try to adjust the cmake file by copying over the part from the OSX check.
FreeCAD works great here so far with nglib on Debian Jessie. A problem I stumbled today is make install. After make install I get the following error ...
>>> import Fem
Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: libnglib.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
>>>
I have a birke (it's a mac ), bonsai, weide, eiche, pappel (debian lenny and still runs as print server !), kirsche, esche, boa I can't remember them all at the moment ...
Now the FindNetgen macro now supports if the library is split into several libraries. In order to let cmake find your library under /opt/netgen you must create inside cmake the key NETGEN_LIBDIR (of type PATH) and set its value to /opt/netgen.
When running the first time you have to check that it takes the libs of the same directory. If e.g. you have installed an older netgen version it may use the libnglib.so library under /usr/lib