Our great sponsors
-
zig
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I get the same error when I try to build zig-vulkan-triangle, zang, and ichigo on 0.7.x, and even if I zig cc test.c -lSDL2 -lvulkan (test.c is just int main(int argc, char* argv[]) { return 0; }). This builds fine when I switch back to Zig 0.6.0 or use the system-installed clang (6.0.0-1ubuntu2) or gcc (7.5.0-3ubuntu1~18.04). Stranger still, 0.7.x works fine with -lc and -lm, but not any of the other libraries I tried. Does this perhaps have something to do with Zig building its own libc? I also tried zig cc test.c -target x86_64-linux-musl -lSDL2 with the same results.
It seems that this only affect prebuilt Zig. One work around suggested in the linked thread is to add exe.addLibPath("/usr/lib/x86_64-linux-gnu") to the build script.