Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheels for musllinux_1_1_armv7l ? #278

Closed
devbis opened this issue Jul 7, 2022 · 8 comments
Closed

Wheels for musllinux_1_1_armv7l ? #278

devbis opened this issue Jul 7, 2022 · 8 comments

Comments

@devbis
Copy link

devbis commented Jul 7, 2022

Is it possible to build and publish wheels for musl armv7?
It is a quite popular architecture for OpenWrt builds and compiling it on tiny routers is almost impossible.

@ijl
Copy link
Owner

ijl commented Jul 7, 2022

Feel free.

@dynasticorpheus
Copy link

dynasticorpheus commented Jul 19, 2022

@devbis Perhaps these wheels are useful for you too? Had to create to support running Home Assistant on OpenWrt:

https://github.com/dynasticorpheus/orjson/actions

@devbis
Copy link
Author

devbis commented Jul 19, 2022

@dynasticorpheus That's awesome! I need it for the same reason while HA switched to orjson.
Some patching for backporting to builtin json helps, but it is bad for long-term solution.

@devbis
Copy link
Author

devbis commented Jul 22, 2022

@dynasticorpheus I have missing symbols after installing the wheel on openwrt. Do you have this issue?

# ldd orjson.cpython-39-arm-linux-gnueabihf.so
	ldd (0x76f21000)
	libgcc_s-0c8db386.so.1 => ./../orjson.libs/libgcc_s-0c8db386.so.1 (0x76e5b000)
	libc.so => ldd (0x76f21000)
Error relocating orjson.cpython-39-arm-linux-gnueabihf.so: PyTuple_New: symbol not found
Error relocating orjson.cpython-39-arm-linux-gnueabihf.so: PyModule_AddObject: symbol not found
Error relocating orjson.cpython-39-arm-linux-gnueabihf.so: _PyLong_AsByteArray: symbol not found
Error relocating orjson.cpython-39-arm-linux-gnueabihf.so: PyObject_VectorcallMethod: symbol not found
Error relocating orjson.cpython-39-arm-linux-gnueabihf.so: PyDict_New: symbol not found

@dynasticorpheus
Copy link

dynasticorpheus commented Jul 23, 2022

@devbis I was not aware but indeed have the same however the .so in below wheels also have symbols missing so wondering if this is really an issue as everything does seem to work on my install. Moreover openwrt is on musl 1.2 whereas we compile against musl 1.1. Unsure if this is a problem or not?

https://wheels.home-assistant.io/musllinux/

@devbis
Copy link
Author

devbis commented Jul 23, 2022

I see. My installation doesn't work with built wheels because *.so seems to be broken for the reason above:

# python3 -m orjson
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
  File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
  File "/usr/lib/python3.9/site-packages/orjson/__init__.py", line 1, in <module>
    from .orjson import *
ModuleNotFoundError: No module named 'orjson.orjson'

@dynasticorpheus
Copy link

dynasticorpheus commented Jul 25, 2022

@devbis Same for me when doing fresh install, when I rename the .so in /site-packages/orjson folder from orjson.cpython-39-arm-linux-gnueabihf.so to orjson.so or orjson.cpython-39.so it starts working.

I guess because of below output on openwrt device:

Python 3.9.10 (main, Mar 07 2022, 13:48:02)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _imp
>>> _imp.extension_suffixes()
['.cpython-39.so', '.abi3.so', '.so']

@ijl
Copy link
Owner

ijl commented Jul 29, 2022

Open a pull request if you want to fix it.

@ijl ijl closed this as completed Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants