[SAOC 2026] ImportC Weekly Update #2
Niyati Jain
niyati.jainn15 at gmail.com
Wed Sep 30 12:46:12 UTC 2026
**SAOC 2026: ImportC Weekly Update #2**
This week I fixed the `-lib` static symbol linking bug and got
the CI matrix for the zero-wrapper packages running end to end.
**`-lib` static symbol linking:** a C file built with `dmd -lib`
couldn't link whenever a non-static function referenced a
`static` variable or function elsewhere in the same file,
`undefined reference`, despite both being in the same translation
unit.
so fixed this with one condition: a C file no longer gets split
into per-function object pieces under `-lib`, since it's one
translation unit regardless. Added a dshell test that builds a
library and links a consumer against it end to end.
**CI matrix for the zero-wrapper libraries:** forked
Emmankoko/importC and added packages for sljit, zlib, curl, SDL3
and a workflow that builds dmd from the fix branches and runs
each package's example against it.
The real obstacle was SDL3. I'd built it locally and vendored the
binary, but CI failed with:
> `undefined reference to '__isoc23_strtoul at GLIBC_2.38'`
which turned out my machine's glibc is newer than the CI
runner's, glibc 2.38 introduced versioned symbols for
strtol/scanf to support C23's binary literals, and Ubuntu 22.04's
glibc 2.35 predates that. SDL3 isn't in apt on 22.04 and upstream
ships no Linux binaries at all, so it now builds from source
inside the job instead of shipping a binary that only worked on
my machine.
zlib and curl are properly verified: a real byte-for-byte
compress/decompress round trip for zlib, and a real libcurl
version check with option set and readback for curl with both
passing against the patched compiler.
**Status:**
- `-lib` fix: https://github.com/dlang/dmd/pull/23904
- CI matrix:
https://github.com/niy-ati/importC/actions/runs/36693779094
- ImportC: https://github.com/niy-ati/importC
Still blocked on publishing the sljit dub package as it needs
#23904 and the cpuid PR (#23934) both merged upstream first,
since `dub add sljit` would otherwise break on a stock compiler.
More information about the Digitalmars-d
mailing list