/brlcad/brlcad-7.14.0/src/bwish# /bin/sh ../../libtool --silent --mode=link gcc -pipe -fno-strict-aliasing -fno-common -fexceptions -g -L/usr/local/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -g -o btclsh btclsh-cmd.o btclsh-input.o btclsh-main.o btclsh-tcl.o ../../src/libtclcad/libtclcad.la ../../src/libdm/libdm.la ../../src/other/blt/libBLT24.la ../../src/other/incrTcl/libitk.la ../../src/other/incrTcl/libitcl.la -L../../src/other/tk/unix -ltk8.5 -L../../src/other/tcl/unix -ltcl8.5 -ldl -lm ../../src/libtermio/libtermio.la



/home/bryan/manufacturing/brlcad/brlcad-7.14.0/src/libdm/.libs/libdm.so: undefined reference to `XFreeDeviceList'
/home/bryan/manufacturing/brlcad/brlcad-7.14.0/src/libdm/.libs/libdm.so: undefined reference to `XOpenDevice'
/home/bryan/manufacturing/brlcad/brlcad-7.14.0/src/libdm/.libs/libdm.so: undefined reference to `XSelectExtensionEvent'
/home/bryan/manufacturing/brlcad/brlcad-7.14.0/src/libdm/.libs/libdm.so: undefined reference to `XListInputDevices'
collect2: ld returned 1 exit status


http://74.125.47.132/search?q=cache:FGTAX5b2AoUJ:lists.trolltech.com/qt-interest/2008-04/thread00002-0.html+%22+undefined+reference+to+%60XFreeDeviceList%27+%22&hl=en&ct=clnk&cd=2&gl=us&client=opera
http://ibot.rikers.org/%23brlcad/20060201.html.gz
try xlib and xlib-dev.

fix: apt-get install libxi-dev libxi6
also, add -lXi to the compile line so that it looks like this:

/brlcad/brlcad-7.14.0/src/bwish# /bin/sh ../../libtool --silent --mode=link gcc -pipe -fno-strict-aliasing -fno-common -fexceptions -g -L/usr/local/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -g -o btclsh btclsh-cmd.o btclsh-input.o btclsh-main.o btclsh-tcl.o ../../src/libtclcad/libtclcad.la ../../src/libdm/libdm.la ../../src/other/blt/libBLT24.la ../../src/other/incrTcl/libitk.la ../../src/other/incrTcl/libitcl.la -L../../src/other/tk/unix -ltk8.5 -L../../src/other/tcl/unix -ltcl8.5 -ldl -lm ../../src/libtermio/libtermio.la -lXi

but actually you'll need to run with ./configure --with-libs="-lXi -I/usr/include/tcl8.4"

try also: apt-get install libxext6 libxext-dev

also src/util/bombardier.c needs to have the "tk.h" header inclusion fix to where-ever you have your tk.h installed. Make sure it's the same version as tcl. In my case I'm compiling with tcl8.4 for some reason. (8.5 seems to be available via apt-get)