to produce weird symbols (e.g. 'P+>��' => 1,) which causes m4 to wrongly complain:
m4:/tmp/XXXXXXXXXX/traces.m4:XXX: ERROR: end of file in string
(The first Xs stand for 'am4tPIbHoM', and the second 3 Xs for '198' in the example above, but they're random in most cases.)
I realized that this error is related to the extreme 'performance' optimization flags I'm testing to build packages, and it took me a lot of time to isolate particular flags and packages which caused this problem.
Having examined musl, perl, autoconf, automake and m4 it seems that the error is unrelated to these tools.
This isn't an issue anymore as I managed to solve it recently, but I thought that it might be interesting for you (or anyone passing by) to see how an extremely (even dangerously) optimized toybox can prevent running autoreconf (with build.sh, bootstrap.sh and autogen.sh being the most scripts that rely on it) in musl-based chroots.
The flags that toybox shouldn't be built with to solve the error above are:
CFLAGS:
1- -flto
2- -fno-common
LDFLAGS:
1- -Wl,-z,now,-z,relro
Here's a log showing what the error above looks like, when attempting to run ./autogen.sh (in particular at the autoconf -v step) in the latest xz (version 5.2.5) source directory:
148 could indeed be the culprit, but what I don't understand is the effect of the flags mentioned above on this issue, and why not using them results in no errors.
I've encountered this error when attempting to
autoreconf
packages while inside a musl-based chroot environment containingtoybox
.The error causes the output of
autoconf -v
which in turn runs:to produce weird symbols (e.g.
'P+>��' => 1,
) which causesm4
to wrongly complain:(The first Xs stand for 'am4tPIbHoM', and the second 3 Xs for '198' in the example above, but they're random in most cases.)
I realized that this error is related to the extreme 'performance' optimization flags I'm testing to build packages, and it took me a lot of time to isolate particular flags and packages which caused this problem.
Having examined
musl
,perl
,autoconf
,automake
andm4
it seems that the error is unrelated to these tools.This isn't an issue anymore as I managed to solve it recently, but I thought that it might be interesting for you (or anyone passing by) to see how an extremely (even dangerously) optimized
toybox
can prevent runningautoreconf
(withbuild.sh
,bootstrap.sh
andautogen.sh
being the most scripts that rely on it) in musl-based chroots.The flags that
toybox
shouldn't be built with to solve the error above are:CFLAGS: 1-
-flto
2--fno-common
LDFLAGS: 1-
-Wl,-z,now,-z,relro
Here's a log showing what the error above looks like, when attempting to run
./autogen.sh
(in particular at theautoconf -v
step) in the latestxz
(version5.2.5
) source directory:Here's what the correct output should look like (when not using the flags above, and in other chroots):