-
Notifications
You must be signed in to change notification settings - Fork 644
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
Fails to build on Android, Pixel 3, Termux #1469
Comments
@filbranden I had the same issue...the |
@daviscyd No, not that I'm aware of... I simply used the I don't know if there was anything left on my environment, since I ended up downloading the tarball and doing some local pip operations... I don't think I did left anything, but maybe I did? I guess I could try that on a second phone to see if I can reproduce it... I happen to have one lying around that needs a factory reset, so excellent one to try and see what happens... In any case, I'm happy to try to help fix this however I can. I don't know that I understood exactly how the bundled helpers work... But if sending a |
@daviscyd I just tested it on a fresh phone and it worked... Phone was Pixel 2 and didn't have any of it installed. Started by installing Termux. Then inside it, I ran:
Then:
Which failed with the
Then I installed the library from the binary package:
And finally repeated:
Whch worked fine, with:
And finally:
|
@filbranden Thanks for testing this. I just uninstalled python and re-installed and I'm still getting the same error...with I'll uninstall Termux and re-try again, following the steps that you used. If possible, could you run |
@daviscyd Maybe try The one I have shows up as:
In any case, it would be nice to fix the bundled one to work on Android + Termux... |
@filbranden . I ran pkg upgrade, then pkg update before starting the build. I followed the steps you posted but the build still fails at the same error:
My guess is that, after you install Also, while I have the same version of |
@daviscyd Looking at Maybe try |
@filbranden |
@daviscyd Your package source ( If your If that's the case, it's possible that the |
@filbranden Good catch. The CPU architecture is ARM64 (armv8l) but So the question is: where's the logic that determines if bundled When you run UPDATE: Specifying |
I downloaded the
I'm not sure if the above is an issue with the compiler options, the build script or the installed |
I also have same issue when install pyzmq: | ^~~~~~~~~ In file included from /data/data/com.termux/files/usr/include/python3.9/Python.h:151, from zmq/devices/monitoredqueue.c:24: |
UPDATE: Downloading sources and building/installing libzmq on-device allowed |
I tried to manually build from source of libzmq on-device using termux-chroot but still didn't solve my problem. Can you shed a little bit more light on how installed it? |
I don't use termux-chroot and didn't use it during the build. I just downloaded the libzmq sources, ran |
Thank you for your reply. When I just configure and make install without termux-chroot, I got following errors: |
@sacrrie I was having this same problem and compiling with |
I am also getting strlcpy error, I have libzmq 4.3.4 installed , still I cannot install pyzmq. |
Architecture- arm32 |
Solved my problem. Thanks!
|
Thanks! , It worked! |
it worked, thank you for the contribution :) |
@filbranden thank you very much, I was in the same situation, and your post saved my day. |
Thanks for everyone's reporting here! It doesn't sound like there's anything to do on this repo, so I'm goign to close, but feel free to continue to post what worked for you here, and open a new issue if you think there's something reasonable that pyzmq can do to help. |
Hi!
I tried to install pyzmq (actually pulled as a dependency of jupyterlab) in my Android phone, a Pixel 3, running the Termux Linux environment/terminal emulator.
I tried to install it using:
The failures are to build the C/C++ code under the
bundled/
tree.First, this failed due to the
strlcpy()
symbol being redefined. Android ships a libc called "bionic" which actually derives from BSD libc, so it does include its ownstrlcpy()
.I downloaded it locally and tried to hack around that error, then I found the next around the
tipc
code (don't remember exactly if it was something liketipc_zone
or something like that.)I hacked through that one and the third problem was around
pthread_setaffinity_np()
.After these three, I got it to build, but then it didn't seem to work... Running
jupyter lab
would start spewing errors and they looked related to zmq.These are the characteristics of the system:
I noticed there are directories under
buildutils/include_*
(including one forlinux-armv
). If you'd like me to try to configure my system and send you an appropriateplatform.hpp
to bundle into pyzmq I'd be happy to help with that.I actually found a workaround... There's a package for
libzmq
in Termux, so I just installed that, with:After that,
pip install --user pyzmq
worked just fine (I'm assuming it detected the lib was already present) andjupyter lab
(which usespyzmq
) worked fine as well.So perhaps just stopping the install and issuing an instruction to install the binary library would be an appropriate course of action here? Not sure how this can be reliably detected... But breaking with a "Please install xyz" is definitely better than with a puzzling compilation error...
Cheers!
Filipe
The text was updated successfully, but these errors were encountered: