You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, users like myself who use Termux on Android to build projects on the go regularly hit walls when trying to work with protoc and binary plugins.
The Android kernel (a modified Linux kernel) prevents user space processes from invoking certain system calls. This results in the protoc binaries on Maven Central to immediately crash out with a 159 exit code (illegal operation).
Binary plugins such as protoc-gen-grpc-java are compiled against glibc which prevents them natively launching within Termux.
The first issue can be resolved by running processes via proot, from quick experimentation on my device. This seems to spoof the problematic system calls and allows protoc to successfully complete.
$ proot /path/to/protoc.exe @argFile
The second issue appears to be able to be resolved by invoking plugins via the glibc-runner/grun command line tool. To access this, users have to first run apt update && apt install glibc-repo && apt install glibc-runner within Termux itself.
$ proot grun /path/to/protoc-gen-grpc-java.exe
Further experimentation is needed, but in theory we could configure the plugin to detect the presence of these tools when using Termux and modify the way the plugins are invoked to ensure that operations work as expected within Termux environments.
I might consider this if people show further interest.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, users like myself who use Termux on Android to build projects on the go regularly hit walls when trying to work with
protocand binary plugins.The Android kernel (a modified Linux kernel) prevents user space processes from invoking certain system calls. This results in the
protocbinaries on Maven Central to immediately crash out with a159exit code (illegal operation).Binary plugins such as
protoc-gen-grpc-javaare compiled against glibc which prevents them natively launching within Termux.The first issue can be resolved by running processes via
proot, from quick experimentation on my device. This seems to spoof the problematic system calls and allowsprotocto successfully complete.The second issue appears to be able to be resolved by invoking plugins via the
glibc-runner/gruncommand line tool. To access this, users have to first runapt update && apt install glibc-repo && apt install glibc-runnerwithin Termux itself.Further experimentation is needed, but in theory we could configure the plugin to detect the presence of these tools when using Termux and modify the way the plugins are invoked to ensure that operations work as expected within Termux environments.
I might consider this if people show further interest.
Beta Was this translation helpful? Give feedback.
All reactions