Skip to content

ml-build fails on Windows with error #58

Description

@JohnReppy

Version

110.99.2

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

other x64 Windows 11

Processor

Other

Component

Core system

Severity

Minor

Description of the problem

ml-build fails with the error that it cannot find XYZ_XXX_BOOTLIST. I think it might be because of either the space or the parenthesis in the default install path.

Steps to repro:

  1. Download installer from https://smlnj.org/dist/working/110.99.2/smlnj-110.99.2.msi
  2. Install SMLNJ to the default location: C:\Program Files (x86)\SMLNJ.
  3. Create a file sources.cm and add the content below.
  4. Create a file main.sml and add the content below.
  5. Open cmd.exe or powershell and run ml-build sources.cm Main.main out.
    Fix:
    I think you can double quote around the %COMSPEC% command like so in ml-build.bat:
    %COMSPEC% /C ""%SMLNJ_HOME%\bin\sml.bat" %flags% %setup% @cmbuild %root% %cmfile% %heap% %listfile% %linkargsfile%"

Transcript

C:\source\repos\smlnj-windows-build-repro>ml-build sources.cm Main.main out
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Compilation failed with error.
Could Not Find C:\source\repos\smlnj-windows-build-repro\XYZ_XXX_BOOTLIST
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

Expected Behavior

No response

Steps to Reproduce

sources.cm:

Group is
    $/basis.cm
    main.sml

main.sml:

structure Main =
struct
  fun main (name, args) =
    (print "Hello World!\n"; OS.Process.success)
end

Additional Information

No response

Email address

harrygifford92@gmail.com

Comments from smlnj-gforge

Original smlnj-gforge bug number 301

Submitted via web form by Harry Gifford harrygifford92@gmail.com on 2022-01-27 at 02:18:00

Keywords: Windows, ml-build

comment by Shakil Ahmed on 2022-02-08 00:16:00 +000 UTC

I reproduced the error and then edited the %COMSPEC% command in ml-build file as mentioned.

Then build was successful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompilerproblem with compilerfixed-in-110.99.3issues that will be fixed in the 110.99.3 versiongforgebug (or feature request) ported from smlnj-gforge repositorywindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions