1

I am cross compiling for an embedded device using yocto - so using pip install is not appropriate.

My build works, but keeps defaulting to ucs2 character type, which causes an error: numpy.core.multiarray failed to import.

DAmann
  • 174
  • 7

1 Answers1

1

Caveat, I haven't really tried this...

As far as I can see, building numpy with ucs4 support means that you have to compile python with ucs4-support. Thus, you would need to add

 EXTRA_OECONF += "--enable-unicode=ucs4"

in a python_xxx.bbappend, depending on which python (2 or 3) and which OE-release you're using.

If you're getting any other issues after this, is unknown...

Anders
  • 8,541
  • 1
  • 27
  • 34
  • I have compiled python that way - both as the python that will be deployed on the target, and as the python-native that runs on the compilation machine. Sadly, the resulting numpy build has an unresolved dependency for UnicodeUCS2 when run on the target platform. The python build works as intended ucs4 works). – DAmann Oct 27 '16 at 16:59
  • And numpy, and all other python modules, was rebuilt after the python change? (Just to be sure, as that should be done automatically for you). – Anders Oct 27 '16 at 17:02
  • Yes, and I did a clean and build (took several hours) just to be sure. That said, I had to fix two bugs in the numpy build system just to have it build at all. – DAmann Oct 28 '16 at 15:58
  • I have checked the python-native executable, and it does use ucs4. – DAmann Oct 31 '16 at 14:27