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.
run revdep-rebuild seems you upgraded tcl/tk without running it
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.
thanks for your report. i've added the mentioned patch to the Makefile to tix and it now imports fine under Python.
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?
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.
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.
alright, fixed for the second time, hopefully this time it really is fixed, because i can't reproduce the unresolved symbols problem.
This bug is still present, can someone reopen it? There's a typo in one of the two sed expressions.
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.