Compiling on Linux

About the development of the FEM module/workbench.

Moderator: bernd

xat80
Posts: 12
Joined: Sat Jul 06, 2013 12:28 pm

Compiling on Linux

Post by xat80 »

Hi, I tryed to compiled the FEM module, I downloded netgen, compiled from source and installed. I also modified the cmake files that preented compiling on other platform than windows but compilation fails due to some macros being defined twice differently cause by a mismatch version of netgen I think. Can youindicated waht version is best?
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Compiling on Linux

Post by jriegel »

For windows I used the last version BELOW 5.

You need the develop-fem branch, since not all changes are fully in master.

So far, I think its not fully ported on Linux, since most of the packages on Debian/Ubuntu don't export some headers needed.
But till you compile on yourself it should work. I'm not sure the cMake integration is fully working on Linux.

I would be very interested in changes you have to make to the source. So pleas send you porting diff to us for upstream integration.

Cheers
Jürgen
Stop whining - start coding!
xat80
Posts: 12
Joined: Sat Jul 06, 2013 12:28 pm

Re: Compiling on Linux

Post by xat80 »

I was using 5.0, I will retry with the latest in the 4.x series and will send you the changes if I manage to get it working.
Thanks
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Compiling on Linux

Post by ickby »

Hello,

today I compiled the FEM workbench on linux, and even if most of the changes are half-backed I thought I share them, maybe they are usefull.
git@github.com:ickby/FreeCAD_constraint.git , the jriegel/develop-fem branch has the changes. Here some comments:

* the material workbench does not compile on it's own. Somehow links missing the "StandardMaterial" folder get into the make file, I have no clue why. I edited them by hand.

* the undefined symbol error already reportet on mantis is due to some strange mefisto2 linking error. Maybe I was too stupid to link Mefisto to stdmeshers, but in the end only adding the mefisto source file directly to the stdmeshers library worked.

* I added netgen 5.1 to the sources and it compiles the nglib automaticly. In my opinion thats the best way, as one has to provide some headers anyway. However, I did not find a way to copy the nglib into freecads lib directory, Again I've done that by hand
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Compiling on Linux

Post by jriegel »

Ahh, Ok.

I will soon merge the first stage of the FreeCAD FEM module (preprocessing) into master. Then I think your work will be examined
and take forward. I'm not sure we are already at the point to integrate Netgen, since its a package in most Distros.
Stop whining - start coding!
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Compiling on Linux

Post by ickby »

Actually I did not intended it for inclusion, just for shareing it with other guys who are curious and try to compile the branch before it hits master. As said, the changes I did are very rude and only make it work with some additional handwork. So it would not be a good soloution at all for normal operation
psi13art
Posts: 50
Joined: Sat Oct 02, 2010 4:01 pm

Re: Compiling on Linux

Post by psi13art »

Ubuntu 12.04

Compile
cmake . && make
sudo make install

Activate FEM workbench
/usr/local/lib/StdMeshers.so: undefined symbol: _Z6aptrteidiPiP2R2iS1_RiRS1_S2_RS_S2_
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Compiling on Linux

Post by jriegel »

seams you have a installed SMESH module!? That won't work. FreeCAD comes with a (patched) SMESH in the sources. It have to be build on Linux too.
Stop whining - start coding!
psi13art
Posts: 50
Joined: Sat Oct 02, 2010 4:01 pm

Re: Compiling on Linux

Post by psi13art »

valber@Asuka:[build]$ sudo make install|grep SMESH
[ 4%] Built target SMESHDS
[ 5%] Built target SMESH
-- Up-to-date: /usr/local/lib/SMESHDS.so
-- Up-to-date: /usr/local/lib/SMESH.so
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Compiling on Linux

Post by ickby »

Thats again the MEFISTO StdMesher symbols problem, werner pushed a fix for that an hour ago.
Post Reply