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
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:

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 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 7: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

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?

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.