2

I compiled Python 3.4.1 on an emulated Debian 7 ARM system. make test failed on test_multiprocessing_fork:

FAIL: test_semaphore_tracker (test.test_multiprocessing_fork.TestSemaphoreTracker)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/sources/python3-3.4.1/Lib/test/_test_multiprocessing.py", line 3667, in test_semaphore_tracker
    _multiprocessing.sem_unlink(name2)
AssertionError: OSError not raised

Another test, test_io, simply freezes the make test.

What could be the problem? My only guess is I missed some prerequisite. According to ./configure, I do not have these header files in my system:

minix/config.h
conio.h
direct.h
ieeefp.h
io.h
process.h
sys/devpoll.h
sys/audioio.h
sys/bsdtty.h
sys/event.h
sys/kern_control.h
sys/loadavg.h
sys/lock.h
sys/mkdev.h
sys/modem.h
sys/sys_domain.h
sys/termio.h
libutil.h
bluetooth.h
bluetooth/bluetooth.h
util.h
sys/endian.h
time.h that defines altzone
  • Not running the tests is also an option. Sometimes a test fails for some trivial reason. I find that in that case usually the best option is to not run them. Also, use a binary package if available, if not, consider building Debian sources into a binary package. They are more likely to integrate smootly into your system. – Faheem Mitha Jul 27 '14 at 20:33
  • @Faheem Mitha: Well, I want to compile it because I would use Python on an e-book reader, and it's a bit complicated to get all the needed packages. Furthermore I tried it once with sqlite and it not worked, I had to compile it. – Marco Sulla Jul 27 '14 at 22:43
  • Just to be clear, building Debian sources into binary packages involves compilation (where necessary), except that all the details are taken care of for you. Sometimes you have to make minor adjustments. Very occasionally, you have to make major adjustments. See for example http://unix.stackexchange.com/q/112157/4671 – Faheem Mitha Jul 27 '14 at 23:20
  • @LucasMalor Which e-book reader are you targetting? – Anthon Jul 28 '14 at 07:00
  • @FaheemMitha: the problem is I have to use the package on another device, so it's more simple to compile with --prefix=/opt/fubar/ and copy the fubar dir on the other device. – Marco Sulla Jul 28 '14 at 12:00
  • @Anthon: Kobo Glo, an ARM device with a Cortex i.MX50 Freescale CPU. – Marco Sulla Jul 28 '14 at 12:01

1 Answers1

1

The core language system for Python requires certain development packages to be installed. Some modules that are part of the "batteries included" module system of Python require additional packages, but if you don't have those packages installed, these modules will not compile without affecting the core language (and if you are lucky fall back to a pure Python implementation). Unfortunately the tests for these modules do not always check for module availability and gracefully ignore test that cannot be run.

You should really look first at what you need on the target ebook system, before trying to compile and test the additional modules. I doubt if you need things like bluetooth or multiprocessing on the target system, so why spent time to get them to run on the cross development system and then not use them?

Anthon
  • 79,293
  • 1
    Do you mean multiprocessing could be not supported by the target arch? It seems weird to me :) – Marco Sulla Jul 28 '14 at 12:05
  • @LucasMalor No, multiprocessing could be supported by the arch. Just not by the CPython core, and for any multiprocessing supporting Python modules you would need to link against additional libraries. – Anthon Jul 28 '14 at 12:18