# dev-tcltk/tix bug

## flammenflitzer

Ich wollte mit dem Installer Call to Power installieren

```

./ctp-install

Traceback (most recent call last):

  File "./ctp-install", line 16, in ?

    root = Tk()

  File "/usr/lib/python2.4/lib-tk/Tix.py", line 210, in __init__

    self.tk.eval('package require Tix')

_tkinter.TclError: couldn't load file "/usr/lib64/libtix8.2.so": /usr/lib64/libtix8.2.so: undefined symbol: XLowerWindow

```

Kann mir jemand weiterhelfen?

/usr/lib64/libtix8.2.so existiert.

```

ls -la /usr/lib64/libtix8.2.so

-r-xr-xr-x  1 root root 312112 26. Aug 09:07 /usr/lib64/libtix8.2.so

```

Ich habe den Bug gefunden, werde aber nicht so recht schlau, was ich machen muß.

```
http://bugs.gentoo.org/show_bug.cgi?id=88513
```

```
After adding dev-tcltk/tix I should be able to use the Tix widgets from python, but instead I get an error when trying to import:

_tkinter.TclError: couldn't load file "/usr/lib/libtix8.2.so": /usr/lib/libtix8.2.so: undefined symbol: XLowerWindow

Reproducible: Always

Steps to Reproduce:

1. build dev-lang/python

2. build dev-tcltk/tix

3. Try to use Tix from python

python

import Tix

r = Tix.Tk()

Actual Results:  

_tkinter.TclError: couldn't load file 

"/usr/lib/libtix8.2.so": /usr/lib/libtix8.2.so: undefined symbol: XLowerWindow 

 

Expected Results:  

No error. 

I got this to work by manually relinking _tkinter.so.  

  

_tkinter.so needs to link in libtix.  

  

I did...  

  

emerge unpack  

emerge compile  

  

then switched in to the work directory and did ...  

i686-pc-linux-gnu-gcc -pthread -shared build/temp.linux-i686-2.3/_tkinter.o  

build/temp.linux-i686-2.3/tkappinit.o -L/usr/X11R6/lib -L/usr/local/lib -ltk8.4  

-ltcl8.4 -lX11 -ltix8.2 -o build/lib.linux-i686-2.3/_tkinter.so  

  

(adding -ltix8.2 which was not there in the original compile)  

  

Now tix works from python...

------- Additional Comment #1 From T. Koehler 2005-07-12 07:33 PDT -------

Although the solution presented by the parent may work, it is only a workaround,

because it would mean that any extension to Tk would need a recompile of python

to work. The real problem lies within /usr/lib/tkConfig.sh, which contains two

types of errors:

1) The paths to the headers and libraries ("TK_SRC_DIR", several others) contain

the tmp-directory used by portage for compilation. This needs to be changed to

"/usr/lib/tk8.4/include"

2) The variables for the stub-libraries do not contain -lX11.

Error 1) causes Tix to fail to compile on my machine (amd64). After fixing this,

the error described by the parent occurs.

Error 2) causes the "undefined symbol"-error from within python. Fixing it makes

Tix work from python without having to recompile python.
```

Last edited by flammenflitzer on Sun Aug 28, 2005 3:57 pm; edited 1 time in total

----------

## Raistlin

```
------- Additional Comment #1 From T. Koehler 2005-07-12 07:33 PDT -------

Although the solution presented by the parent may work, it is only a workaround,

because it would mean that any extension to Tk would need a recompile of python

to work. The real problem lies within /usr/lib/tkConfig.sh, which contains two

types of errors:

1) The paths to the headers and libraries ("TK_SRC_DIR", several others) contain

the tmp-directory used by portage for compilation. This needs to be changed to

"/usr/lib/tk8.4/include"

2) The variables for the stub-libraries do not contain -lX11.

Error 1) causes Tix to fail to compile on my machine (amd64). After fixing this,

the error described by the parent occurs.

Error 2) causes the "undefined symbol"-error from within python. Fixing it makes

Tix work from python without having to recompile python.
```

scheint zu reichen. Bei mir "müsste" bloss das zweite gemacht werden, das 1) ist schon korrekt...

--> in 

```
/usr/lib/tkConfig.sh
```

 die Variablen anpassen.

IMO 

```
TK_STUB_LIB_{IRGENDWAS}
```

 (ausprobieren ? )

Gruss, R.

Gruss, R.

----------

## flammenflitzer

```

 cat /usr/lib/tkConfig.sh | grep -v \#

TK_VERSION='8.4'

TK_MAJOR_VERSION='8'

TK_MINOR_VERSION='4'

TK_PATCH_LEVEL='.11'

TK_DEFS=' -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DPEEK_XCLOSEIM=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 '

TK_SHARED_BUILD=1

TK_DBGX=

TK_LIB_FILE='libtk8.4${TK_DBGX}.so'

TK_LIBS='-L/usr/lib64 -lX11 -ldl  -lieee -lm'

TK_PREFIX='/usr'

TK_EXEC_PREFIX='/usr'

TK_XINCLUDES=''

TK_XLIBSW='-L/usr/lib64 -lX11'

TK_LIB_FLAG='-ltk8.4'

TK_BUILD_LIB_SPEC='-L/usr/lib64 -ltk8.4'

TK_LIB_SPEC='-L/usr/lib64 -ltk8.4'

TK_SRC_DIR='/usr/lib64/tk8.4/include'

TK_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/lib64:/usr/lib64:/usr/lib64'

TK_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/lib64:/usr/lib64:/usr/lib64'

TK_STUB_LIB_FILE='libtkstub8.4.a'

TK_STUB_LIB_FLAG='-ltkstub8.4'

TK_BUILD_STUB_LIB_SPEC='-L/usr/lib64 -ltkstub8.4'

TK_STUB_LIB_SPEC='-L/usr/lib64 -ltkstub8.4'

TK_BUILD_STUB_LIB_PATH='/usr/lib64/libtkstub8.4.a'

TK_STUB_LIB_PATH='/usr/lib64/libtkstub8.4.a'

```

```

ls -la /usr/lib64/libtkstub8.4.a

-rw-r--r--  1 root root 5086  3. Jul 13:34 /usr/lib64/libtkstub8.4.a

```

???

----------

## flammenflitzer

Auch das Ändern von 

TK_SRC_DIR='/usr/lib64/tk8.4/include'

in

TK_SRC_DIR='/usr/lib/tk8.4/include'

hat nichts gebracht.

----------

## Raistlin

Hi,

ich meinte eigentlich, dass mit  *Quote:*   

> 2) The variables for the stub-libraries do not contain -lX11.

 

gemeint ist, z.B. die Variablen 

```
TK_STUB_LIB_FILE='libtkstub8.4.a'

TK_STUB_LIB_FLAG='-ltkstub8.4'

TK_BUILD_STUB_LIB_SPEC='-L/usr/lib64 -ltkstub8.4'

TK_STUB_LIB_SPEC='-L/usr/lib64 -ltkstub8.4'
```

um die Anweisung 

```
-lX11
```

 zu erweitern...

Also z.B. 

```
TK_STUB_LIB_FLAG='-ltkstub8.4 -lX11'
```

Gruss, R.

----------

## flammenflitzer

Hat nichts gebracht.

----------

