Closed nitantsoni closed 9 months ago
From the error message above kinda suggests it's not a compilation issue, I think:
file system sandbox blocked mmap()
Right, this is not a greenlet issue per se, it's an issue loading native libraries. There's nothing greenlet can do about that.
I donot think this is related to the mmap(). That error seems to be unrelated to the Greenlet error.
Checking some old issues & their error logs - here & here - it looks like Python is having trouble inspecting the architecture of the .so
file, while generating the error message.
The message should have been something like
ImportError: dlopen(/Users/Roy/.local/share/virtualenvs/g10oal-JoGbQ0lv/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/Roy/.local/share/virtualenvs/g10oal-JoGbQ0lv/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/Roy/.local/share/virtualenvs/g10oal-JoGbQ0lv/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so: mach-o, but wrong architecture
but instead I get the mmap()
error, where it should be telling me what the architecture of the .so
is
ImportError: dlopen(/var/mobile/GitHub/DarwinPrint/Instance/environments/klipper/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so, 2): no suitable image found. Did find:
/var/mobile/GitHub/DarwinPrint/Instance/environments/klipper/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so: file system sandbox blocked mmap() of '/var/mobile/GitHub/DarwinPrint/Instance/environments/klipper/lib/python3.9/site-packages/greenlet/_greenlet.cpython-39-darwin.so'
I also had to compile Cpython, cffi & some other python modules and they all seem to be working fine. They were all compiled with the same toolchain & on the same iPad, so I assume that should be OK.
If I try to inspect the _greenlet.cpython-39-darwin.so
file it also appears to be fine, and the functions, headers all appear to be in the correct format
Anyway thanks for looking at this. Think I'll just install Klipper on an old rPi or an old x86 machine.
Got it working! Had to mess around with GCC flags. Specifically sysroot & library paths
I am trying to install Klipper on my iPad, using this repo - https://github.com/gio3k/DarwinPrint
When trying to launch Klippy, I get this error message
I tried out different versions of Greenlet v1.1.2, v2.0.1, v3.0.0, but all give me the same error. Even if I compile the package from source, by using the
--no-binary
flag, the error remains the same.Compiled using these ENV vars
CPPFLAGS=-target arm64-apple-ios14.0 -isysroot /usr/share/SDKs/iPhoneOS.sdk
The
.so
file is also the correct architecture. Usinglipo
this is the outputI am not sure what else to try