-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile skips generating certain files when building smlnj-mlton
from scratch
#519
Comments
There probably are some missing dependencies for the non-MLton bootstrap builds. The |
Actually, I think it suffices to add |
Closes MLton#519 SML/NJ CM, indirectly through the `ml-makedepend` tool, requires all source files mentioned in scanned `.cm` files to exist. Ensure that the generated source files (e.g., `../lib/stubs/mlton-stubs/pre-mlton.sml`, `control/version.sml`, and `front-end/*`) exist before trying to generate $(MLTON_OUTPUT_SMLNJ_HEAP).d.
Interesting. Am I understanding correctly that none of {
Great! Happy to test this later on my machine. |
Yes, in the absence of By "removing these as dependencies", you mean to remove their mention from the top-level |
Just tested #520 and
I think that would be helpful, or at least, it would have been helpful for me in this case. I assumed I needed to use By the way, even after #520, the command
It seems like perhaps there's some divergence between |
Yes, MLton's |
I'm on a fresh install of Ubuntu 22.04 and am attempting to build
smlnj-mlton
from scratch. I have SML/NJ version 110.99.4.By "from scratch" I mean that I don't have easy access to an existing
mlton
binary on this machine, nor do I have access to MLton'smllex
andmlyacc
. This is because, AFAIK, at the moment unfortunately there is not amlton
package available for Ubuntu 22.04. I've tried a couplemlton
binaries from a prior release, but none of these have worked out-of-the-box for me, yet.So, I'm trying to build
smlnj-mlton
using only what is available from SML/NJ. In particular, instead ofmllex
andmlyacc
, I'm trying to use SML/NJ'sml-lex
andml-yacc
.I eventually managed to get this to succeed, but only with a workaround.
TL;DR: the Makefile seems to not automatically generate files such as
lib/stubs/mlton-stubs/pre-mlton.sml
,mlton/control/version.sml
, etc. My workaround was essentially tomake
these explicitly before doingmake smlnj-mlton
.Error details
I tried this command:
We soon hit an error:
Both
dirs
andruntime
targets appeared to build successfully. The error is this:And, this is not the only file missing. We're also missing
control/version.sml
and variousfront-end/...
files.I tried to figure out how to modify the Makefile to fix this, but I'm not much of a Makefile expert and got a bit lost in the weeds.
Workaround
The following sequence seems to work. The idea is to just build the list of generated files explicitly before getting to the
smlnj-mlton
target.One funky thing that took me a while to figure out is that we need to do
git restore mlton/front-end/*.boot
after building the front-end lex/grm stuff. These targets appear to overwrite the.boot
files, which in turn causes a build error somewhere deeper withinmake smlnj-mlton
.(Specifically, if we don't
git restore
these files, we get the errorfront-end/ml.lex.sml:10829.20-10829.37 Error: unbound structure: Unsafe ...
)I don't know what the
.boot
files are, but restoring them to their unmodified contents seemed to work... 😅The text was updated successfully, but these errors were encountered: