--- title: Read config.log after configure under gcc 14; a clean exit status proves nothing area: build impact: HIGH tags: [build, configure, autoconf, gcc14, implicit-function-declaration, implicit-int, int-conversion, porting] verified: 2026-11-04 --- # Read config.log after configure under gcc 14; a clean exit status proves nothing GCC 14 turns implicit function declarations, implicit int and int-conversion (and three more: incompatible pointer types, return mismatch, missing parameter types) from warnings into errors. An old configure probe that hits one fails to compile, and configure takes the "missing" branch with exit status 0. On illumos some names live in headers a Linux-written probe may not include (`alloca` in ``; BYTE_ORDER only in ``, which sent tcl's autoconf-2.59 AC_C_BIGENDIAN to a fallback test whose `exit()` has no ``), so such a probe can hit this where it passed before. **Antipattern** ```sh ./configure --prefix="$out" && gmake && gmake install # rc 0 at every step, so "it works" # never read: config.log, config.h. If a probe calls exit(), alloca() or a gated libc function # without its header, gcc 14 fails it, and configure drops the feature or picks the wrong branch. # the only test is a round trip (encrypt then decrypt) that cannot see the wrong branch ``` **The Solnix way** ```sh ./configure --prefix="$out" # 1. failed probes whose gcc message config.log kept (see Unverified), not on the feature they test grep -n -E '\[-W(implicit-function-declaration|implicit-int|int-conversion|incompatible-pointer-types|return-mismatch|declaration-missing-parameter-type)\]' config.log # 2. what those errors changed: configure again with them turned back into warnings, then diff cp config.h config.h.gcc14 # where the package has a config.h; tcl records its result in tclConfig.sh CC="gcc -fpermissive" ./configure --prefix="$out" && diff config.h.gcc14 config.h # 3. throw the -fpermissive run away; fix the cause in the recipe: add the header or feature macro, # or pin the cache variable (ac_cv_func_memcpy=yes, ac_cv_c_bigendian=no; for gnupg its own gnupg_cv_c_endian); configure again; # then add a build check that fails if the answer is wrong ``` illumos headers that trip probes: libc hides POSIX/XPG names behind `__EXTENSIONS__` / `_XOPEN_SOURCE`; `alloca()` needs ``; `BYTE_ORDER` is in ``, not ``. For pre-C99 sources the build team's fallback is `-Wno-error=implicit-function-declaration` and friends; still run steps 1 and 2. **The illumos way** (OpenIndiana, OmniOS, SmartOS) ```sh # illumos-gate builds with GCC 10 as primary and GCC 14 as a shadow (illumos.sh, OmniOS example) export PRIMARY_CC=gcc10,/opt/gcc-10/bin/gcc,gnu export SHADOW_CCS=gcc14,/opt/gcc-14/bin/gcc,gnu CC=/opt/gcc-14/bin/gcc ./configure # third-party code: the same trap, once you pick gcc 14 ``` On OpenIndiana the compilers are under `/usr/gcc/10` and `/usr/gcc/14`. Under gcc 10 these probes only warn, so they still give the answer they always gave. **The difference.** Solnix builds packages with GCC 14 as its primary compiler, so it meets these errors now. illumos-gate builds with GCC 10 and uses GCC 14 as a shadow (illumos docs); GCC 14 is Solnix's primary toolchain (handbook: how Solnix is built). A probe that finds its answer in a header elsewhere can fall through to a broken test program here (`BYTE_ORDER`, above). The failure is silent: tcl and gnupg built cleanly, both configured big-endian on little-endian hosts. **Check.** The grep in step 1 prints nothing, or only lines you have read and accepted. The diff in step 2 shows no change you have not explained. **Unverified** - That config.log keeps each failed probe's gcc message. The cited pages only say to diff config.log and config.h. - SmartOS's compiler for third-party builds. No cited source names it. **Sources** - [Porting to GCC 14](https://gcc.gnu.org/gcc-14/porting_to.html), Certain warnings are now errors; Implicit int types; Implicit function declarations (the `[-Wimplicit-function-declaration]` message); Typos in function prototypes; Incorrect uses of the return statement; Type checking on pointer types; Using pointers as integers; Impact on Autoconf and build environment probing in general (silently dropped features, diff config.log and config.h, autoconf before 2.69); Turning errors back into warnings (`CC` with `-fpermissive`) - [gcc(1)](https://solnix.io/docs/man/gcc.1) (Solnix pkgs.solnix.gcc), -fno-diagnostics-show-option (by default each diagnostic names the option that controls it); -fpermissive; -Wno-implicit-int; -Wno-implicit-function-declaration (errors by default in C99 and later) - [Autoconf 2.72: C Compiler Characteristics](https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/C-Compiler.html), AC_PROG_CC (`CC`, `CFLAGS`); AC_C_BIGENDIAN; AC_C_CONST (caches its result in `ac_cv_c_const`) - [handoff: from-builder-20261104T154849-libdb-tcl-rows](https://codeberg.org/solnix/solnix-infra/src/commit/c2ecf4535e0fc32261bbfb2414bc7961a73fa6ca/docs/handoff/from-builder-20261104T154849-libdb-tcl-rows/README.md), What we ask item 2 (tcl's autoconf-2.59 AC_C_BIGENDIAN, exit() without ``) - [handoff: from-builder-20261104T173111-gnupg-uid-hash-rows](https://codeberg.org/solnix/solnix-infra/src/commit/c2ecf4535e0fc32261bbfb2414bc7961a73fa6ca/docs/handoff/from-builder-20261104T173111-gnupg-uid-hash-rows/README.md), The bug (served check was only an encrypt/decrypt round trip); The fix (three checks that fail the build) - [docs/design-pkgsrc-patches.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/docs/design-pkgsrc-patches.md) (solnix 5a8e5ce), §3 The recurring illumos-fix classes (feature-test macros, alloca); §9 Family 7 (`ac_cv_func_memcpy=yes` cache seeds) - [docs/progress.md](https://codeberg.org/solnix/solnix/src/commit/5a8e5ce75a33086d7be4410149847bdf7501b8fc/docs/progress.md) (solnix 5a8e5ce), aa-xbuild23 (tcl `ac_cv_c_bigendian=no`); Wave xw32 (EXTRA_CFLAGS `-Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=int-conversion`) - [Handbook: How Solnix is built](https://solnix.io/docs/handbook/how-solnix-is-built#the-two-toolchains) (site 307b67f), The two toolchains (GCC 14 primary) - [illumos: Building illumos](https://illumos.org/docs/developers/build/), Installing required packages (GCC 10 primary, GCC 14.2.0 shadow, `/usr/gcc/14`, `/opt/gcc-14`); Configuring the build (PRIMARY_CC, SHADOW_CCS)