Skip to content

Conversation

@SekaiArendelle
Copy link

- Use pre-compiled static musl binaries for aarch64 and x86_64
- related to termux#22227
@robertkirkman
Copy link
Member

Precompiled executables are not ideal for Termux.

I recommend that instead, you try to work on this error in the command cargo install pixi:

error[E0277]: the trait bound `Utf8TypedPath<'_>: From<Utf8TypedPath<'_>>` is not satisfied
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rattler_conda_types-0.23.1/src/channel/mod.rs:156:49
    |
156 |                 let url = directory_path_to_url(absolute_path.to_path())
    |                           --------------------- ^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
    |                           |
    |                           required by a bound introduced by this call
    |

@SekaiArendelle
Copy link
Author

I will give it a try

@SekaiArendelle
Copy link
Author

SekaiArendelle commented Jan 27, 2026

https://pixi.prefix.dev/latest/installation/#install-from-source seems we shoud compile and install it but not from crates.io.

@robertkirkman
Copy link
Member

robertkirkman commented Jan 27, 2026

Oh you're right, that's interesting, they do say that

image

Also, some research suggests that pixi is a variant of, or alternative implementation of, conda. Because of that, it seems like pixi is probably unlikely to work properly on Android, even when its package is compiled from source, because of similar reasons to conda when conda was last tried:

however, it's a new project and might be different from the old conda, so it's worth a try to at least test and see what happens!

I am doing something else at the moment but in a while I will try to help compile this.

@SekaiArendelle
Copy link
Author

Yes, you are right. Only a very limited number of packages are available for Android.
Screenshot_2026-01-27-15-49-28-784-edit_com termux

@robertkirkman
Copy link
Member

robertkirkman commented Jan 27, 2026

I'll show how far I was able to get after trying to compile pixi for a while,

I did this:

git clone https://github.com/prefix-dev/pixi.git
cd pixi
# I applied this patch and also I applied a similar patch to the dependency crate 'rattler_pty'
git apply -v << 'EOF'
--- a/crates/pixi_global/src/trampoline.rs
+++ b/crates/pixi_global/src/trampoline.rs
@@ -75,6 +75,11 @@ const TRAMPOLINE_BIN: &[u8] =
 const TRAMPOLINE_BIN: &[u8] =
     include_bytes!("../../../trampoline/binaries/pixi-trampoline-x86_64-unknown-linux-musl.zst");
 
+#[cfg(target_arch = "aarch64")]
+#[cfg(target_os = "android")]
+const TRAMPOLINE_BIN: &[u8] =
+    include_bytes!("../../../trampoline/binaries/pixi-trampoline-aarch64-linux-android.zst");
+
 #[cfg(target_arch = "loongarch64")]
 #[cfg(target_os = "linux")]
 const TRAMPOLINE_BIN: &[u8] = include_bytes!(
--- a/crates/pixi_pty/src/unix/pty_process.rs
+++ b/crates/pixi_pty/src/unix/pty_process.rs
@@ -21,7 +21,7 @@ use std::{
     thread, time,
 };
 
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
 use nix::pty::ptsname_r;
 
 /// Start a process in a forked tty so you can interact with it the same as you would
EOF
python trampoline/build-trampoline.py --target aarch64-linux-android
cargo build
cd examples/simple-calculator
../../target/debug/pixi run
../../target/debug/pixi workspace platform add unknown

When I did that, pixi compiled, but, when I tried running it using the last two commands at the bottom of my list, I see these errors now:

Help: This platform (unknown) is not supported. Please run the following command to add this platform to the workspace:

	pixi workspace platform add unknown

and

Error:   × 'unknown' is not a known platform. Valid platforms are 'noarch', 'unknown', 'linux-32', 'linux-
  │ 64', 'linux-aarch64', 'linux-armv6l', 'linux-armv7l', 'linux-loongarch64', 'linux-ppc64le',
  │ 'linux-ppc64', 'linux-ppc', 'linux-s390x', 'linux-riscv32', 'linux-riscv64', 'freebsd-64', 'osx-
  │ 64', 'osx-arm64', 'win-32', 'win-64', 'win-arm64', 'emscripten-wasm32', 'wasi-wasm32', 'zos-z'

it seems like somewhere there is this list of supported platforms, and Android is not in it already, so to make pixi run on Android it would be necessary to find that and make further changes.

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

Successfully merging this pull request may close these issues.

2 participants