Control: tags -1 + confirmed Control: retitle -1 mlton cannot rebuild itself on hppa or i386
On Thu, Jan 06, 2022 at 07:55:00PM +0000, John David Anglin wrote:
> It fails with a reproducible segmentation fault.
I can reproduce this even with the latest upstream HEAD on the hppa
porterbox, using
make BOOTSTRAP_STYLE=3
which makes it this far:
-----8<---------
make compiler SELF_COMPILE=true CHECK_FIXPOINT=true # tools2 + mlton2 ->
mlton3; mlton3 == mlton2
[...]
chmod -w front-end/mlb.grm.*
sed \
-e "s/MLTON_NAME/MLton/" \
-e "s/MLTON_VERSION/????????/" \
< control/version_sml.src \
> control/version.sml
(cat control/version_sml.src; echo 'MLton' '????????'; cat control/version.sml)
| sha1sum | sed 's/.*\([a-z0-9]\{40\}\).*/\1/' > control/version_sml.chk
Compiling mlton
"/home/rak/mlton/build/bin/mlton" \
@MLton ram-slop 0.7 gc-summary -- \
-default-ann 'sequenceNonUnit warn' -default-ann 'warnUnused true'
-verbose 2 \
-target self -output mlton-compile \
mlton.mlb
MLton ???????? starting
Compile SML starting
frontend starting
parseAndElaborate starting
Segmentation fault
make[2]: *** [Makefile:72: mlton-compile] Error 139
make[2]: Leaving directory '/home/rak/mlton/mlton'
make[1]: *** [Makefile:75: compiler] Error 2
make[1]: Leaving directory '/home/rak/mlton'
make: *** [Makefile:29: all] Error 2
-----8<---------
On Thu, Jan 06, 2022 at 06:04:18PM -0600, Henry Cejtin wrote:
> ssume that it isn't reproducible on AMD, right?
> Or better, x86 (32 bit)?
Not reproducible on amd64, but it is reproducible on i386, even with
codegen c:
make BOOTSTRAP_STYLE=3 MLTON_COMPILE_ARGS='-codegen c'
segfaults at
-----8<---------
make compiler CHECK_FIXPOINT=false # tools0 + mlton0 ->
mlton1
make[1]: Entering directory '/home/rak/i386/mlton-20210117+dfsg'
make -C "/home/rak/i386/mlton-20210117+dfsg/mlton"
make[2]: Entering directory '/home/rak/i386/mlton-20210117+dfsg/mlton'
Compiling mlton
"mlton" \
@MLton ram-slop 0.7 gc-summary -- \
-verbose 2 \
-target self -output mlton-compile \
mlton-stubs.mlb
MLton 20210117+dfsg-3 starting
Compile SML starting
frontend starting
parseAndElaborate starting
Segmentation fault
-----8<---------
Is there any chance that the issue is due to a (potential) mismatch
between flags involving pic/pie we pass in via -cc-opt $(CFLAGS), and
the default target-determined default? mlton has the flags -pi-style and
-native-pic thanks to https://github.com/MLton/mlton/pull/365 that may
need setting. (I haven't yet investigated this.) Debian used to carry a
patch that forced PIC to fix a FTBFS on amd64, and I dropped it this
most recent release because I thought it was no longer required (mlton
built fine without it).
Alternatively, it might be easiest to bisect the upstream repository and
see when things broke.
Ryan
--
|)|/ Ryan Kavanagh | 4E46 9519 ED67 7734 268F
|\|\ https://rak.ac | BD95 8F7B F8FC 4A11 C97A
signature.asc
Description: PGP signature

