Closed SugarRayLua closed 3 years ago
Hey. It looks as if glibc is not fully compatible with musl-based software. Which is strange since I haven’t experienced any of these problems yet (unless there’s some version incompatibility, the glibc image was built for Alpine 3.12 – please check you apk repos version to be sure). But I do run apk install
in Docker and then export the filesystem(s) into iSH. Please try to do the same and write here if the problem persists.
PS Have you exported the image using tar
instead of docker export
as described here and imported as as an iSH filesystem?
To install software in Docker, you’ll need to run this code first:
apk_version____="3.12"
echo "http://dl-cdn.alpinelinux.org/alpine/${apk_version____}/main/" | tee /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/${apk_version____}/community/" | tee -a /etc/apk/repositories
PS I recently tried edge instead of 3.12, it worked as well.
Thanks, econz.
I am running Alpine 3.12. I'll try though by this weekend to do the suggestions you mentioned in your reply and let you know.
Have a good week.
Sincerely,
Mike
PS, econz, I actually had followed the instructions you linked me to (i.e. exporting tar) and then imported that tar as a file system and booted from that and got those 127 errors I mentioned. Do you think I should try using docker export instead? Any other simplified steps for the process I should try?
Thanks,
Mike
PPS, econz, I just reread again your replies and initial post and think I might have misunderstood what you docker image can do. I thought that I could convert your glibc docker image into a compressed tar file then import that tar file as a complete file system into iSH and then while in iSH, build up the iSH filesystem with additional packages (while reaping the benefits of having a full glbic library in iSH). After re-reading your replies and initial post, it seems that maybe I can't build up the iSH filesystem from within iSH: if I want to add additional packages to your glbic based docker image filesystem I need to install the additional packages in the docker image before exporting them as a filesystem? If so, that would not seem as useful to my needs, as I suspect I will want to install future packages in iSH, and if I wanted to do so I'd then need to go through the whole process again of starting off with your glibc docker image, adding all the packages I want and re-export the image as a new filesystem to ish?
Please let me know at your convenience if I'm understanding things better now.
Thanks,
Mike
Dear SugarRayLua, No-no, it’s just me who installs everything via Docker (I use iSH for specific purposes only). I tried installing software into my glibc image on iPad and there were no errors. Please consult the print screen below.
Maybe the error is software-specific?
Ok, thank you very much, econcz!
I’ll go by your print out as a template and try it out this weekend.
Have a good rest of your week :-)
Hi, econcz.
I think it worked this time. I realized that I don’t think I “apk upgraded” when I ran it the first time. I have two iPads: I usually test things out with my old iPad Pro (original 9.7 inch) before installing on my new iPad Pro (current generation). Both are running updated iOS. I deleted your file system on the old iPad Pro and re-ran the instructions you included above but that did not seem to help (still the 127 error). However, I then installed your glibc with filesystem on my new iPad Pro and it seemed to work (although still encountered the 127 error once but then seemed to correct itself and installed all the packages). Here is the readout from my new iPad Pro’s screen while trying to mimic what you did fresh after installing your glibc & new filesystem:
iPad-2:~# apk update && apk upgrade fetch http://apk.ish.app/v3.12-2021-06-25/main/x86/APKINDEX.tar.gz fetch http://apk.ish.app/v3.12-2021-06-24/community/x86/APKINDEX.tar.gz v3.12.7-87-g91c62532ae [http://apk.ish.app/v3.12-2021-06-25/main] v3.12.7-86-g64a4068d1d [http://apk.ish.app/v3.12-2021-06-24/community] OK: 12551 distinct packages available Upgrading critical system libraries and apk-tools: (1/1) Upgrading apk-tools (2.10.5-r1 -> 2.10.6-r0) Executing busybox-1.31.1-r16.trigger ERROR: busybox-1.31.1-r16.trigger: script exited with error 127 Continuing the upgrade transaction with new apk-tools: (1/10) Upgrading musl (1.1.24-r8 -> 1.1.24-r10) (2/10) Upgrading busybox (1.31.1-r16 -> 1.31.1-r20) Executing busybox-1.31.1-r20.post-upgrade (3/10) Upgrading alpine-baselayout (3.2.0-r6 -> 3.2.0-r7) Executing alpine-baselayout-3.2.0-r7.pre-upgrade mkdir: can't create directory '/': File exists Executing alpine-baselayout-3.2.0-r7.post-upgrade (4/10) Upgrading libcrypto1.1 (1.1.1g-r0 -> 1.1.1k-r0) (5/10) Upgrading libssl1.1 (1.1.1g-r0 -> 1.1.1k-r0) (6/10) Upgrading ca-certificates-bundle (20191127-r2 -> 20191127-r4) (7/10) Upgrading ssl_client (1.31.1-r16 -> 1.31.1-r20) (8/10) Upgrading libjpeg-turbo (2.0.5-r0 -> 2.1.0-r0) (9/10) Upgrading musl-utils (1.1.24-r8 -> 1.1.24-r10) (10/10) Upgrading tzdata (2020c-r1 -> 2021a-r0) Executing busybox-1.31.1-r20.trigger OK: 17 MiB in 29 packages iPad-2:~# apk add nginx (1/2) Installing pcre (8.44-r0) (2/2) Installing nginx (1.18.0-r3) Executing nginx-1.18.0-r3.pre-install Executing busybox-1.31.1-r20.trigger OK: 19 MiB in 31 packages iPad-2:~# apk add nodejs (1/4) Installing ca-certificates (20191127-r4) (2/4) Installing c-ares (1.16.1-r0) (3/4) Installing nghttp2-libs (1.41.0-r0) (4/4) Installing nodejs (12.22.1-r0) Executing busybox-1.31.1-r20.trigger Executing ca-certificates-20191127-r4.trigger OK: 51 MiB in 35 packages iPad-2:~# apk add npm (1/1) Installing npm (12.22.1-r0) Executing busybox-1.31.1-r20.trigger OK: 78 MiB in 36 packages
I’ll thus go ahead and try and install the additional packages I wish to run and see if I can do so or get the 127 error again and let you know.
Have a good night and upcoming weekend.
Sincerely,
Mike
Hi Mike, I looked up the 127 error in Alpine BusyBox: it turns out to be pretty frequent and seems to be connected to package incompatibility or bad permissions. Hence, after you upgraded the system, it disappeared. Have a look at: https://gitlab.alpinelinux.org/alpine/aports/-/issues/11942 https://elou.world/en/kubernetes/crio-alpine-error-127 Good news is that it seems to be fixable. Eli.
PS What are you using iSH App for if it’s not a secret? I created the glibc image to run econometric software on my iPad Pro but sadly it proved to be insufficient (the iSH i686 Emulator still lacks some functionality: what works in Docker doesn’t in the App). This is sad since iSH is faster than UTM (which became unusable since iPadOS 14.4).
Hi, Econz.
Happy to answer your question. I primarily wanted a portable way to learn and use R for some clinical medical data research that I do (I am a teaching physician/part-time researcher). I also travel a lot, so iPad is more convenient and reliable than taken a (or multiple) laptops everywhere. Only other way to use R locally on iPad was from one developer’s app that worked okay but whose instructions were poorly documented and wasn’t set up to allow additional packages. I’m also a distant amateur programmer, being the son of an electronics engineer and having grown up in the Silicon Valley. Unfortunately, there was a long hiatus in my amateur programming from the days of using BASIC on a Radio Shack TRS-80 model one. Fast-forwarding to the present, I like the utility and mobility of the iPad and had wished I could program my iPad for simple things but didn’t have the bandwidth in middle age to learn and master C (or even Swift). After learning some python (and trying out a little Swift), I stumbled on Lua which I really liked for its simplicity (and ease of remembering its instructions and lack of having to remember to put symbols in the right place). Although there are some Lua for the iPad, they don’t also allowed adding of packages for the full power of Lua. Thus, I’ve been looking for and really like having emulators that run Linux on my iPad so I can do some work data crunching with R and combine it with simple programming in Lua. I was very happy when I was able to in Linux even bridge R and Lua (run R in Linux, have R load Reticulate to translate it to Python, have Python load Lupa to translate to Lua)— all in one session :-).
Interesting that you bring up about UTM. I actually just stumbled on it and had the complete opposite experience. It actually does now run on the new iOS thanks to contribution of another programmer who has been following UTM who made a work around. I’ve got it up and running now on my new iPad Pro with the latest iOS. Unfortunately, the workaround involves not using the JIT anymore so the developer calls it “UTM-SE” (slow edition) and is available on the web as an ipa. It has to be side-loaded, and the developer recommends Alt-store to do so. However, Alt-store requires a Mac to set up with a current operating system and my Macs are too old and their OS are not upgradable. Instead, I was able to install UTM-SE easing using Singulous (although costs me $20/year to do so). I’ve currently got Debian 10 ARM65 up and running well on it. It seems significantly faster to me than iSH and has the full functionality that iSH lacks (and hence my initial reason for writing to you and trying to install glibc for better compatibility). By comparing graphic processing, even UTM-SE (running like iSH without access to GPU) is much faster: mesa utility glxgears running on iPad Pro with iSH being headless VNC server and VNC client on iPad maxed at 1 FPS. On UTM-SE on the same iPAD Pro glxgears runs at 26 FPS.
Except for trying out your glibc and keeping iSH as a backup iPAD linux solution, I’m thinking of switching over to do all my iPad linux work using UTM-SE. Hopefully in the future, Apple will remove some of its restrictions and allow UTM to use JIT again and get even better performance.
I hope that helps answer your question.
Have a good night and weekend.
Sincerely,
Mike
Dear Mike,
Thank you for the detailed exposé. I see that you encountered the same problems and found a better solution. It’s good to meet a fellow researcher, I’m a university professor trying to achieve tenure. Economists despite what people think of us now have to work with a lot of statistics hence my interest in iSH. I’ll definitely try UTM-SE out, slower speed is not a problem. You’re completely right, GUI on iSH is very-very laggy. The good thing about iSH is it’s integration with the iOS filesystem although, from my recent experience, Samba on Linux is easy to configure and works just fine.
My solution to the problem was a headless Raspberry Pi 4B, I wrote a chroot management script for it and now can run x86_64 software. It’s a small box that I can take with my iPad and, being a full-fledged computer, it can successfully mount USB drives and such devices as Kindle.
Let’s hope tbotd (the creator of iSH) will one day develop it to the point when glibc-based software is fully supported and runs without errors.
Enjoy the rest of the weekend!
Yours truly, Eli
Thanks, Eli, that sounds great!
I agree that iSH does a great job integrating with the iOS file system. I just took advantage of that fact and used in split screen mode used scp from UTM-SE to pull files from iSH (which had been shared from my iCloud account :-) ). I also didn’t realize until know the storage benefit of iSH— I’m not sure if it is limited at all but doesn’t seem to be yet. UTM-SE virtual disks I see are limited to 8G which seems to quickly fill up when using a bigger Linux distribution like Debian as compared to Alpine Linux. I read that virtual disks can be expanded but not sure the UTM is ale to do that from the app itself—will write the developer.
Have a good rest of your weekend, too. It was nice to have chatted with you electronically.
Sincerely,
Mike
PS,
I also thought about the Raspberry Pi option. I think if my job was primarily data and research, I’d do that, too. For now mobility, teaching, and seeing patients involves more of my time, so the convenience of having the user-friendly other features of the iPad has kept me preferring a single device.
Sincerely,
Mike
Dear Mike,
You can install your own operating system into UTM.SE from a downloaded ISO (this may however be somewhat time-consuming) and configure the disks to be as large as you like (say 32 or 64 GB). UTM has a nice GUI for QEMU. Many thanks for Signulous, it’s much cheaper than Altstore with an Apple Developer account.
It was a fruitful conversation. I wish you luck in your most needed profession and that you find your perfect hardware/software combination!
Kind regards, Eli
Thank you, Eli, and good luck with your pursuit of tenure!
Have a good week,
Mike
Thank you, Mike. Likewise! PS I’m closing the issue.
Hi. I recently tried to pull in your x86-alpine-glibc docker image and export it to my iPad OS ish 1.2.2 app. I followed your instructions and everything seem to go fine (glibc file system size = 66.1 MB on MacOSX) and was able to mount as filesystem on iSH. However, when I tried using apk to install extra programs, I frequently am getting "script exited with error 127" (e.g. "busybox-1.31.1-r16.trigger: script exited with error 127", fo config-2.13.1-R2.trigger: script exited with error 127"). This error prevents much expansion of the glibc filesystem with other programs. Is there something that I forgot to do or need to do to not get that error and be able to download more programs with apk command?
Thanks!