Skip to content

ensure that building zig from source succeeds on android 5.1 #5782

Description

@justjosias

During compilation of Zig, using the standard posix instructions, the zig0 executable segfaulted when it was run.

Running the zig0 executable by itself also segfaults.

Compilation log:

[ 98%] Building CXX object CMakeFiles/zig0.dir/src/stage2.cpp.o
[ 98%] Linking CXX executable zig0
make[2]: Leaving directory '/home/josias/git/zig/build'
[ 98%] Built target zig0
make[2]: Entering directory '/home/josias/git/zig/build'
Scanning dependencies of target zig_build_libstage2
make[2]: Leaving directory '/home/josias/git/zig/build'
make[2]: Entering directory '/home/josias/git/zig/build'
Segmentation fault
make[2]: *** [CMakeFiles/zig_build_libstage2.dir/build.make:57: CMakeFiles/zig_build_libstage2] Error 139
make[2]: Leaving directory '/home/josias/git/zig/build'
make[1]: *** [CMakeFiles/Makefile2:178: CMakeFiles/zig_build_libstage2.dir/all] Error 2
make[1]: Leaving directory '/home/josias/git/zig/build'
make: *** [Makefile:130: all] Error 2

The output of strace ./zig0:

execve("./zig0", ["./zig0"], 0xffc77fe0 /* 12 vars */ <unfinished ...>
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x219d02c} ---
<... execve resumed>)                   = ?
+++ killed by SIGSEGV +++
Segmentation fault

Background information:
Debian 10 in proot in Termux in Android 5.1 on an ARM tablet.
The patch for LLVM PolyPlugin was applied.

Kernel version: 3.18.19

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.os-linuxLinux

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions