Search code examples
tclopensuseiraf

Unable to link TCL headers on openSUSE 15.4


I need to install a graphical terminal window on openSUSE 15.4: xgterm. The source is available on GIT:

https://github.com/iraf-community/x11iraf/tree/main/xgterm

Make tries to link the tcl headers(?), but is unable to locate them. Make fails at command:

cc -o xgterm button.o charproc.o cursor.o data.o gtermio.o input.o main.o menu.o misc.o screen.o scrollbar.o tabs.o util.o VTPrsTbl.o -L../obm -lobm -lXpm -ltcl -lXaw3d -lXmu -lXt -lXext -lX11 -lncurses -lm

The error is:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -ltcl: No such file or directory

I tried installing all the TCL development files. I use the 64-bit versions consistently:

tclplug-3.1.0-bp154.1.22.x86_64
sqlite3-tcl-3.44.0-150000.3.23.1.x86_64
tcllib-1.20-bp154.1.23.noarch
tcl-brlapi-6.4-150400.4.5.1.x86_64
tcl-devel-8.6.12-150300.14.9.1.x86_64
tcludp-1.0.11-bp154.1.21.x86_64
tclx-8.4.4-bp154.2.3.1.x86_64
R-tcltk-4.1.2-bp154.2.214.x86_64
patterns-devel-tcl-devel_tcl-20170319-lp154.1.2.x86_64
tcl8-xapian-1.4.17-bp154.2.57.x86_64

Still, no luck, the error remains.

When I search for headers I see that /usr/include/tcl.h exists.

I wonder, does anyone have experience with TCL and a suggestion on how to resolve this?


Solution

  • The project doesn't include a configure file, which is usually used to adapt the build process to differences in environments. The Makefile just hardcodes -ltcl, which would look for libtcl.so. However, the Tcl shared lib is actually called libtcl8.6.so.

    So, there are 2 choices:

    • Edit the Makefile to -ltcl8.6
    • Create a symbolic link from /usr/lib64/libtcl.so to /usr/lib64/libtcl8.6.so