Commit 080ce77
committed
recipes ask whether a header is there instead of inferring it from the platform
Two recipes decide their configuration by branching on the PLATFORM and then
assuming what that platform's userspace carries. Both assumptions held on
every target this index had until a C library began presenting a different
environment on one of them, and the compatibility measurement has been
recording the result as a member failure.
CURL, ON LINUX. `#define HAVE_LINUX_TCP_H 1` sits inside
`#if defined(__linux__)`. openkal runs on the Linux kernel, so the predicate
is CORRECT; what is wrong is reading it as "glibc's userspace headers are
installed". Measured chain, each step taken after the previous one was fixed:
1. `lib/setopt.c:31: fatal error: 'linux/tcp.h' file not found`
-> ask `__has_include(<linux/tcp.h>)`. Same for `sys/eventfd.h`,
`termio.h`, `sys/xattr.h`.
2. `strerr.c:30: error: "strerror_r MUST be either POSIX, glibc style"`
-> the glibc flavour was correctly withdrawn for musl and nothing
replaced it; curl refuses a configuration naming neither. The POSIX
flavour is declared when `__GLIBC__` is absent.
3. `the C library in this graph (musl) declares that it does not supply the
following, and the link has just asked for it: eventfd as timerfd_create`
-> A HEADER TEST IS NOT A SYMBOL TEST. openkal-musl carries
`sys/eventfd.h` and declares `eventfd` absent, so `HAVE_EVENTFD` must
not follow from the header being present. Steps 2 and 3 were defects
this change introduced and the next build caught; they are recorded
because the distinction they turn on is the point.
4. `undefined symbol: __isoc23_strtol`, referenced from
`compat-x-openssl/3.5.1/lib/libcrypto.a`.
STEP 4 IS NOT A RECIPE DEFECT AND IS NAMED IN `compat.openssl.lua`'s OWN
COMMENT: "Because that build runs OUTSIDE mcpp's compile rules, it inherits
none of the resolved toolchain's flags --- it just calls `cc`." That archive
is built against the host's glibc and cannot link over openkal. curl on linux
is blocked on a packaging property, not on the C library or the engine.
C-ARES, ON WINDOWS. Its Windows branch defines `HAVE_WINDOWS_H`,
`HAVE_WINSOCK2_H`, `HAVE_STRCMPI`, `HAVE_STRNICMP` and no sub-second clock,
because until openkal every PE target had Win32. Each was measured:
1. `ares_setup.h:81: fatal error: 'windows.h' file not found`
-> `__has_include` for each of the four Windows headers.
2. `call to undeclared function 'strcmpi'` / `'strnicmp'`, and
`ares_timeval.c:93: error: missing sub-second time retrieval function`
-> the CRT spellings are the ones absent here; `strings.h` decides, and
`clock_gettime` is declared where `_WIN32` is not.
3. `incomplete definition of type 'struct hostent'`.
AND STEP 3 IS WHERE ENTRY-BY-ENTRY PATCHING STOPS BEING THE RIGHT SHAPE. Each
fix moved the failure to the next Win32 assumption in the same block. That
block is a Win32 CONFIGURATION; a PE target presenting POSIX needs the POSIX
one, not a patched Win32 one. Choosing between them is a question about the
C environment --- `cfg(c-abi = ...)` in mcpp's vocabulary --- and the
`generated_files` selection is keyed by OS. The four fixes here are correct in
themselves and are kept for that reason; they are not sufficient, and this
records why rather than leaving the next reader to re-derive it from the
diagnostics.
Neither member reaches `runs` with this change. What it buys is that every
failure now names something true.1 parent 047a284 commit 080ce77
2 files changed
Lines changed: 93 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1034 | 1036 | | |
1035 | 1037 | | |
1036 | 1038 | | |
| |||
1087 | 1089 | | |
1088 | 1090 | | |
1089 | 1091 | | |
1090 | | - | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1091 | 1098 | | |
1092 | 1099 | | |
1093 | 1100 | | |
| |||
1205 | 1212 | | |
1206 | 1213 | | |
1207 | 1214 | | |
1208 | | - | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1209 | 1226 | | |
1210 | 1227 | | |
| 1228 | + | |
1211 | 1229 | | |
| 1230 | + | |
1212 | 1231 | | |
1213 | 1232 | | |
1214 | 1233 | | |
| |||
1229 | 1248 | | |
1230 | 1249 | | |
1231 | 1250 | | |
| 1251 | + | |
1232 | 1252 | | |
| 1253 | + | |
1233 | 1254 | | |
1234 | 1255 | | |
1235 | 1256 | | |
| |||
1276 | 1297 | | |
1277 | 1298 | | |
1278 | 1299 | | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
1283 | 1319 | | |
| 1320 | + | |
1284 | 1321 | | |
1285 | | - | |
| 1322 | + | |
1286 | 1323 | | |
| 1324 | + | |
1287 | 1325 | | |
1288 | | - | |
| 1326 | + | |
1289 | 1327 | | |
| 1328 | + | |
1290 | 1329 | | |
1291 | 1330 | | |
1292 | 1331 | | |
1293 | 1332 | | |
1294 | | - | |
| 1333 | + | |
1295 | 1334 | | |
| 1335 | + | |
1296 | 1336 | | |
1297 | 1337 | | |
1298 | 1338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
252 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
253 | 295 | | |
254 | 296 | | |
255 | 297 | | |
256 | 298 | | |
257 | | - | |
258 | | - | |
259 | 299 | | |
260 | 300 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 301 | | |
266 | 302 | | |
267 | 303 | | |
| |||
0 commit comments