I am trying to install netgen (build from source). Therefore Togl is needed and I installed it via

sudo apt-get install libtogl1 libtogl-dev

When typing 'make' I receive the following error messages:

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tk_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tkStubsPtr'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tcl_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tclStubsPtr'

Maybe Togl was not installed right. Is this an 32bit 64bit issu? What should I do to fix this?

share|improve this question
    
Error message says that you need to link with TCL and Tk too (add -ltcl8.5 -ltk8.5 to link flags, set your correct version). – keltar Oct 13 '14 at 9:03

This is an issue with linking to the correct versions of Tcl and Tk, as @keltar mentioned. If your goal is to build Netgen from source, your best bet is to stick with netgen-5.3.1, which works with tcl8.5 and tk8.5.

I ran into this issue because when I ran sudo apt-get install tcl-dev tk-dev, apt-get fetched tcl8.6 and tk8.6 for me. (If you search online for these issues you can see that these linking issues can sometimes be resolved by updating your Tcl/Tk version.) I uninstalled the default tcl-dev and tk-dev packages and installed tcl8.5-dev and tk8.5-dev instead.

Once you have the best fit version of Tcl/Tk, you can install Netgen from source. For example,

./configure --with-tclconfig=/usr/lib/tcl8.5/ --with-tkconfig=/usr/lib/tk8.5/
make
make install
share|improve this answer
1  
More than two years after the OP pointed out this problem, the latest version of netgen still requires the user to install a deprecated version of Tcl//Tk. sourceforge.net/p/netgen-mesher/discussion/905306/thread/…. – RHertel Feb 20 '16 at 17:40
    
This worked like a charm, thanks! – Germanunkol Feb 22 '17 at 8:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.