Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: jls on March 26, 2009, 03:08:42 AM

Title: python.tczl
Post by: jls on March 26, 2009, 03:08:42 AM
I've packaged an extension calledd nicotine that has no problems with python.tcel, but doesn't work with python.tczl
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 03:34:40 AM
I'll look into it tonight.
Title: Re: python.tczl
Post by: blinkkin on March 26, 2009, 09:20:32 AM
I've packaged an extension calledd nicotine that has no problems with python.tcel, but doesn't work with python.tczl

I compiled Mercurial using python.tcel. Problems occured when I switched back to python.tczl - no luck with that. There is something wrong with that extension.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 09:29:03 AM
Some tcz's work just fine as a direct conversion from a tce.  This one is one of the exceptions evidently.  Sometimes some of the files in an extension must be "real" files and not symlinks, often due to the difference in the present working directory.  Like for example /usr/local/bin/script which is a symlink to /tmp/tcloop/appname/usr/local/bin/script.  If that script uses `pwd`, then it may get it's wires crossed.  That 's when a user.tar.gz is needed containing real files.

There are other reasons too that may cause a tcz to fail.  I will examine this one and perhaps include the files that must exist as real ones in a user.tar.gz if that is what is causing the problem.

Thanks for finding this issue, hopefully will solve it tonight.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 11:14:52 AM
One quick question, did you guys have python-devs.tcz or python-minimal.tcz at the time you installed python.tczl?  Or just python.tczl alone? 
Title: Re: python.tczl
Post by: blinkkin on March 26, 2009, 12:55:35 PM
One quick question, did you guys have python-devs.tcz or python-minimal.tcz at the time you installed python.tczl?  Or just python.tczl alone? 

Probably python.tczl + python-devs.tcz, but I'm not sure. I'll check it at home - maybe tonight.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 01:17:40 PM
Try and see only having python.tczl works without the -devs extension installed.  I will try it tonight as well.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 05:52:16 PM
We have a couple of issues here that is very well affecting nicotine running. 

First, I see that nicotine and pygtk and it's deps were built against the testing versions of cairo, atk, gtk and pango.  That will break the system if it is running the standard gtk+-2.tcel already.  That is my fault, I should have not put them up until I tested them myself and replaced the existing gtk+-2 extension.  The newer gtk stack requires an updated pixman which will happen in the near future as it is also waiting on some other changes.  Sorry for the confusion. 

Second, if you invoke the tcz version of python from the command line and give these two commands you will see that the python search paths are wrong when it is searching for modules.  Since the python binary itself resides in /tmp/tcloop/usr/local/bin it's search path is /tmp/tcloop/usr/local/lib/python2.5/site-packages, as well as other directories starting in /tmp/tcloop/usr/local instead of /usr/local.  I think there is a fix for that, I have been looking at how Gobolinux does it as well as there may be a compile time option to change that.  So python.tczl is broken indeed.  I will work on a fix.  Simply moving the python binary itself into /usr/local/bin and leaving the rest as symlinks works, but maybe there is a way for it all to exist as a tcz.

For now, let's only build against the current gtk+-2 extension and not the testing ones.  I will try to find a resolution to that soon.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 08:04:33 PM
A simple change to site.py has enable a python.tczl without placing files in a user.tar.gz.  Modules must be placed in /usr/local/lib/python2.5/site-packages which is the default install location.  Nicotine works now with python.tczl.

Title: Re: python.tczl
Post by: Juanito on March 26, 2009, 09:21:43 PM
I'd been wondering why the hp-* commands in hplip wouldn't work when all the extensions were tcz...

I uninstalled the original python.tczl extension and installed the new one, but the error persists - basically that the hp-* commands cannot load /usr/local/lib/python2.5/site-packages/cup.t.so

I uninstalled the new python.tczl and installed python.tcel and things work again - all the other extensions remaining as tcz.

Perhaps the error is due in part to python_dbus.tczl or something like that - I'll continue to look.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 09:36:41 PM
What I basically did is add /usr/local/lib/python2.5/site-packages to the module path, as without that the python paths are preceded by /tmp/tcloop which is where the actual python binary is located.  I was hoping that adding /usr/local/lib/python2.5/site-packages would fix that.  Hopefully we can work it out.
Title: Re: python.tczl
Post by: Jason W on March 26, 2009, 09:51:13 PM
The hp-* commands work here with everything as tcz, no errors finding modules or libs. 

hp-align, hp-check, hp-clean, hp-colorcal,  hp-devicesetup worked, and I stopped after that.

