|
[Sponsors] |
[Netgen] Installation of Netgen in SuSE Linux 92 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 22, 2005, 12:04 |
Installation of Netgen in SuSE Linux 92
|
#1 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Hope it is OK to ask a question about installing Netgen on this OpenFOAM forum.
I have been using Netgen in Windows and OpenFOAM in SuSE 9,2 for a while. Obviously it's not ideal to reboot to switch program, so I have tried to install Netgen in SuSE Linux 9.2, but have run into some problems: In the README.INSTALL it is described to hack the makefile by adding: setenv MACHINE LINUX when running "make", I get the following errormessage: Makefile:4: *** missing separator. Stop. Anyone? Needless to say I'm not very experienced in Linux. Best Regards lars Edvardsen |
|
October 24, 2005, 05:41 |
Sounds like your makefile got
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Sounds like your makefile got 'corrupted'. Did you edit or copy/paste your Makefile under Windows or copy it from Windows? This might cause problems. Just unpack the original sources.
This is what I get: Unix> setenv MACHINE LINUX Unix> make cd libsrc; make make[1]: Entering directory `/home/pinky2/mattijs/pub/ngs44/libsrc' make[2]: Entering directory `/home/pinky2/mattijs/pub/ngs44/libsrc/linalg' .. |
|
October 25, 2005, 13:33 |
Thanks for reply, Mattijs
I
|
#3 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Thanks for reply, Mattijs
I found out that the first problem was that despite I had bash on my computer (SuSE 9,2), I had to use the command "export MACHINE=LINUX" instead of "setenv.... Anyway, I still get error messages. What I have tried to so far according to tips in the REDME.INTALL file is: - Problems with Tcl.init: export TCL_LIBRARY=/usr/lib/tcl8.4 export TK_LIBRARY=/usr/lib/tk8.4 export TIX_LIBRARY=/usr/lib/tix8.1 -which is the versions and location according to my installation. This is what I get: lars@linux:~/ngs44> make gcc -c -I./libsrc/include -I/opt/OpenCASCADE5.2/ros/inc -I./ngsolve/include -Ilibsrc/interface -DOPENGL -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL -ftemplate-depth-99 -finline-limit=20000 -funroll-loops -DNGSOLVE ngtcltk/ngappinit.cpp -o ngtcltk/ngappinit.o In file included from ngtcltk/ngappinit.cpp:7: ./libsrc/include/incvis.hpp:15:17: error: tcl.h: No such file or directory ./libsrc/include/incvis.hpp:16:16: error: tk.h: No such file or directory ./libsrc/include/incvis.hpp:26:19: error: GL/gl.h: No such file or directory ./libsrc/include/incvis.hpp:27:20: error: GL/glu.h: No such file or directory ./libsrc/include/../../togl/togl.h:160: warning: 'Togl_Init' initialized and declared 'extern' ./libsrc/include/../../togl/togl.h:160: error: 'Tcl_Interp' was not declared inthis scope ./libsrc/include/../../togl/togl.h:160: error: 'interp' was not declared in this scope ./libsrc/include/../../togl/togl.h:198: warning: 'Togl_Configure' initialized and declared 'extern' ./libsrc/include/../../togl/togl.h:198: error: 'Tcl_Interp' was not declared inthis scope ./libsrc/include/../../togl/togl.h:198: error: 'interp' was not declared in this scope ./libsrc/include/../../togl/togl.h:198: error: expected primary-expression before 'struct' ./libsrc/include/../../togl/togl.h:199: error: expected primary-expression before 'int' ./libsrc/include/../../togl/togl.h:199: error: expected primary-expression before 'const' ./libsrc/include/../../togl/togl.h:199: error: expected primary-expression before 'int' ./libsrc/include/../../togl/togl.h:199: error: initializer expression list treated as compound expression ./libsrc/include/../../togl/togl.h:221: error: expected initializer before '*' token ./libsrc/include/../../togl/togl.h:223: error: 'Tk_Window' does not name a type ./libsrc/include/../../togl/togl.h:243: error: 'GLuint' does not name a type ./libsrc/include/../../togl/togl.h:246: error: 'GLuint' has not been declared ./libsrc/include/../../togl/togl.h:280: warning: 'Togl_ClientData' initialized and declared 'extern' ./libsrc/include/../../togl/togl.h:280: error: variable or field 'Togl_ClientData' declared void ./libsrc/include/../../togl/togl.h:280: error: 'ClientData' was not declared inthis scope ./libsrc/include/../../togl/togl.h:282: error: 'ClientData' does not name a type ./libsrc/include/../../togl/togl.h:284: error: 'ClientData' has not been declared ./libsrc/include/../meshing/meshtype.hpp:965: error: ISO C++ forbids declaration of 'Mesh' with no type ./libsrc/include/../meshing/meshtype.hpp:965: error: expected ';' before '&' token ./libsrc/include/../meshing/meshtype.hpp:975: error: expected `)' before '&' token ngtcltk/ngappinit.cpp: In function 'int main(int, char**)': ngtcltk/ngappinit.cpp:100: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:100: error: 'myinterp' was not declared in this scope ngtcltk/ngappinit.cpp:100: error: 'Tcl_CreateInterp' was not declared in this scope ngtcltk/ngappinit.cpp:101: error: 'Tcl_AppInit' was not declared in this scope ngtcltk/ngappinit.cpp:101: error: 'TCL_ERROR' was not declared in this scope ngtcltk/ngappinit.cpp:115: error: 'TCL_PATCH_LEVEL' was not declared in this scope ngtcltk/ngappinit.cpp:148: error: 'Tcl_Eval' was not declared in this scope ngtcltk/ngappinit.cpp:160: error: 'Tcl_EvalFile' was not declared in this scope ngtcltk/ngappinit.cpp:188: error: 'Tcl_Eval' was not declared in this scope ngtcltk/ngappinit.cpp:189: error: 'Tcl_SetVar' was not declared in this scope ngtcltk/ngappinit.cpp:206: error: 'Tk_MainLoop' was not declared in this scope ngtcltk/ngappinit.cpp:207: error: 'Tcl_DeleteInterp' was not declared in this scope ngtcltk/ngappinit.cpp: At global scope: ngtcltk/ngappinit.cpp:215: warning: 'Tix_Init' initialized and declared 'extern' ngtcltk/ngappinit.cpp:215: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:215: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:216: warning: 'Itcl_Init' initialized and declared 'extern' ngtcltk/ngappinit.cpp:216: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:216: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:217: warning: 'Itk_Init' initialized and declared 'extern' ngtcltk/ngappinit.cpp:217: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:217: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:218: warning: 'Ng_Init' initialized and declared 'extern' ngtcltk/ngappinit.cpp:218: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:218: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:219: warning: 'Ng_Vis_Init' initialized and declared 'extern' ngtcltk/ngappinit.cpp:219: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:219: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:230: error: 'Tcl_Interp' was not declared in this scope ngtcltk/ngappinit.cpp:230: error: 'interp' was not declared in this scope ngtcltk/ngappinit.cpp:231: error: expected ',' or ';' before '{' token make: *** [ngtcltk/ngappinit.o] Error 1 Anyone seeing the solution? Lars |
|
October 25, 2005, 15:36 |
You'missing some files (GL/, t
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
You'missing some files (GL/, tcl.h etc.) in /usr/include.
Your can install them from your suse9.2 cd. Just install all of the development libraries and sources . |
|
October 25, 2005, 19:29 |
Sorry to keep nagging, Mattijs
|
#5 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Sorry to keep nagging, Mattijs, but I think I'm almost there. Installing development packages helped. The error messages has been narrowed down to:
lars@linux:~/ngs44> make gcc -c -I./libsrc/include -I/opt/OpenCASCADE5.2/ros/inc -I./ngsolve/include -Ilibsrc/interface -DOPENGL -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL -ftemplate-depth-99 -finline-limit=20000 -funroll-loops -DNGSOLVE ngtcltk/ngappinit.cpp -o ngtcltk/ngappinit.o ./libsrc/include/../meshing/meshtype.hpp:965: error: ISO C++ forbids declarationof 'Mesh' with no type ./libsrc/include/../meshing/meshtype.hpp:965: error: expected ';' before '&' token ./libsrc/include/../meshing/meshtype.hpp:975: error: expected `)' before '&' token make: *** [ngtcltk/ngappinit.o] Error 1 lars@linux:~/ngs44> I can find and open the C++ Header File "meshtype.hpp" and read line 965 to 975, but can't figure what the problem is. Anyway the code here says: XXXXXXXX line 962 XXXXXXXXX { private: Mesh & mesh; /// identify points (thin layers, periodic b.c.) INDEX_2_HASHTABLE<int> * identifiedpoints; /// number of identifications (or, actually used identifications ?) int maxidentnr; public: /// Identifications (Mesh & amesh); /// ~Identifications (); void Delete (); /* Identify points pi1 and pi2, due to identification nr identnr */ void Add (PointIndex pi1, PointIndex pi2, int identnr); int Get (PointIndex pi1, PointIndex pi2) const; int GetSymmetric (PointIndex pi1, PointIndex pi2) const; /// INDEX_2_HASHTABLE<int> & GetIdentifiedPoints () { Thanks, so far. Lars |
|
October 26, 2005, 03:15 |
What happens if you remove the
|
#6 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
What happens if you remove the space
between Mesh and &. Plus i think you should add the -fpermissive flag to the makefile. N |
|
October 26, 2005, 14:35 |
In meshtype.hpp line 957 I add
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
In meshtype.hpp line 957 I added
class Mesh; and that seemed to help with that one. |
|
October 27, 2005, 19:16 |
Thanks for all tips,
"class m
|
#8 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Thanks for all tips,
"class mesh;" solved that problem. (I'm afraid I don't know enough about C++ to know how to ad a -fpermissive flag, or what it means) Then it was the thing about right version of the tkInt.h file in the togl directory, wich was fixed. But I still keep getting errormessages, now its: lars@linux:~/ngs44> make gcc -c -I./libsrc/include -I/opt/OpenCASCADE5.2/ros/inc -I./ngsolve/include -Ilibsrc/interface -DOPENGL -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL -ftemplate-depth-99 -finline-limit=20000 -funroll-loops -DNGSOLVE ngtcltk/demoview.cpp -o ngtcltk/demoview.o ./libsrc/include/../general/array.hpp: In constructor 'netgen::ARRAY<t,>::ARRAY(int) [with T = netgen::InterpolationPoint<netgen::vec<3> > [3], int BASE = 0]': ngtcltk/demoview.hpp:116: instantiated from 'netgen::InterpolationSpline<s>::InterpolationSpli ne(S) [with S = netgen::Vec<3>]' ngtcltk/demoview.cpp:315: instantiated from here ./libsrc/include/../general/array.hpp:155: error: invalid use of undefined type 'class netgen::InterpolationPoint<netgen::vec<3> >' ngtcltk/demoview.hpp:74: error: declaration of 'class netgen::InterpolationPoint<netgen::vec<3> >' make: *** [ngtcltk/demoview.o] Error 1 lars@linux:~/ngs44>116 Still hoping, Lars |
|
October 30, 2005, 19:11 |
Actually I also had problems i
|
#9 |
Guest
Posts: n/a
|
Actually I also had problems installing netgen on suse so then I installed it on win xp under cygwin. It works fine... You should try that if everything else fails.
How/where did you install Tcl/Tk + Tix + Mesa? In which directories? Did you follow the installation instructions (readme's) and get no errors? As I remember it, I once screwed up the Mesa installation and then I got tired of trying... Also, as I remember it, tcl/tk should be in your path but I also think you can install some of these programs with the suse installation (yast?) program. I think I'll try installing it on suse again later but I agree it's not straightforward. I don't know if it helped you anything but perhaps you should try the cygwin solution. |
|
October 31, 2005, 05:05 |
Are you compiling with gcc4? Y
|
#10 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Are you compiling with gcc4? You could try compiling with an older version of gcc. Gcc4 is more strict.
|
|
October 31, 2005, 05:34 |
Hey Mattijs,
did u try adding
|
#11 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Hey Mattijs,
did u try adding -fpermissive? I found this flag very useful for the AIX system. N |
|
October 31, 2005, 05:38 |
No haven't. For what software
|
#12 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
No haven't. For what software do you need this? I hope not OpenFOAM?
|
|
October 31, 2005, 05:40 |
nope, but paraview for instanc
|
#13 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
nope, but paraview for instance will not compile without it.
N |
|
October 31, 2005, 18:19 |
I installed Tcl/Tk + Tix with
|
#14 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
I installed Tcl/Tk + Tix with YaST under /usr/lib/, but used export TCL_LIBRARY=/usr/lib/tcl8.4 etc. to set the variables.
I am compiling with gcc 3.3.4... Hey Niklas, I understand (now) -fpermissive allows for non-conformant code. But what exactly do you write, and where in the makefile? Any risks? LE |
|
November 1, 2005, 19:00 |
Hello, Lars.
I don't know w
|
#15 | |
Guest
Posts: n/a
|
Hello, Lars.
I don't know what's wrong with you installation, but today I got netgen running on my home computer after I saw it being installed on another computer by a more experienced linux user. Both systems ran suse 9.3, and I can see that you're almost there since the last problem I had also was with the togl/ directory (the first problems was correctly as Mattijs writes about missing files in /usr/include). Once you get to this problem below which I've now seen 2 times today on 2 different linux pc's: togl/togl.cpp:144: error: ISO C++ forbids declaration of `Sorry' with no type togl/togl.cpp:144: error: ISO C++ forbids declaration of `you' with no type togl/togl.cpp:144: error: syntax error before `have' Then you'll have to follow the instructions from the netgen homepage section trouble shooting: Quote:
#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==9 # include "tkInt.h" #else Sorry, you will have to edit togl.c to include the right tkInt.h file #endif Since my version of tk was 8.4.9-9, the program would jump to the "Sorry, you.." and this explains the error since the code has problems with newer versions! The tkInt.h was copied from /usr/include/tkInt.h to current togl-directory and when you then do a "make" again, compilation will take about 15 minutes and you're done. Compiler was gcc (GCC) 4.0.1, no need for -fpermissive or anything else mentioned in this thread. Since I also used: export TCL_LIBRARY=/usr/lib/tcl8.4 export TK_LIBRARY=/usr/lib/tk8.4 export TIX_LIBRARY=/usr/lib/tix8.1 Then our systems must be much alike. Good luck, I think you should start completely from scratch again and don't edit anything else but togl.cpp! I hope this was good news for you... You're actually very close to completing the installation. I think your problem is that you changed something in the other source files... Let me know if this helps. |
||
November 2, 2005, 19:30 |
Thanks for tips, Martin.
I'
|
#16 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Thanks for tips, Martin.
I'm happy for you fixing the problem on your computer. The only difference I undertand between the two system is that I run suse 9,2 and gcc 3.3.4 instead of suse 9,3 and gcc 4.0.1. Strangly enough I have done quite the same as you, but keep getting the same errormessage as before. I have tried to follow the tip about -fpermissive as well by adding this after CPLUSPLUSFLAGS = in Makefile (not all Makefiles). The errors are still: lars@linux:~/ngs44> make gcc -c -I./libsrc/include -I/opt/OpenCASCADE5.2/ros/inc -I./ngsolve/include -Ilibsrc/interface -DOPENGL -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL -ftemplate-depth-99 -finline-limit=20000 -funroll-loops -DNGSOLVE ngtcltk/demoview.cpp -o ngtcltk/demoview.o ./libsrc/include/../general/array.hpp: In constructor 'netgen::ARRAY<t,>::ARRAY(int) [with T = netgen::InterpolationPoint<netgen::vec<3> > [3], int BASE = 0]': ngtcltk/demoview.hpp:116: instantiated from 'netgen::InterpolationSpline<s>::InterpolationSpli ne(S) [with S = netgen::Vec<3>]' ngtcltk/demoview.cpp:315: instantiated from here ./libsrc/include/../general/array.hpp:155: error: invalid use of undefined type 'class netgen::InterpolationPoint<netgen::vec<3> >' ngtcltk/demoview.hpp:74: error: declaration of 'class netgen::InterpolationPoint<netgen::vec<3> >' make: *** [ngtcltk/demoview.o] Error 1 lars@linux:~/ngs44>116 Something with 'class netgen' ? Could I still be missing some development libraries? Lars |
|
November 3, 2005, 03:57 |
By the way, Martin. Where did
|
#17 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
By the way, Martin. Where did you install netgen, in /home/username/ngs44 or /usr/local... and how does the structure look like?
A general question; I understand that when building from sources, it is usually three commands that has to be used: ./configure make make install Have I understood it right as for programs like netgen, where there already exists Makefile, the ./configure command is skipped? |
|
November 3, 2005, 09:17 |
Hi,
I installed it in /home
|
#18 |
Guest
Posts: n/a
|
Hi,
I installed it in /home/martin/ngs44 since I'm the only linux user on both machines, but I guess on a multiuser system it would be better to place it in /usr/local? Not so important, though (still compiled as root). Actually as I remember it I think I only did "make" and used yast to install the necessary development stuff. I think you need to open yast and install some more devel libraries and don't worry about classes + flags etc. Do you have something named ?-x11-?-devel installed (can't remember the exact name), and also development libraries for tcl/tk + tix? NOTICE: Look for the files in /usr/include if in doubt. Then you'll know whether you need more devel libraries or not. I didn't install mesa this time and only used yast for installing what was missing (didn't grab the files from the netgen download page). I still think you shouldn't change anything but the togl.cpp so I would start all over if I were you. ----- BTW: Anyone got any hints on how to get STEP/IGES import functionality working with netgen? I tried to install OpenCASCADE with java -jar setup.jar (don't remember the exact filename, but the installer just exited). Binary files should be in /opt/? but I can't even start the program...... I then did a "make" in the netgen installation directory again and this time compilation took more than 1 hour, but still I can't import IGES/STEP files on suse 9.3. Anyone, perhaps Mattijs got any hints? |
|
November 3, 2005, 18:09 |
Fantastic, I finally made it!
|
#19 |
New Member
Lars Edvarsen
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Fantastic, I finally made it! The only difference now (as far as I have registered) was that I compiled as root. Thanks for help so far.
...anyway when trying to build the IGES/STEP OpenCascade module, I get the errormessage: /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld: cannot find -lTKIGES collect2: ld returned 1 exit status make: *** [ng] Error 1 linux:/home/Lars/ngs44 # ...but then again its stated on the Netgen website that: "At present, only the NETGEN version downloaded via CVS access supports the installation of the OpenCascade kernel." (Anyhow it does work in the windows version) L |
|
May 13, 2006, 01:12 |
Any one succeeded in compiling
|
#20 |
New Member
colinss
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
Any one succeeded in compiling negen on linux with OpenCascade kernel?
I can compile it without the kernel but have difficulties with it. Any suggestion will be appreciated. Colinss |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
installation Problem - Linux distribution (Not a meshing problem) | v_herw | Pointwise & Gridgen | 2 | June 20, 2016 15:47 |
[OpenFOAM.org] OpenFOAM 2.3.1 installation on SUSE Linux Enterprise 12 | harsha_kulkarni | OpenFOAM Installation | 17 | November 16, 2015 04:06 |
OpenFoam 2.3.0 installation on SUSE Linux Enterprise Server 11 | sherif35 | OpenFOAM Installation | 4 | July 7, 2014 13:22 |
Dual Boot Windows and Linux and Go Open Source | andyj | Main CFD Forum | 2 | October 21, 2010 17:49 |
Installing OpenFOAM on SuSE Linux 91 | Lars Edvardsen (Edvardsen) | OpenFOAM Installation | 2 | January 10, 2005 03:26 |