boost: fix bjam bootstrap under GCC 14 for @1.56.0 - #6271
Open
gonzabotmdp wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boost@1.56.0's own build engine (tools/build/src/engine, aka bjam/b2) fails to bootstrap under GCC 14:file_query()is properly declared in the engine's ownfilesys.h(and correctly implemented infilesys.c/fileunix.c), butmodules/path.ccalls it without including that header -- valid, if sloppy, C89 that every older GCC only warned about (-Wimplicit-function-declarationbecame a hard error by default in GCC 14). Confirmed with the preprocessor (gcc -E) that the correctfile_querydeclaration really is reachable via the existing-I../include-style search path used at both of bjam's two build stages (the initialbootstrap/jam0bootstrap AND the subsequent fullb2build jam0 itself drives) -- it's just never actually included from this one file.Adding the missing
#include "../filesys.h"fixes both stages in one shot (a-Wno-error=...flag override only reaches the first stage, since jam0's own Jam rules recompile the same sources a second time without inheriting it).Testing
Reproduced the failure and confirmed the fix on a real (if since-abandoned) dependency chain: initially needed for
py-quast@5.2.0pinningboost@1.56.0directly (that pin turned out to be vestigial and was removed in a separate PR, but this bjam bug is real and will hit anyone else buildingboost@1.56.0with a modern GCC).