Skip to content
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

Installing Twelf w/ smackage & mlton : invalid file suffix on build/twelf-server-mlton.cm #30

Open
willardthor opened this issue Apr 14, 2020 · 3 comments

Comments

@willardthor
Copy link

willardthor commented Apr 14, 2020

Hi folks, I am trying to install Twelf with smackage, as described in the smackage readme. I am using the mlton compiler.

However, I am getting the following error. Any help would be appreciated.

$ smackage make twelf mlton
In directory: `/home/willard/.smackage/lib/twelf/v1.7.1'
smackage is preparing to run `make DESTDIR=/home/willard/.smackage mlton'
*************************************************
Twelf Server
*************************************************
rm -Rf src/frontend/buildid.sml
bin/buildid >src/frontend/buildid.sml
mltonversion=`mlton -default-ann 'nonexhaustiveMatch ignore' 2>&1 | awk 'NR==1 { print 0+$2 }'`;        \
if   [ $mltonversion -ge 20041109 ]; then                       \
        cmfileid="twelf-server-mlton.cm";                       \
elif [ $mltonversion="MLTONVERSION" ]; then                     \
        cmfileid="twelf-server-mlton.cm";                       \
else                                                            \
        echo; echo "Error: MLton >= 20041109 required"; echo;   \
        exit 1;                                                 \
fi;                                                             \
mlton -default-ann 'nonexhaustiveMatch ignore' -output bin/twelf-server build/${cmfileid}
invalid file suffix on build/twelf-server-mlton.cm
usage: mlton [option ...] file.{c|mlb|o|sml} [file.{c|o|s|S} ...]
    -align {8|4}                    object alignment
    -as-opt <opt>                   pass option to assembler
    -cc-opt <opt>                   pass option to C compiler
    -codegen {native|amd64|c|llvm}  which code generator to use
    -const '<name> <value>'         set compile-time constant
    -default-ann <ann>              set annotation default for mlb files
    -default-type '<ty><N>'         set default type
    -disable-ann <ann>              disable annotation in mlb files
    -export-header <file>           write C header file for _export's
    -ieee-fp {false|true}           use strict IEEE floating-point
    -inline <n>                     set inlining threshold
    -keep {g|o}                     save intermediate files
    -link-opt <opt>                 pass option to linker
    -llvm-as-opt <opt>              pass option to llvm assembler
    -llvm-llc-opt <opt>             pass option to llvm compiler
    -llvm-opt-opt <opt>             pass option to llvm optimizer
    -mlb-path-map <file>            additional MLB path map
    -mlb-path-var '<name> <value>'  additional MLB path var
    -output <file>                  name of output file
    -profile {no|alloc|count|time}  produce executable suitable for profiling
    -profile-branch {false|true}    profile branches in addition to functions
    -profile-stack {false|true}     profile the stack
    -profile-val {false|true}       profile val bindings in addition to functions
    -runtime <arg>                  pass arg to runtime via @MLton
    -show-basis <file>              write final basis environment
    -show-def-use <file>            write def-use information
    -stop {f|g|o|tc}                when to stop
    -target {self}                  platform that executable will run on
    -target-as-opt <target> <opt>   target-dependent assembler option
    -target-cc-opt <target> <opt>   target-dependent C compiler option
    -target-link-opt <target> <opt> target-dependent linker option
    -verbose {0|1|2|3}              how verbose to be
make: *** [Makefile:47: twelf-server-mlton] Error 1

$
@MatthewFluet
Copy link
Member

MLton dropped support for compiling SML/NJ-style .cm files some time ago. I thought that the twelf sources had been updated with some .mlb files. Perhaps the smackage description just needs updating.

@gian
Copy link
Member

gian commented Apr 16, 2020

Smackage's make command is pretty dumb and is really just shelling out to whatever makefile is present in the sources it obtains in the fetch step. Paging @robsimmons as he knows a lot more about how Twelf builds work :)

@robsimmons
Copy link
Member

Hello whoops — wanted to acknowledge seeing this, this is an update I or someone will need to make to the Twelf sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants