rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Hope to support `i686-unknown-linux-musl`

Open Ljzd-PRO opened this issue 2 years ago • 4 comments

Problem you are trying to solve

When I tried to install rustup, it seems not support i686-unknown-linux-musl

localhost:~# curl https://sh.rustup.rs -sSf | sh
info: downloading installer
curl: (22) The requested URL returned error: 404
rustup: installer for platform 'i686-unknown-linux-musl' not found, this may be unsupported

Can I compile the source code to build a supported one?

Solution you'd like

Hope that it can support i686-unknown-linux-musl

Notes

No response

Ljzd-PRO avatar May 03 '22 19:05 Ljzd-PRO

Hi @Ljzd-PRO

i686-unknown-linux-musl is tier two, with std support, so in theory it might be possible to add it to our supported platform list. I'd be concerned that it implies a system which is perhaps not very powerful though; which leads me to suggest that whatever system this represents would be better handled by cross-building from a more powerful system.

If you still want to use this system as a build host then I'd be happy to guide you through adding the relevant CI stuff to try and build this target.

kinnison avatar May 20 '22 10:05 kinnison

Hi @kinnison I am also trying to compile i686-unknown-linux-musl without success. So, I compiled it with i686-unknown-linux-gnu. However, when I add the openssl lib, I have the following error:

i686-linux-gnu-gcc -I. -Iinclude -fPIC -pthread -Wall -O3 -fomit-frame-pointer -O2 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m32 -march=i686 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DRMD160_ASM -DAESNI_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=" -DNDEBUG -c -o apps/app_rand.o apps/app_rand.c make[1]: Leaving directory `/

--- stderr /bin/sh: i686-linux-gnu-gcc: command not found make[1]: *** [apps/app_rand.o] Error 127 make: *** [build_libs] Error 2 thread 'main' panicked at '

Error building OpenSSL: Command: "make" "build_libs" Exit status: exit status: 2

I used symbolic link to the redhat compiler, and then it worked. Do you know if that is the right way? I see that the flag of -m32 is transferred, so regarding the cross-compilation of 32bit we should be fine.

Thank you very much!

chkp-ofirsha avatar Jan 02 '23 10:01 chkp-ofirsha

Running on an old Intel lga775 2,.5Ghz ddr2 2gb of ram machine. (i686) Bumping into the same issue with the i686-unknown-linux-musl , can't get it compiled.

https://pkgs.alpinelinux.org/package/edge/community/x86/rust This is all I needed for my alpine instance. just make sure you enable the community repos and add the dependencies. sudo apk add gcc libgcc libstdc++ llvm15-libs musl musl-dev rust-stdlib sudo apk add rust

Albino:~# rustc --version rustc 1.67.1 (d5a82bbd2 2023-02-07) (Alpine Linux)

Let's rock'n'roll!

SvenDijkstra avatar Feb 18 '23 19:02 SvenDijkstra

Running on an iPad Pro 10.5 with iSH terminal app. A10X Fusion chip with 64‑bit architecture (i686) Bumping into the same issue with the i686-unknown-linux-musl.

cargo: 1.52.0 rustc: 1.52.1 rustup: not found (tried solving using solved issue)

and ended up with localhost:~# curl https://sh.rustup.rs -sSf | sh info: downloading installer curl: (22) The requested URL returned error: 404 rustup: installer for platform 'i686-unknown-linux-musl' not found, this may be unsupported

I think A10X Fusion chip is ARM based.

varuneranki avatar Apr 24 '24 19:04 varuneranki

I'm having the same problem using iSH terminal on iOS. It would be cool if rust supported this target. People would be able to use rust on iPhones and iPads.

VladasZ avatar May 22 '24 09:05 VladasZ

Just to add my personal opinion on this one, as I'm also an iOS user and I'm aware of iSH.app's existence: [^1]

  • i686-unknown-linux-musl is tier 2 without host tools according to the current target policy, meaning even if Rustup gets to support it, we would probably be stuck in a limbo state where no real toolchains can be distributed via Rustup, like we currently do with Termux (https://github.com/rust-lang/rustup/issues/2872).
  • Also, considering how iSH.app is implemented, the performance of Cargo/Rustc on iSH.app will be almost certainly very poor even compared to that on Termux.
  • Finally, if iSH.app is the only reason why this should be a valid host triple (it currently isn't officially), this will very likely increase our maintenance burden with very little additional value.

I'm having the same problem using iSH terminal on iOS. It would be cool if rust supported this target. People would be able to use rust on iPhones and iPads.

@VladasZ As I said we do support the target triple in question, but the distribution-wise support is limited. If you are brave enough, it looks like https://github.com/ish-app/ish/issues/67#issuecomment-1409422612 already provides a pathway to installing a Rust toolchain on iSH.app (the toolchain is not provided by rust-lang but by Alpine package maintainers though).

[^1]: I very much appreciate the efforts iSH.app has made in bringing a usable terminal environment to iOS; OTOH I'm very disappointed about Apple's conservative stance on iOS by refusing to make it an actually productive OS for software enthusiasts.

rami3l avatar May 22 '24 10:05 rami3l

Just to add my personal opinion on this one, as I'm also an iOS user and I'm aware of iSH.app's existence: 1

  • i686-unknown-linux-musl is tier 2 without host tools according to the current target policy, meaning even if Rustup gets to support it, we would probably be stuck in a limbo state where no real toolchains can be distributed via Rustup, like we currently do with Termux (Can not install on android - target 'aarch64-linux-android' not found in channel. #2872).
  • Also, considering how iSH.app is implemented, the performance of Cargo/Rustc on iSH.app will be almost certainly very poor even compared to that on Termux.
  • Finally, if iSH.app is the only reason why this should be a valid host triple (it currently isn't officially), this will very likely increase our maintenance burden with very little additional value.

I'm having the same problem using iSH terminal on iOS. It would be cool if rust supported this target. People would be able to use rust on iPhones and iPads.

@VladasZ As I said we do support the target triple in question, but the distribution-wise support is limited. If you are brave enough, it looks like ish-app/ish#67 (comment) already provides a pathway to installing a Rust toolchain on iSH.app (the toolchain is not provided by rust-lang but by Alpine package maintainers though).

Footnotes

  1. I very much appreciate the efforts iSH.app has made in bringing a usable terminal environment to iOS; OTOH I'm very disappointed about Apple's conservative stance on iOS by refusing to make it an actually productive OS for software enthusiasts.

I couldn't agree more. Spent 8 hours per day entire month. Docker builds and making slim images were part of it. iPadOS is quite different than iOS. Apple would never give it to users since it would kill their entire MacBook productline. I was working on a complex project and understood even Windows requires a WSL2 Linux tool chain for certain specific crates. Made some leaner images but lowest I could build was 200MB since my app breaks. Coming back to topic, iSH even if capable, would struggle with Rust unless Apple releases support. Simple crates might not be a problem. I guess we can close this issue for now.

varuneranki avatar May 23 '24 17:05 varuneranki