Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libTogl undefined references

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?

like image 483
user3528789 Avatar asked Oct 13 '14 07:10

user3528789


1 Answers

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
like image 65
olliezhu Avatar answered Oct 29 '22 16:10

olliezhu