T
Termux3mo ago
Potat

binary has unexpected e_type: 2

When I try to run a binary, it shows error: <path> has unexpected e_type: 2 I tried compiling a binary of no code, same thing I can't find nothing about the error
10 Replies
ted
ted3mo ago
binary of what, compile with what, compile on the same device you're runnig termux on?
Potat
PotatOP3mo ago
Binary of as I said even no code Compiled with Zig On a normal linux pc
ted
ted3mo ago
you can't just run binaries compiled for actual linux, for x64 processors, on your arm64 android phone
Potat
PotatOP3mo ago
I did compile it for aarch64
ted
ted3mo ago
okay, you can't just run binaries compiled for actual linux on your android phone
ted
ted3mo ago
GitHub
Compiling a program on termux aarch64 produces FileNotFound error...
Zig Version 0.11.0-dev.1012+4b5fc5239 Steps to Reproduce and Observed Behavior Steps to reproduce Install Termux (not the google play version, as that&#39;s is deprecated and has security flaws) on...
ted
ted3mo ago
seems like there's a number of zig-specific issues discussed here, actually
Potat
PotatOP3mo ago
I did google it, that's not the same error Okay I set abi to android instead Now there's a different error I'll look it up
ted
ted3mo ago
https://github.com/ziglang/zig/issues/14146#issuecomment-1368338564 is exactly your error and is why that issue is the first result for it. sorry for not linking to the exact comment
GitHub
Compiling a program on termux aarch64 produces FileNotFound error...
Zig Version 0.11.0-dev.1012+4b5fc5239 Steps to Reproduce and Observed Behavior Steps to reproduce Install Termux (not the google play version, as that&#39;s is deprecated and has security flaws) on...
Potat
PotatOP3mo ago
Mmmm with abi set to android it shows executable's TLS segment is underaligned I ran termux-elf-cleaner, it changed from alignment 8 to 64, but it still shows the same thing otherwise alignment is 64 (skew 40), needs to be at least 64 This doesn't happen with no code, but there seem to be multiple unrelated things that cause it, which also result in a different skew value

Did you find this page helpful?