Bug 253607 - lang/mlton is broken
Summary: lang/mlton is broken
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2021-02-18 00:23 UTC by Bridger Dyson-Smith
Modified: 2021-02-19 02:02 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (beyert)


Note You need to log in before you can comment on or make changes to this bug.
Description Bridger Dyson-Smith 2021-02-18 00:23:57 UTC
Hi all - 

I hope that this is reported correctly. The latest pkg and port for lang/mlton doesn't seem to be working. After installing the pkg (or building the port), attempting to use the mlton compiler results in the following error:

$ mlton hello.sml
No such file or directory

My sample file is a simple example:

$ less hello.sml
(* hello.sml *)

fun hello () =
    print "Hello, world, from MLton!\n"
val _ = hello ()

I've tried to build the port with the same results. Additionally, I tried using SMLNJ to bootstrap the mlton build process, but that effort errored out with:

[00:00:10] Hit CTRL+t at any time to see build progress and stats
[00:00:10] [01] [00:00:00] Building lang/mlton | mlton-20100608_8
[00:00:10] [01] [00:00:00] Finished lang/mlton | mlton-20100608_8: Ignored: is marked as broken: mlton-20100608-20100608 does not bootstrap properly with smlnj
[00:00:10] Stopping 1 builders

For additional discussion, I tried to check in the MLton github issues; e.g. https://github.com/MLton/mlton/issues/433

Comment 1 Timothy Beyer 2021-02-18 22:50:40 UTC
I'll create an updated port based on a modern version using SML/NJ to compile, but going forward, I want to get a modern FreeBSD bootstrap version submitted to the mlton developers to compile a faster running version of mlton for i386 and amd64.

Sorry about the delay on this port, it just has been a while since I looked at the current build system of the project.  If you have any recommended methods, I'll investigate those first.
Comment 2 Bridger Dyson-Smith 2021-02-19 02:02:53 UTC
(In reply to Timothy Beyer from comment #1)
Tim - 

Thanks for your efforts. 

I did try bootstrapping the current mlton port (20100608_8) with SML/NJ, but received an error.

Additionally, I tried bootstrapping the *latest* MLton (20210117) with SML/NJ, using the following command:

gmake OLD_MLLEX=ml-lex OLD_MLYACC=ml-yacc bootstrap-smlnj

Unfortunately, that errors out with:

for d in basis basis/Real basis/Word gc platform util; do       \
        mkdir -p "/home/bridger/src/mlton-src/mlton-20210117/build/lib/mlton/include/$d";               \
        cp -fpR "/home/bridger/src/mlton-src/mlton-20210117/runtime/$d/"*.h "/home/bridger/src/mlton-src/mlton-20210117/build/lib/mlton/include/$d";             \
gmake[2]: Leaving directory '/usr/home/bridger/src/mlton-src/mlton-20210117'
gmake compiler CHECK_FIXPOINT=false                     # tools0 + mlton0 -> mlton1
gmake[2]: Entering directory '/usr/home/bridger/src/mlton-src/mlton-20210117'
No such file or directory
gmake -C "/home/bridger/src/mlton-src/mlton-20210117/mlton"
gmake[3]: Entering directory '/usr/home/bridger/src/mlton-src/mlton-20210117/mlton'
No such file or directory
No such file or directory
No such file or directory
No such file or directory
No such file or directory
(                                                                       \
        echo '$(SML_LIB)/basis/unsafe.mlb';                             \
        echo '$(SML_LIB)/basis/sml-nj.mlb';                             \
        echo '$(SML_LIB)/basis/mlton.mlb';                              \
        echo '$(SML_LIB)/basis/basis.mlb';                              \
        mlton -stop f mlton.mlb |                               \
                grep -v 'mlb$' |                                        \
                grep 'mlyacc';                                  \
        mlton -stop f ../lib/stubs/mlton-stubs/sources.mlb |    \
                grep -v 'mlb$' |                                        \
                grep 'mlton-stubs';                                     \
        mlton -stop f mlton.mlb |                               \
                grep -v 'mlb$' |                                        \
                grep -v 'sml/basis' |                           \
                grep -v 'targets' |                                     \
                grep -v 'mlyacc';                                       \
) > mlton-stubs.mlb
No such file or directory
No such file or directory
No such file or directory
gmake[3]: *** [Makefile:113: mlton-stubs.mlb] Error 1
gmake[3]: Leaving directory '/usr/home/bridger/src/mlton-src/mlton-20210117/mlton'
gmake[2]: *** [Makefile:75: compiler] Error 2
gmake[2]: Leaving directory '/usr/home/bridger/src/mlton-src/mlton-20210117'
gmake[1]: *** [Makefile:19: all] Error 2
gmake[1]: Leaving directory '/usr/home/bridger/src/mlton-src/mlton-20210117'
gmake: *** [Makefile:266: bootstrap-smlnj] Error 2

And... I'm not sure what to make of that! 

If there's anything I can provide to assist or help, please let me know. 
Thanks again for your time and trouble!