1

I am unable to get the gmpy2 Python module working in a Buildroot build for Raspberry Pi2. Buildroot does not include the gmpy2 module by default.

Buildroot does not include the GCC as well, so I compiled the gmpy2 module from source on Raspbian on another RPI2 board (having the same Python version -- 3.7.2 -- as the Buildroot board) and copied the resulting gmpy2.cpython-37m-arm-linux-gnueabihf.so to Buildroot board's /usr/lib/python3.7/site-packages/ and put a link gmpy2.so in the same directory.

I expected Python to be able to see the module, but instead I get:

# python3
Python 3.7.2 (default, Apr 10 2019, 23:36:01)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: File not found
>>>

Any help is much appreciated!

4

1 回答 1

1

要为 gmpy2 创建一个实际的 Buildroot 包,运行utils/scanpypi gmpy2. 确保它package/python-gmpy2/Config.in来自package/Config.in,然后您可以从 menuconfig 以正常方式选择它。

如果一切正常,请将补丁发送到 Buildroot 邮件列表以供上游包含。感谢您的贡献!

于 2019-04-27T11:51:30.957 回答