smlnj: Unable to build LLVM when running `build.sh`

Version

2022.1 (latest)

Operating System

  • Any
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

Ubuntu 20.04.6 LTS (Focal Fossa)

Processor

  • Any
  • Arm (using Rosetta)
  • x86-64 (64-bit)
  • Other

System Component

Installation

Severity

Major

Description

When I try to build SML from source in GitHub Codespaces, using the step provided in the README file, it shows the error that it is unable to build LLVM.

Here is the machine configuration I was building it on:

  • 2 Core
  • 4GB RAM
  • 32GB Storage

I tried even changing it to a 4 Core, 8GB RAM configuration and built it again, but the same error comes up.

I first tried to run the latest version (2022.1), but I also tried version 110.99.3, but it still did not build.

Transcript

....
-- Configuring done (27.4s)
-- Generating done (1.0s)
-- Build files have been written to: /workspaces/F29FA-Assignment1/smlnj/llvm/build
build-llvm.sh: building on 2 cores
  make -j 2 install
./build-llvm.sh: 139: time: not found
./build.sh: !!! Unable to build LLVM
image

Expected Behavior

To build successfully, and I should be able to see the SML window when I run the sml command on the terminal.

Terminal window showing a successful output when the 'sml' command is run

Steps to Reproduce

  1. Cloning the git repository
    git clone https://github.com/smlnj/smlnj
    
  2. cd to the cloned repository
    cd smlnj
    
  3. Get the boot files
    curl -O https://smlnj.org/dist/working/$VERSION/boot.amd64-unix.tgz #For the latest version
    
    curl -O https://smlnj.org/dist/working/110.99.3/boot.amd64-unix.tgz #For the previous version that supports Linux
    
  4. Build the installation
    ./build.sh
    

Additional Information

I was trying to setup the environment for running the SML code in GitHub Codespaces so that I can demo my code when needed to run and explain it.

If I know the method to do so, I can build the container so that I can create a new environment anytime and run when needed.

Email address

73425927+cr2007@users.noreply.github.com

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 24 (16 by maintainers)

Most upvoted comments

From your original post, the “time: not found” error is occurring for the line

time make -j $NPROCS install

you could edit the script and remove the “time” command.

W.r.t., the 110.99.3 build, the sml executable is in the bin directory, so you should try ./bin/sml.