Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29371 - tix window creation fails with unresolved symbol
Summary: tix window creation fails with unresolved symbol
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-22 14:01 UTC by Paul Pacheco
Modified: 2005-04-21 09:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes typo in sed expression (sed_shlib_typo.patch,364 bytes, patch)
2005-04-21 09:13 UTC, Peter Stuge
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pacheco 2003-09-22 14:01:44 UTC
I am trying to use tix from python, and as soon as I try to create a window, it fails and it 
complains about unresolved symbols. 
 

Reproducible: Always
Steps to Reproduce:
$ emerge tix 
$ python 
>>> import Tix; 
x = Tix.Tk(); 
 
Actual Results:  
I get the following output: 
 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
  File "/usr/lib/python2.2/lib-tk/Tix.py", line 213, in __init__ 
    self.tk.eval('package require Tix') 
TclError: couldn't load file "/usr/lib/libtix8.2.so": /usr/lib/libtix8.2.so: undefined symbol: 
XLowerWindow 
>>> 
 
and the window that I created pops up. 

Expected Results:  
There should not be any exception. 

Some googling shows this problem is rather common. It seems it happens because tix is not 
linked with -lX11 for some reason. I will try to figure out why and try to post a patch.
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-09-22 14:45:42 UTC
run revdep-rebuild
seems you upgraded tcl/tk without running it
Comment 2 Paul Pacheco 2003-09-22 15:06:57 UTC
I ran revdep-rebuild 
this is the output: 
 
Checking reverse dependencies... 
Packages containing binaries and libraries broken by any package update, 
will be recompiled. 
 
Collecting system binaries and libraries... done. 
  (/root/.revdep-rebuild.1_files) 
 
Collecting complete LD_LIBRARY_PATH... done. 
  (/root/.revdep-rebuild.2_ldpath) 
 
Checking dynamic linking consistency... 
 done. 
  (/root/.revdep-rebuild.3_rebuild) 
 
Assigning files to ebuilds... Nothing to rebuild 
 
Evaluating package order... done. 
  (/root/.revdep-rebuild.5_order) 
 
Dynamic linking on your system is consistent... All done. 
 
 
I tried again: 
 
python 
>>> import Tix; 
>>> x = Tix.Tk(); 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
  File "/usr/lib/python2.2/lib-tk/Tix.py", line 213, in __init__ 
    self.tk.eval('package require Tix') 
TclError: couldn't load file "/usr/lib/libtix8.2.so": /usr/lib/libtix8.2.so: undefined symbol: 
XLowerWindow 
 
so I got the same result. 
 
 
I got it working with the following hack: 
ebuild tix-8.2.0.ebuild compile 
when it finished, I modified /var/tmp/portage/tix-8.2.0/work/tix8.2.0/unix/Makefile 
and did the following change: 
 
-TK_LIBS = -ldl  -lpthread -lieee -lm 
+TK_LIBS = -L/usr/X11R6/lib -lX11 -ldl  -lpthread -lieee -lm 
 
removed libtix8.2.so 
then ran make 
 
and then  
ebuild tix-8.2.0.ebuild merge 
 
my address is paulpach@hotmail.com if you want to talk to me through msn messenger 
and paulpach@yahoo.com if you want to reach me through yahoo messenger. 
 
I would be more than happy to work with you to fix this problem. 
 
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2003-10-18 06:23:27 UTC
thanks for your report. i've added the mentioned patch to the Makefile to
tix and it now imports fine under Python.
Comment 4 Ivan Raikov 2003-12-15 09:10:01 UTC
I get the exact same problem even with the "fixed" makefile. Are you sure that makefile doesn't get overwritten at some point after it's updated?
Comment 5 Paul Pacheco 2003-12-15 09:49:44 UTC
yes, the patch is just a hack. it does not fix the problem because the makefile gets regenerated everytime, so this problem is still not fixed.
Comment 6 Ivan Raikov 2003-12-15 10:14:04 UTC
Ok, so here is what I found: the makefile is not overwritten, but rather the variable called TK_LIBS is not used anywhere; in order to get the library to work, I changed the variable SHLIB_LD_LIBS as follows: 

- SHLIB_LD_LIBS = -L/usr/lib -ltkstub8.3 -L/usr/lib -ltclstub8.3${TCL_DBGX}
+ SHLIB_LD_LIBS = -L/usr/lib -ltkstub8.3 -L/usr/lib -ltclstub8.3${TCL_DBGX} ${TK_LIBS}

In order to fix this properly, it may be necessary to modify either Makefile.in or the configure script; I'm not sure which.
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2004-01-24 14:58:38 UTC
alright, fixed for the second time, hopefully this time it really is  fixed, because i can't reproduce the unresolved symbols problem.
Comment 8 Peter Stuge 2005-04-21 09:10:27 UTC
This bug is still present, can someone reopen it?

There's a typo in one of the two sed expressions.
Comment 9 Peter Stuge 2005-04-21 09:13:35 UTC
Created attachment 56848 [details, diff]
Fixes typo in sed expression

The sed expression looked for and modified the SHLIBS_LD_LIBS line in the
Makefile, but there is no such line. It's called SHLIB_LD_LIBS.
Also made the expression less ambiguous, it matched SHLIBS_LD_LIBS.* earlier
but only SHLIB_LD_LIBS =.* now.