Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Funny problem with ocamlc -custom under Cygwin
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-12-25 (00:24)
From: Mike Spivey <mike@c...>
Subject: Funny problem with ocamlc -custom under Cygwin
I'm using the MinGW version of OCaml 3.11.0 under Cygwin to build a
custom-linked executable.  The command

        ocamlc -custom -o foo.exe

produces the rather cryptic error message

        Access is denied.
        ** Fatal error: hd
        File "_none_", line 1, characters 0-1:
        Error: Error while building custom runtime system
This problem has a simple solution: Cygwin allows multiple versions of
gcc to coexist by making /usr/bin/gcc.exe a symlink
to /etc/alternatives/gcc, and making another symlink from there
to /usr/bin/gcc-3.exe. The flexdll tool that's used to link OCaml
programs won't tolerate this.  So you need to remove the
symlink /usr/bin/gcc.exe and copy /usr/bin/gcc-3.exe in its place.  Then
everything works as it should.

Seasonal best wishes to all!

-- Mike Spivey