I have run into a segfault with the compiler. I understand the change that introduced it, but I’d like to get a better backtrace to understand more fully where the issue is.
Using the 0.16.0 release of the compiler strips out the debug information, so the backtrace is not helpful.
I pulled the 0.16.0 tag from the compiler repo and built it using the 0.16.0 release. It built just fine, no issues. However, when I try to compile my project with this debug version, I get a bunch of aro errors:
/home/redacted/hush/zig-pkg/freetype-2.14.1-alzUkceCqgDRZIP8PnxnNCd8jwfbwY0k1VhlTV2O5Ivo/builds/unix/ftsystem.c:1:1: error: aro does not support compiling C objects yet
/home/redacted/hush/zig-pkg/freetype-2.14.1-alzUkceCqgDRZIP8PnxnNCd8jwfbwY0k1VhlTV2O5Ivo/src/base/ftdebug.c:1:1: error: aro does not support compiling C objects yet
...
/home/redacted/hush/zig-pkg/sdl_linux_deps-0.0.0-SDL_ltg8hgAOayMwFN6BhHW3Rs5UPtf6n8m-2qcQHuGS/src/xdg-output-unstable-v1-protocol.c:1:1: error: aro does not support compiling C objects yet
/home/redacted/hush/zig-pkg/sdl_linux_deps-0.0.0-SDL_ltg8hgAOayMwFN6BhHW3Rs5UPtf6n8m-2qcQHuGS/src/xdg-decoration-unstable-v1-protocol.c:1:1: error: aro does not support compiling C objects yet
...
All are basically the same: aro does not support compiling C objects yet.
The confusing part for me is that the aro version should be the same since I’m using the 0.16.0 tag. So I’m not sure why the pre-built compiler is file, but my debug built one is not.
I also tried the 0.16.x branch, but that had other issues.
I guess my main questions are:
Why would aro be different from the built-from-source debug compiler and the pre-build release compiler?
Is there any way to work around this?
I guess you built zig without llvm. In the compilation config, zig can use one of two c backends: clang (llvm) and aro (which does not support compiling C objects yet…). If you compile zig with llvm, clang is used by default, but zig without llvm currently can’t compile c code.
Thanks for the issue link. That looks like what I’m hitting, appreciate the verification. I will still try to get the compiler built with LLVM so I can do some digging myself. I appreciate your help.