Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm fairly new to Linux and compiling software from source. I am unsure what the output is telling me and where to look to find the solution to my problem.

I'm trying to install Moscow ML: http://www.itu.dk/~sestoft/mosml.html

As instructed in the documentation, I navigate to the directory where I have extracted it and type

make world

The full output is here: http://pastebin.com/UqNfsCnf

The last part of the output is:

gcc -O -DNDEBUG -o mosmlyac closure.o error.o lalr.o lr0.o main.o mkpar.o output.o reader.o skeleton.o symtab.o verbose.o warshall.o
strip mosmlyac
make[1]: Leaving directory `/home/user/Downloads/ml/mosml/src/mosmlyac'
cd mosmllib; make all
make[1]: Entering directory `/home/user/Downloads/ml/mosml/src/mosmllib'
/lib/cpp -P -traditional -Dunix -Umsdos Array.mlp > Array.sml
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Vector.sig
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Array.sig
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes List.sig
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Array.sml
*** glibc detected *** ../camlrunm: free(): invalid pointer: 0x00000000012e6000 ***
======= Backtrace: =========
/lib64/libc.so.6[0x33af07da76]
../camlrunm(alloc_shr+0x3d6)[0x40a336]
../camlrunm[0x409b3c]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409bb5]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm[0x409b8f]
../camlrunm(minor_collection+0x80)[0x409cc0]
../camlrunm(interprete+0x21bd)[0x407d7d]
../camlrunm(main+0x2eb)[0x40599b]
/lib64/libc.so.6(__libc_start_main+0xed)[0x33af02169d]
../camlrunm[0x405b01]

followed by a memory map and

make[1]: *** [Array.uo] Aborted (core dumped)
make[1]: Leaving directory `/home/matthew/Downloads/ml/mosml/src/mosmllib'
make: *** [world] Error 2

Any ideas on what I can do to make this work? Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I just ran into this same issue. There is a file named gc_ctrl.c.1 in the runtime directory. Make a backup of the existing gc_ctrl.c file in that directory and then copy this one over it. After doing that my build worked. There's a note about this on the MosML site, but they link to the wrong replacement file.

# From src/ directory

# Make backup and move new file into place
cp runtime/gc_ctrl.c runtime/gc_ctrl.c.bak
cp runtime/gc_ctrl.c.1 runtime/gc_ctrl.c

# Cleanup previous compiled files and rebuild.
make clean 
make world

# If previous was successful and you want to install it
sudo make install 
share|improve this answer
    
Thanks! That fixed it! –  Froskoy Jun 19 '13 at 10:27

Your Answer

 
discard

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.