When building both the current stable 8.0 and 9.0.11, *sometimes* the C code gets regenerated from .cmod (by precompile.pike, I guess) and then the macros in src/modules/Gmp/mpq.c change names from f_mpq_* to f_Gmp_mpq_* (and similarly in other modules), which in that case causes compilation to fail because mpq.cmod contains references to some of the generated function names, e.g. f_mpq_get_int(0) in cast(string). Any idea how this is happening and if it's supposed to happen and the function calls should be changed to match?
I think I figured out that precompile.pike takes a --base parameter, common_module_makefile.in uses it with $(MODNAME) as the value, and it's been this way for ages. In the source release tarballs, all files have the same timestamp, and what seems to have happened is that suddenly, make remakes targets with the same timestamp as their prerequisites. Or maybe one of the $(PMOD_TARGETS) somehow are older. The question now is why there seem to be several files in the source distribution generated with precompile.pike *without* --base.
Hi Magnus:
I think I figured out that precompile.pike takes a --base parameter, common_module_makefile.in uses it with $(MODNAME) as the value, and it's been this way for ages. In the source release tarballs, all files have the same timestamp, and what seems to have happened is that suddenly, make remakes targets with the same timestamp as their prerequisites. Or maybe one of the $(PMOD_TARGETS) somehow are older. The question now is why there seem to be several files in the source distribution generated with precompile.pike *without* --base.
The Makefile rule is (from common_module_makefile.in (Pike 9.0)):
| .cmod.c: | $(BUILD_BASE)/precompile.sh precompile.pike '--base=$(MODNAME)' $(PRECOMPILER_ARGS) >"$@" "$<" || { rm "$@"; exit 1; }
Note that src/modules/Gmp/Makefile.in contains the lines:
| # Reset the symbol prefix base to the empty string. | PRECOMPILER_ARGS="--base="
So the question is why the file is generated with a non-empty base for you. Please save the output from make(1) and identify the precompile command line used to regenerate mpq.c.
What implementation of make(1) are you using?
/grubba
I think I figured out that precompile.pike takes a --base parameter, common_module_makefile.in uses it with $(MODNAME) as the value, and it's been this way for ages. In the source release tarballs, all files have the same timestamp, and what seems to have happened is that
^^^^^^^^^^^^^^^^^^^^^^^ ???
| $ tar tvzf Pike-v9.0.11.tar.gz | grep mpq | -rw-r--r-- grubba/grubba 29544 2025-12-11 10:57 Pike-v9.0.11/src/modules/Gmp/mpq.cmod | -rw-r--r-- grubba/grubba 73115 2025-12-11 11:02 Pike-v9.0.11/src/modules/Gmp/mpq.c ^^^^^
Looks good to me...
I suspect that precompile.sh-stamp has been regenerated and that this triggers the regeneration.
/grubba
I see now that I misused the Debian package maintainer tools because I missed copying a configuration file from my old computer.
It would still be nice figuring out why PRECOMPILER_ARGS doesn't work, though.
pike-devel@lists.lysator.liu.se