From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 6E1CBBBAF for ; Fri, 25 Dec 2009 01:24:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8AAKKVM0ujAQKnkWdsb2JhbACDbJdtAQEBAQkLCgcTBapXjxGBL4IuVgQ X-IronPort-AV: E=Sophos;i="4.47,452,1257116400"; d="scan'208";a="52762280" Received: from relay6.mail.ox.ac.uk ([163.1.2.167]) by mail4-smtp-sop.national.inria.fr with ESMTP; 25 Dec 2009 01:24:45 +0100 Received: from smtp1.mail.ox.ac.uk ([129.67.1.207]) by relay6.mail.ox.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1NNxz2-0000Qy-LJ for caml-list@yquem.inria.fr; Fri, 25 Dec 2009 00:24:44 +0000 Received: from host86-155-71-221.range86-155.btcentralplus.com ([86.155.71.221] helo=[192.168.1.4]) by smtp1.mail.ox.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NNxz2-000521-48 for caml-list@yquem.inria.fr; Fri, 25 Dec 2009 00:24:44 +0000 Subject: Funny problem with ocamlc -custom under Cygwin From: Mike Spivey To: caml-list@yquem.inria.fr Content-Type: text/plain; charset="UTF-8" Date: Fri, 25 Dec 2009 00:24:42 +0000 Message-ID: <1261700682.19386.0.camel@staysail> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Oxford-Username: spivey X-Spam: no; 0.00; ocamlc:01 -custom:01 cygwin:01 mingw:01 ocaml:01 cygwin:01 ocamlc:01 -custom:01 foo:01 foo:01 runtime:01 gcc:01 usr:01 gcc:01 symlink:01 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 foo.ml 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