Aww, you got me an intractable problem to solve! But my birthday isn’t until the end of the month!
Reproduces for me too, running Arch under Docker under WSL2 on Windows 11. (@swi, thank you SO MUCH for the detailed repro! You may want to add diffutils
to your package list, though, to avoid the not-found error from mkversion.sh - important, because the not-found causes unnecessary and distracting recompiles.)
Additionally,
touch PGO-data/pgo-run.stamp && ninja core
continues to reproduce the bug, but the following clears it:
rm -rf PGO-data && ninja core
meaning that the only difference between a working build and a buggy one (for me, at least) is the PGO profile data. In fact, I’ve got a PGO-data.buggy
and PGO-data.working
in this directory, and swapping between which one I’m using for the final compile does exactly what you’d expect. Continuing to dig, but here’s a question for you, @jan - what do you think might be different about the first time a PGO benchmark is run in a given directory that wouldn’t apply to any subsequent runs? Does swipl do any first-time optimizations the first time it runs that it would cache for subsequent runs?