Open weiznich opened 4 weeks ago
https://github.com/bminor/glibc/commit/0ab341b247fc1c2cd101a87c78f38d2da00c335c
It should have been defined by glibc itself (in glibc 2.38+), can you try to inspect the code of the same file in /opt/zig/lib/libc/include/
?
Thanks for the response.
I checked it in the rust docker container and it seem like:
/opt/zig/lib/libc/include/generic-glibc/sys/cdefs.h
does contain the relevant defines/usr/include/x86_64-linux-gnu/sys/cdefs.h
does not contain the relevant defines Also ldd
reports that the system uses glibc 2.36
It seems like that for some reason the system header from /usr
is used and not the bundled header from zig
For reference that's with the rust:1.80.1
docker image (+ a view custom layers to install zig + cargo-zigbuild)
Maybe it's caused by cmake? There is support for cmake in cargo-zigbuild but it's not really tested thoroughly.
That might be the case, I'm not sure about that.
As a general note: The project I'm building depends on quite a few complex cmake projects (netcdf, hdf5, gdal, proj, just to name some). It works fine as soon as I specify that additional define manually. I believe that this means the cmake integration should be mostly fine.
I have a project that depends on
netcdf-src 0.4.0
. Trying to build that in the official rust-lang docker container withcargo-zigbuild 0.19.1
andzig 0.13.0
installed fails with the following error messages:I can workaround that error by just adding
CFLAGS="-D__COLD=\"\""
to the compilation environment. I report this here as this either seems to be an issue incargo-zigbuild
(not setting that option) or inzig
itself (__COLD) shouldn't be there.Interestingly it works outside of the docker container with the same rust, zig, zig-build and netcdf-src version…