Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

cargo-apk under Termux arm #213

Open
ghost opened this issue Jun 30, 2019 · 4 comments
Open

cargo-apk under Termux arm #213

ghost opened this issue Jun 30, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2019

While Android SDK/NDK only run in x86, Termux shell supports aapt, dx and ecj tools, which offer a lighter alternative to Android SDK/NDK.

I'm wondering why cargo-apk is calling gcc and other linkers from NDK. For it to be used easily in Termux it could rather lookup the basic tools...

@ghost
Copy link
Author

ghost commented Jun 30, 2019

Neither in UserLAnd SDK/NDK runs (because it remains running on host arch). Idk how to create dual rootfs in Termux for diff. archs, secondly I guess it'll be way mess to fit SDK/NDK in my terminal environment.

Does someone know if NDK is really needed, considering rustc already produces the machine code? NDK just comes with a C header, I guess.

/cargo-apk/src/ops/build.rs

        // Compiling android_native_app_glue.c
        {
            drop(writeln!(workspace.config().shell().err(),
                          "Compiling android_native_app_glue.c"));
            let mut cmd = process(&gcc_path);
            cmd.arg(config.ndk_path.join("sources/android/native_app_glue/android_native_app_glue.c"))
               .arg("-c");
            if config.release {
                cmd.arg("-O3");
            }
            cmd.arg("-o").arg(build_target_dir.join("android_native_app_glue.o"))
               .arg("--sysroot").arg(&gcc_sysroot)
               .arg("-isystem").arg(&gcc_isystem)
               .exec()?;
        }

@ghost
Copy link
Author

ghost commented Jun 30, 2019

I'm already sick of this. My laptop stops charging and I've to deal with Dalvik. Why this with me all the time? It was Mono, now it's all.

@ghost
Copy link
Author

ghost commented Jun 30, 2019

Sick of these mal-elaborated dev tools.

@tomaka
Copy link
Contributor

tomaka commented Jun 30, 2019

Please keep only one issue open.
Also keep in mind that this is an open source project done under free time. We have no obligation to give you something. If you don't like it, improve it, fork it, or write your own version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant