From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 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 4A83CBC37 for ; Sun, 27 Sep 2009 22:58:34 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnUCAPJuv0rRVdvckGdsb2JhbACaQz8BAQEBCQkMBxMDp0kKgSqNaQEDAgWEGQWIOA X-IronPort-AV: E=Sophos;i="4.44,461,1249250400"; d="scan'208";a="47388517" Received: from mail-ew0-f220.google.com ([209.85.219.220]) by mail4-smtp-sop.national.inria.fr with ESMTP; 27 Sep 2009 22:58:34 +0200 Received: by ewy20 with SMTP id 20so3816526ewy.44 for ; Sun, 27 Sep 2009 13:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=zdkpsQd8QqGPx/wH4hHKRso+8hjB/UBPSdmfsXCO/mM=; b=peXSj5W7ZrN9e8/TTCZfGBdRNBjL6S9r1Vt5P76KBLJ4h79Mk3RGiTFmPDHdU6BJtD 8d5eeaXQ4BkX+YPdpT/mTvjHlLO1rCiD+DZJJvct+7+1D9XNHlJFzcliQ7Gf18Ww4Qzo lNQCblXnrRAibJ90BII7xy9HDPv5wpq8NqRTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=adxhZMjRX8Gylb1nQh70RvAhIuZqW2zOwza1nmU/63TgNoZs+GUohiGqaMI4739u7z XDhwJb/+ScMwQR23usxwtQJfUcfyQs91s5RW/3wVfo2z40AT/TqXdm9TASAoqgHPL7vU 0IabHf67WND6qUolmkDLFxh9ZFgBrhVwolKns= Received: by 10.211.160.4 with SMTP id m4mr2875236ebo.24.1254085113050; Sun, 27 Sep 2009 13:58:33 -0700 (PDT) Received: from ?192.168.1.12? (231.40.197-77.rev.gaoland.net [77.197.40.231]) by mx.google.com with ESMTPS id 7sm234139eyb.36.2009.09.27.13.58.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 27 Sep 2009 13:58:32 -0700 (PDT) Message-ID: <4ABFD1F4.8080606@gmail.com> Date: Sun, 27 Sep 2009 22:58:28 +0200 From: Matthieu Dubuget Reply-To: matthieu.dubuget@gmail.com User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Pre-processor sub-process Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 mingw:01 ocaml:01 uname:01 cpp:01 cpp:01 flags:01 ocamlc:01 -verbose:01 -pp:01 flags:01 ml':01 Hello, I'm trying to have bin-prot compiled with mingw version of OCaml with the original OCamlMakefile. This fails on my computer. I reproduced the problem here: On linux, there is no problem: $ uname Linux $ echo $BIN_PROT_CPP cpp $ echo $pp $BIN_PROT_CPP $ARCH_FLAGS $ ocamlc -c -verbose -pp "echo $pp && $pp" write_ml.ml + echo $BIN_PROT_CPP $ARCH_FLAGS && $BIN_PROT_CPP $ARCH_FLAGS 'write_ml.ml' > /tmp/camlppf6e35a cpp File "write_ml.ml", line 33, characters 0-11: Error: Unbound module Common Ok. If I cat /tmp/camlppf6e35a, I can check that write_ml.ml was actually pre-processed by cpp. On cygwin: $ uname CYGWIN_NT-5.1 $ echo $BIN_PROT_CPP cpp $ echo $pp $BIN_PROT_CPP $ARCH_FLAGS $ ocamlc -c -verbose -pp "echo $pp && $pp" write_ml.ml + echo $BIN_PROT_CPP $ARCH_FLAGS && $BIN_PROT_CPP $ARCH_FLAGS "write_ml.ml" > c:\DOCUME~1\matt\LOCALS~1\Temp\camlpp8a6978 $BIN_PROT_CPP $ARCH_FLAGS '$BIN_PROT_CPP' n'est pas reconnu en tant que commande interne ou externe, un programme excutable ou un fichier de commandes. File "write_ml.ml", line 1, characters 0-1: Error: Preprocessor error It seems that when the pre-processor is called, the environment is not given to the sub-process? Can anybody reproduce this problem (or better: provide a solution), or did I something bad? P.S. Both tests are with a Godi installed 3.11.1 ocaml. Thanks Matt