Oh, and also remember the bug that is being discussed in the dev area that would prevent python and python-dbus from both being loaded successfully.
Title: Re: python.tczl
Post by: Jason W on March 29, 2009, 08:42:07 AM
Python in the tcz format is still not working due to incorrect python paths.  I will work on it and hopefully fix it shortly.
Title: Re: python.tczl
Post by: Jason W on March 29, 2009, 09:52:56 AM
Moving the binaries in /usr/local/bin into a user.tar.gz worked.  That set the correct paths.  It is fixed and I will also fix python-minimal.tczl.
Title: Re: python.tczl
Post by: Juanito on March 29, 2009, 08:30:47 PM
Did you post the latest python.tczl with the binaries in user.tar.gz?
Title: Re: python.tczl
Post by: Jason W on March 30, 2009, 03:50:08 PM
Yes, for both python and python-minimal.  Paths now are identical as in tce format.
Title: Re: python.tczl
Post by: Juanito on April 01, 2009, 07:51:30 AM
..but the python.tczl version I just downloaded does not have a user.tar.gz?
Title: Re: python.tczl
Post by: Jason W on April 01, 2009, 01:00:46 PM
I downloaded now and installed the python.tczl I uploaded a couple of days ago and it has the user.tar.gz:


Code: [Select]
tc@box:~$ ls /tmp/tcloop/python/
user.tar.gz  usr/
tc@box:~$

Code: [Select]
tc@box:~$ python
Python 2.5.2 (r252:60911, Dec  8 2008, 06:26:24)
[GCC 4.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local
/lib/python2.5/plat-linux2', '/usr/local/lib/python2.5/lib-tk', '/usr/local
/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages']
>>>

It seems ok here.  Are you using the ibiblio mirror?  If not maybe the others have not synced yet.
Title: Re: python.tczl
Post by: Juanito on April 01, 2009, 10:40:14 PM
Finally got it - I must have downloaded the file 6 or 7 times over the last 3-4 days before getting the user.tar.gz version this morning.

..and now the hplip hp-* work  :)
Title: Re: python.tczl
Post by: jpeters on April 01, 2009, 11:12:32 PM
You have to reboot before it shows up.  Is there a way to unpack a tcz? 
Title: Re: python.tczl
Post by: Juanito on April 01, 2009, 11:21:25 PM
Code: [Select]
$ mkdir /tmp/test
$ sudo mount /tmp/python.tczl /test/test -o loop
Title: Re: python.tczl
Post by: jpeters on April 01, 2009, 11:36:45 PM
thanks
Title: Re: python.tczl
Post by: jpeters on April 02, 2009, 12:01:28 AM
Is that an open directory? /usr/local/bin
Are all the test files necessary?   (673 tests, 9.5M)
Title: Re: python.tczl
Post by: Jason W on April 02, 2009, 02:58:05 AM
At the time I made the python extension last July, being unfamiliar with python, I had erred on the side of leaving in rather than taking out.  I can move the test files to the -dev extension as I don't delete any part of a package except for man pages and docs so the package is fully available.  I will do that when I get time, maybe in a week or so.
Title: Re: python.tczl
Post by: jpeters on April 02, 2009, 03:44:38 AM
I'm guessing they're from 'make test'  Did you test before 'make install' ?
Title: Re: python.tczl
Post by: Jason W on April 02, 2009, 04:01:34 AM
Here is the build script that was used:

http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/tce/src/python-2.5.2/python-2.5.2.tcbuild

Python is due an update, more pruning and seperation can occur when it is updated. 
Title: Re: python.tczl
Post by: jpeters on April 02, 2009, 01:45:24 PM
I ran the tests after doing a new build.  Looks good.  I think they can be deleted.  I thought they might get
deleted after running the tests, but guess not.    

281 tests OK.
41 tests skipped:
    test_aepack test_al test_applesingle test_bsddb test_bsddb185
    test_bsddb3 test_bz2 test_cd test_cl test_codecmaps_cn
    test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr
    test_codecmaps_tw test_curses test_dbm test_gdbm test_gl
    test_imgfile test_linuxaudiodev test_locale test_macfs
    test_macostools test_nis test_normalization test_ossaudiodev
    test_pep277 test_plistlib test_scriptpackages test_socket_ssl
    test_socketserver test_sqlite test_startfile test_sunaudiodev
    test_timeout test_unicode_file test_urllib2net test_urllibnet
    test_winreg test_winsound test_zipfile64                     
5 skips unexpected on linux2:               
    test_dbm test_bz2 test_gdbm test_locale test_bsddb
Title: Re: python.tczl
Post by: Jason W on April 02, 2009, 02:01:41 PM
What version are you building?  If it is an updated version I would appreciate if you would submit it.  Trimming the current version would be ok too, but it would be nice to have an update, which I was planning here soon but time is tight.  If the resulting python.tcel is around 2MB we can basically do away with the minimal version as 2mb is very close in size to the minimal.  If we stay with the 2.x series it should be compatible with our current python dependent extensions, but we can test and see to make sure.
Title: Re: python.tczl
Post by: jpeters on April 02, 2009, 03:01:58 PM
I built the same version. The only difference was that  I ran make tests (it didn't seem to need the pkconf flags).  If anything, it created more test files, like 1625 files related to some kind of test.  (I did a quick grep..maybe I have some multiple counts...).

Using tcz-uninstall didn't stop the 'man' conflict either, even after rebooting xdesktop.  For now, I'll load python only  when I need it. 
Title: Re: python.tczl
Post by: jpeters on October 04, 2009, 10:21:58 PM
Updated python working well with tinycore_2.4rc4


[removed due to policy]apps/python-update.png