Open felixguendling opened 3 years ago
You're correct. Thank you.
However, I'm still not able to compile libressl using zig cc
.
It seems like cryptlib.c
makes #include <syslog.h>
and it wants to include its own "syslog.h
compatibility shim" where syslog_data
and some other things are defined and #include_next <syslog.h>
pulls the "real" syslog.h
. What it gets is directly the official syslog.h
. So for me it looks like zig cc
is using the wrong include order. Or at least another include order than expected by libressl.
Maybe the project includes specified by -I
don't have precedence against system includes which is different to how this is handled in "normal" compilers like GCC/mingw, Clang, MSVC (which are able to compile libressl)? I'm just guessing. Otherwise I would be quite clueless.
This happens with zig-linux-x86_64-0.8.0 as well as with zig-linux-x86_64-0.9.0-dev.749+259f3458a (the latest version linked on the download page).
I'm trying to write a toolchain file for CMake to compile my project (which relies on add_subproject(libressl)
) using zig cc
, zig c++
, etc.
Edit: added an #error "syslog.h compatibility shim included"
to the syslog.h
compat shim from libressl and this never triggers. So I assume it's never actually used in the zig cc
build. In other builds (normal GCC, Clang) the compilation is stopped with this error.
Hey! I wanted to use zig as a C++ and C compiler because of its ability to create statically linked binaries for all platforms. I ran into the issue that the
syslog.h
implementation of zig does not provide the defintiion of thesyslog_data
struct. Did anyone else run into this issue already and knows how to solve it? Am I doing something wrong?