The Linux Wacom Project
SourceForge.net Logo

Linux Wacom Project HOWTO

13.3 - Building wacomcpl






wacomcpl is written in tcl/tk. It uses libwacomxi.so and xsetwacom to communicate with Wacom XFree86/Xorg driver, wacom_drv.(s)o. So, to run wacomcpl, tcl/tk should be installed, libwacomxi.so and xsetwacom should be built and installed.

libwacomxi.so and xsetwacom are enabled by default in the configure script. By default, the script will assume that tcl/tk is installed under /usr. That is, tcl.h and tk.h should be under /usr/include; libtcl.so.0 and libtk.so.0 should be under /usr/lib. Let's see what we get from configure:

[jej@ayukawa linuxwacom]$./configure
...
----------------------------------------
  BUILD ENVIRONMENT:
       architecture - i686
       linux kernel - yes 2.6
  module versioning - yes
      kernel source - yes /usr/src/linux
            XFree86 - no
               XLib - yes /usr/X11R6
                TCL - yes /usr
                 TK - yes /usr
            ncurses - yes

  BUILD OPTIONS:
            wacom.o - no
            wacdump - yes
             xidump - yes
        libwacomcfg - yes
         libwacomxi - yes
          xsetwacom - yes
              hid.o - no
         usbmouse.o - no
            evdev.o - no
         mousedev.o - no
            input.o - no
        tabletdev.o - no
        wacom_drv.o - no
----------------------------------------

As shown above, the build options indicate that libwacomxi and xsetwacom will be built. If not, then scroll back through the configuration to see if there are any errors or warnings that would explain this.

For example, on another system, I have installed tcl/tk under /usr/local/ActiveTcl. That is, tcl.h and tk.h are under /usr/local/ActiveTcl/include. If I run configure without options, I get:

[jej@ayukawa linuxwacom]$./configure
...
----------------------------------------
  BUILD ENVIRONMENT:
       architecture - i686
       linux kernel - yes 2.6
  module versioning - yes
      kernel source - yes /usr/src/linux
            XFree86 - no
               XLib - yes /usr/X11R6
                TCL - no
                 TK - no
            ncurses - yes
                GTK - 2.0.6

  BUILD OPTIONS:
            wacom.o - no
            wacdump - yes
             xidump - yes
        libwacomcfg - yes
         libwacomxi - no
          xsetwacom - yes
              hid.o - no
         usbmouse.o - no
            evdev.o - no
         mousedev.o - no
            input.o - no
        tabletdev.o - no
        wacom_drv.o - no
----------------------------------------

The build options show that libwacomxi will not be built. When I scroll back through the configuration, I see:

...
checking for tcl header files... not found; tried /usr/include/tcl.h
***
*** WARNING:
*** The tcl development environment does not appear to
*** be installed. The header file tcl.h does not appear
*** in the include path. Do you have the tcl rpm or
*** equivalent package properly installed?  Some build
*** features will be unavailable.
***
checking for tk header files... not found; tried /usr/include/tk.h and /include/tk.h
***
*** WARNING:
*** The tk development environment does not appear to
*** be installed. The header file tk.h does not appear
*** in the include path. Do you have the tk rpm or
*** equivalent package properly installed?  Some build
*** features will be unavailable.
***
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
***
*** WARNING:
*** libwacomxi requires tcl environment; libwacomxi will not be built.
***
...

Then I run configure with option --with-tcl=/usr/local/ActiveTcl:

[jej@ayukawa linuxwacom]$./configure --with-tcl=/usr/local/ActiveTcl
...
----------------------------------------
  BUILD ENVIRONMENT:
       architecture - i686
       linux kernel - yes 2.6
  module versioning - yes
      kernel source - yes /usr/src/linux
            XFree86 - no
               XLib - yes /usr/X11R6
                TCL - yes /usr/local/ActiveTcl
                 TK - yes /usr/local/ActiveTcl
            ncurses - yes

  BUILD OPTIONS:
            wacom.o - no
            wacdump - yes
             xidump - yes
        libwacomcfg - yes
         libwacomxi - yes
          xsetwacom - yes
              hid.o - no
         usbmouse.o - no
            evdev.o - no
         mousedev.o - no
            input.o - no
        tabletdev.o - no
        wacom_drv.o - no
----------------------------------------

Note: You may need to issue the following commands before running wacomcpl:

[jej@ayukawa linuxwacom]$export LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH
[jej@ayukawa linuxwacom]$su
[jej@ayukawa linuxwacom]#cd /usr/local/ActiveTcl/lib
[jej@ayukawa lib]#ln -s libtcl.8.4.so libtcl.so.0
[jej@ayukawa lib]#ln -s libtk.8.4.so libtk.so.0

If your tcl and tk are installed on different paths, you'll need to specify them separately. Suppose that your tcl is under /usr/local/tcl8.4 and your tk is under /usr/local/tk8.4, the proper configuration and setup commands will be:

[jej@ayukawa linuxwacom]$./configure --with-tcl=/usr/local/tcl8.4 --with-tk=/usr/local/tk8.4
[jej@ayukawa linuxwacom]$export LD_LIBRARY_PATH=/usr/local/tcl8.4/lib:/usr/local/tk8.4/lib:$LD_LIBRARY_PATH
[jej@ayukawa linuxwacom]$su
[jej@ayukawa linuxwacom]#cd /usr/local/tcl8.4/lib
[jej@ayukawa lib]#ln -s libtcl.8.4.so libtcl.so.0
[jej@ayukawa lib]#cd /usr/local/tk8.4/lib
[jej@ayukawa lib]#ln -s libtk.8.4.so libtk.so.0

Next, run make. The output will be stored in the linuxwacom package's src/wacomxi and src/wacomxi/.libs directories. They will be installed by running make install (you need to switch to superuser to run this command).






Copyright (C) 2002-2011 - LinuxWacom -Last updated July 23, 2012
This website and its contents are licensed under the GNU GENERAL PUBLIC LICENSE.