Gradle build error
I'm trying to build something with gradle. When building, I get this error:
> A problem occurred starting process 'command '/data/data/com.termux/files/home/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protoc/3.21.8/3b3111d68b7ef4392cfbbea33a48a95dc7a1f4d7/protoc-3.21.8-linux-aarch_64.exe'
When trying to run the file manually, I get this error:
bash: /data/data/com.termux/files/home/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protoc/3.21.8/3b3111d68b7ef4392cfbbea33a48a95dc7a1f4d7/protoc-3.21.8-linux-aarch_64.exe: cannot execute: required file not found
What do I need to do to fix this?13 Replies
It appears to be an issue with Termux, since the runs fine from an Ubuntu
proot
environment.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I was attempting to build Ghidra. Everything before this built successfully.
Is there a way to fake this out without entering an Ubuntu
proot
environment? Is it possible to change the linker path?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
How can I use a wrapper?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Alright. I've never written a wrapper, so I'll look into it. Thanks.
Running the program using
/system/bin/linker64
, I get an error this error:
"protoc-3.21.8-linux-aarch_64.exe" has unexpected e_type: 2
I tried using LD_PRELOAD=/system/bin/linker64 /data/data/com.termux/files/home/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protoc/3.21.8/3b3111d68b7ef4392cfbbea33a48a95dc7a1f4d7/protoc-3.21.8-linux-aarch_64.exe
which still gave me the same error I originally had.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Maybe something like this will work?
proot() {
printf >&2 "\e[1;97m%s\n%s\n\e[0m" "Running in PROOT:" "$1"
proot-distro login ubuntu -- bash -c "$1"
}
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Here is my script so far:
#!/data/data/com.termux/files/usr/bin/sh
proot() {
printf >&2 "\e[1;97m%s\n%s\n\e[0m" "Running in PROOT:" "$1"
proot-distro login ubuntu -- bash -c "$1"
}
proot "/data/data/com.termux/files/home/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protoc/3.21.8/3b3111d68b7ef4392cfbbea33a48a95dc7a1f4d7/protoc-3.21.8-linux-aarch_64.exe $@"
I'm about to test it now.
It didn't work because the script would be ran multiple times, causing it to try to run proot-distro
from within Ubuntu, causing it to throw an error about running proot-distro
as root user.
I'll try to find the source code for this protoc version.
Would it be possible to use Termux's protoc
instead?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Failed to build.
Here's the error I get when building
protobuf
:
ld.lld: error: undefined symbol: __android_log_write
>>> referenced by common.cc:146 (google/protobuf/stubs/common.cc:146)