Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install SML Server in my machine. After following all the instructions (located here and at this book at 2.2 chapter) I try to configure Apache by adding a new module like this:

A new sml.conf file was added with:

<IfModule mod_sml.c>
      AddHandler sml-module .sml
      SmlPrjId "web"
      SmlPath "/usr/lib/smlserver/www/"
      SmlInitScript "/usr/lib/smlserver/web_sys/init.sml"

and the new sml.load file with the following data:

LoadModule sml-module /usr/lib/apache2/modules/

The library was taken from here.

Then when trying to restart Apache I receive these error message:

sudo apache2ctl restart
apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax
     error on line 1 of /etc/apache2/mods-enabled/sml.load: Cannot load
         /usr/lib/apache2/modules/ into server:
         /usr/lib/apache2/modules/ undefined symbol: log

Any ideas/suggestions are greatly appreciated.

share|improve this question
Suggestion: It may help if you add the link to instructions where you are "following all the instructions". – Jamess Jun 11 '11 at 4:44
@Jamess done :) – foobar Jun 11 '11 at 4:49
  1. That package is for 32-bits systems. You're not having that problem, because you do not get a warning about "Wrong ELF class".
  2. That package was released 12 April 2007 (according to their download page and subversion repository).
  3. I suspect that the module was built for Apache 2.0.x and not 2.2.x. The next Apache version after 12 April 2007 is Apache 2.2.6 and 2.0.61.

Instructions for building it from source:

  1. Install some requirements:

    sudo apt-get install subversion build-essential apache2-threaded-dev mlton smlnj bison flex
  2. Download the source tree for that version (about 25MB download size, 60MB disk space used after download):

    svn co mlkit-4.3.2
  3. Start with a prerequisite: mlkit. Run the below commands:

    cd mlkit-4.3.2
    • If you do not have a previous mlkit install, run:

      make nj

      For some reason, the above steps fails on my machines (64-bit Natty and 32-bit Lucid). The message is:

      Error: GenOpcodes.sml 20.60.
        Function applied to incorrect argument.
          expects: [<equality>] * [<equality>]
          but got: [<non-equality>] * [<non-equality>]
          in: = (OS.Process.system ("mv " ^ sou  ...   OS.Process.success)

      If it fails for you too, do not continue.

    • If you do have a mlkit install, run:

      ./configure --with-compiler=mlkit
      make mlkit
  4. If the previous step completed without fatal errors, continue running the next commands:

    make bootstrap
    make mlkit_libs
  5. Install to /usr/local:

    sudo make install
  6. Next, the SML server:

    ./configure --enable-SMLserver --with-apxs="$(which apxs2)" --with-compiler="$(which mlkit)"
    make smlserver
    make smlserver_libs
  7. Install the library:

    sudo make install_smlserver
    sudo cp /usr/local/lib/smlserver/lib/ /usr/lib/apache2/modules/
    echo "LoadModule sml_module /usr/lib/apache2/modules/" | sudo tee /etc/apache2/mods-available/sml.load
  8. Create the file /etc/apache2/mods-available/sml.conf with the following content:

    <IfModule mod_sml.c>
      AddHandler sml-module .sml
      SmlPrjId "web"
      SmlPath "/home/mael/web/www/"
      SmlInitScript "/home/mael/web/www/../web_sys/init.sml"
    #<Directory /home/mael/web/www/web/secret>
    #  SetHandler None
    #  RewriteEngine On
    #  RewriteBase /web/secret
    #  RewriteRule .* pub.sml
  9. Enable the module and restart the server:

    sudo ln -sf /etc/apache2/mods-available/sml.conf /etc/apache2/mods-enabled/sml.conf
    sudo ln -sf /etc/apache2/mods-available/sml.load /etc/apache2/mods-enabled/sml.load
    sudo /etc/init.d/apache2 restart

This guide was compiled from:

share|improve this answer
First of all I would like to thank you for your time! Step 3. failed with the same error message as yours, although I have already mlkit install (I don't remember since when), as you can see here: mlkit -v MLKit 4.3.2 (rev 2220; 2007-04-12) [X86 Backend]. Also, are you suggesting that I should downgrade my current Apache 2.2.x version for an older one? – foobar Jun 11 '11 at 10:03
In that case, could you try the new steps? If it's still fruitless, you could try downgrading Apache, but that'll be your last resort. – Lekensteyn Jun 11 '11 at 10:30
No next steps fail also. Step 7 for example doesn't work because GenOpcodes.sml file wasn't compiled. I.e. the errors I get when trying make smlserver are: make[2]: Entering directory '/home/monra/mlkit-4.3.2/src/Tools/GenOpcodes' /usr/bin/mlkit -output kitgen_opcodes Stopping compilation due to errors. SysErr: No such file or directory [noent] make[2]: *** [kitgen_opcodes] Error 1 – foobar Jun 12 '11 at 12:50
I'm out of ideas, sorry. I do not master the SML language, perhaps you can debug that file? – Lekensteyn Jun 12 '11 at 13:03
I tried debugging the file. But unfortunately that created more bugs in other files. Anyway, thank you very much for your time. – foobar Jun 12 '11 at 13:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.