Some test fail on my new Python 2.6
R. David Murray
rdmurray at bitdance.com
Wed Apr 8 15:46:16 CEST 2009
Sorin Schwimmer <sxn02 at yahoo.com> wrote:
> I wanted to replace my old Python 2.4 and tcl/tk 8.4 with tcl/tk 8.5.6 and Python 2.6, mainly so that I can enjoy ttk. tcl/tk was installed from sources without any problem, I started a wish and worked.
> Now, for the Python, here are all the issues signaled by make test:
> running build
> running build_ext
> building 'dbm' extension
> gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_GDBM_NDBM_H -I. -I/install/Python-2.6.1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/install/Python-2.6.1/Include -I/install/Python-2.6.1 -c /install/Python-2.6.1/Modules/dbmmodule.c -o build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/dbmmodule.o
> gcc -pthread -shared build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/dbmmodule.o -L/usr/local/lib -lgdbm -o build/lib.linux-i686-2.6/dbm.so
> *** WARNING: renaming "dbm" since importing it failed: build/lib.linux-i686-2.6/dbm.so: undefined symbol: dbm_firstkey
Ok, so DBM wasn't built because it couldn't find the external symbol
'dbm_firstkey'. I have no idea off the top of my head why that would
happen, but I don't think you really care at the moment since you are
trying to get tkinter working. If you do care we can come back to that.
> building '_tkinter' extension
> gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -DWITH_BLT=1 -I/usr/X11R6/include -I. -I/install/Python-2.6.1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/install/Python-2.6.1/Include -I/install/Python-2.6.1 -c /install/Python-2.6.1/Modules/_tkinter.c -o build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/_tkinter.o
> gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -DWITH_BLT=1 -I/usr/X11R6/include -I. -I/install/Python-2.6.1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/install/Python-2.6.1/Include -I/install/Python-2.6.1 -c /install/Python-2.6.1/Modules/tkappinit.c -o build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/tkappinit.o
> gcc -pthread -shared build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/_tkinter.o build/temp.linux-i686-2.6/install/Python-2.6.1/Modules/tkappinit.o -L/usr/X11R6/lib64 -L/usr/X11R6/lib -L/usr/local/lib -lBLT -ltk8.5 -ltcl8.5 -lX11 -o build/lib.linux-i686-2.6/_tkinter.so
> *** WARNING: renaming "_tkinter" since importing it failed: libtk8.5.so: cannot open shared object file: No such file or directory
Now, this one is clear. It couldn't find libtk8.5.so when it tried to
use _tkinter.so. So either that symlink doesn't exist, or points to a
nonexistent library, or there's something wrong with your load library
path, so that python isn't finding it when it tries to do the load.
If you don't know what that last one means, check out 'man ldconfig'.
> Failed to find the necessary bits to build these modules:
> _sqlite3 bsddb185 sunaudiodev
Here you presumably don't have these libraries installed,
so no real problem.
> To find the necessary bits, look in setup.py in detect_modules() for the module's name.
> Failed to build these modules:
> _tkinter dbm
These we covered above.
Most of the stuff you show from the test run is expected output
for one reason or another. The ones that aren't...
> test_multiprocessing skipped -- OSError raises on RLock creation, see issue 3111!
According to the referenced bug, this may be a result of your not having
/dev/shm mounted, but in any case it is more a bug in the tests than a
bug in your system or setup.
> test test_socket failed -- Traceback (most recent call last):
> File "/install/Python-2.6.1/Lib/test/test_socket.py", line 474, in testSockName
> my_ip_addr = socket.gethostbyname(socket.gethostname())
> gaierror: [Errno -2] Name or service not known
This probably means that you haven't properly defined 'localhost'
in your /etc/hosts file.
> test test_sys failed -- Traceback (most recent call last):
> File "/install/Python-2.6.1/Lib/test/test_sys.py", line 354, in test_43581
> self.assert_(sys.__stdout__.encoding == sys.__stderr__.encoding)
This one is puzzling. Did you modify 'site.py'? Or perhaps you
redirected stdout and stderr to different places and they
wound up with different encodings for some reason. In which
case that one would be a bug in the tests as well.
> test_tcl skipped -- No module named _tkinter
This is a result of the build failure.
> 320 tests OK.
> 3 tests failed:
> test_httpservers test_socket test_sys
So we understand test_socket and maybe test_sys. You'll have to show
me the output of test_httpsservers run in verbose mode again to see
if I can make sense of that one, if you care.
> 38 tests skipped:
> test_aepack test_al test_applesingle test_bsddb185 test_bsddb3
> test_cd test_cl test_codecmaps_cn test_codecmaps_hk
> test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
> test_dbm test_gl test_imgfile test_kqueue test_linuxaudiodev
> test_macos test_macostools test_multiprocessing test_normalization
> test_ossaudiodev test_pep277 test_py3kwarn test_scriptpackages
> test_socketserver test_sqlite test_startfile test_sunaudiodev
> test_tcl test_timeout test_unicode_file test_urllib2net
> test_urllibnet test_winreg test_winsound test_zipfile64
These as it implies are all normal.
> 3 skips unexpected on linux2:
> test_tcl test_dbm test_multiprocessing
And these we've covered.
So your biggest barrier to getting your python working for your
purposes is getting python to find the libtk8.5.so. Everything
else you can ignore, unless you want to try to track them down.
R. David Murray http://www.bitdance.com
More information about the Python-list