On Mar 10, 2011, at 1:14 PM, ext Han Hartgers wrote:

Dear all,

I try to "compile" some python files for the ARM platform. (Actually kaa of the freevo media player (http://freevo.sourceforge.net/)

I doubt actually if pure python needs this, but my source has also a couple of C files which do need to be compiled for the target. Normally would the python-distutils take care of this but under scratchbox2 is this for me not directly working.

if I do "sb2 -m devel python setup.py build" I get the following errors: hansan@mediachan:~/freevo_src/kaa/base$ sb2 -m devel python setup.py build
sh: /dev/null: Read-only file system
---------------------------------------------------------------------
Python headers not found; please install python development package.
kaa.db, shm and inotify support will be unavailable
---------------------------------------------------------------------
Traceback (most recent call last):
  File "setup.py", line 158, in <module>
    namespace_packages = ['kaa']
File "/home/hansan/freevo_src/kaa/base/src/distribution/core.py", line 595, in setup
    f = open('src/version.py', 'w')
IOError: [Errno 30] Read-only file system: 'src/version.py'


From this I guess the following:
1) my development directory is from within scratchbox mapped as read- only...
2) also /dev/null of the host is mapped read-only

Yes, it seems that both of those are mapped as read-only, even if they should not. Especially /dev/null should never be mapped as r/o. Odd.

SB2 prevents writing to some destinations, even if they are writable normally, because things like the target FS and tools should be protected when building SW in the devel&accel modes. And it does that by returning EROFS (read-only file system, which is what you experienced). This is completely controlled by the mapping rules, so it seems that the rules are not working as expected.

3) I do have my python headers installed on my target but I am for some reason not mapping this.

You can check the effect of path mappings by e.g. "sb2 -m devel sb2- show path /usr/include/foobar.h".


What is the normal way to work with python from within scratchbox?

It should work just that way what you tried to do... I think that there must be something wrong with the target setup.

I try this on a debian Wheezy distribution and I use scratchbox 2.2.1 and my root file system and development tools are of angstrom distribution (openembedded related distribution)

Please check that the tools are mapped properly; for example, does "sb2 -m devel sb2-show path /bin/sh" map to your tools collection, and not to host's /bin/sh?

Also, checking how the target was configured could reveal something: Please run "sb2-init" without parameters and send those lines that refer to your target.

        Lauri

_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to