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=1.2 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id F2DF5BB84 for ; Mon, 28 Jul 2008 09:20:41 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnUDAHwQjUjAXQInYWdsb2JhbACLF4crFwUGBhSaWg X-IronPort-AV: E=Sophos;i="4.31,263,1215381600"; d="scan'208";a="15514276" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 28 Jul 2008 09:20:41 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6S7KeFG029630 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 28 Jul 2008 09:20:41 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHwQjUjAI/YN/2dsb2JhbACLF6JB X-IronPort-AV: E=Sophos;i="4.31,263,1215381600"; d="scan'208";a="15563208" Received: from pepe.inescn.pt ([192.35.246.13]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Jul 2008 09:20:40 +0200 Received: from localhost (pepe.inescn.pt [127.0.0.1]) by pepe.inescn.pt (8.13.8/8.13.8/5) with ESMTP id m6S7Kdbd002117 for ; Mon, 28 Jul 2008 08:20:39 +0100 X-Virus-Scanned: amavisd-new at inescporto.pt Received: from pepe.inescn.pt ([127.0.0.1]) by localhost (pepe.inescn.pt [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aah6hh1wPFxS for ; Mon, 28 Jul 2008 08:20:19 +0100 (WEST) Received: from [194.117.30.117] (merlinix.inescn.pt [194.117.30.117]) by pepe.inescn.pt (8.13.8/8.13.8/43) with ESMTP id m6S7KFdd002107 for ; Mon, 28 Jul 2008 08:20:15 +0100 Message-ID: <488D732E.9020600@inescporto.pt> Date: Mon, 28 Jul 2008 08:20:14 +0100 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: caml-list@inria.fr Subject: ocamlbuild: -use-runtime flag not working? Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 488D7348.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; -use-runtime:01 command-line:01 bytecode:01 -use-runtime:01 -verbose:01 parser:01 byte:01 bytecode:01 -custom:01 -verbose:01 parser:01 byte:01 -custom:01 ocaml:01 lib:01 Hello, I am attempting to use the MLCuDD library that gives me access to the CuDD C library. I order to use this library I did various successful experiments using the ocamlbuid command-line. Two examples are: # Bytecode, one option ocamlbuild -no-hygiene -Is $PROJ_PATH -lib cudd -cflags -I,/home/hugof/Desktop/cudd/ -lflags -I,/home/hugof/Desktop/cudd/,-use-runtime,/home/hugof/Desktop/cudd/cuddrun -verbose 100 src/parser.byte Bytecode, second option #ocamlbuild -no-hygiene -Is $PROJ_PATH -lib cudd -cflags -I,/home/hugof/Desktop/cudd/ -lflags -I,/home/hugof/Desktop/cudd/,-custom -verbose 100 src/parser.byte I assume that the use of "-custom" and "-use-runtime" are equivalent. I then proceeded to use the _tags and myocamlbuild.ml files. The contents of these are: cat _tags true: use_menhir, debug, profile : not_hygienic "src/parser.d.byte": use_unix, use_cudd cat myocamlbuild.ml open Ocamlbuild_plugin;; open Command;; dispatch begin function | After_rules -> (* add CuDD library as external library *) ocaml_lib ~extern:true ~dir:"/home/hugof/Desktop/cudd" "cudd"; (* CuDD is a C library. So handle native code linking correctly *) flag ["link"; "ocaml"; "byte" ; "use_cudd"] (*(S[A"-custom"]);*) (S[A"-use-runtime"; A"/home/hugof/Desktop/cudd/cuddrun"]); | _ -> () end;; Unfortunately, using the above files with the following command: PROJ_PATH="cudd,src" ocamlbuild -Is $PROJ_PATH -verbose 100 all.otarget fails with: + /home/hugof/ocaml/godi/bin/ocamlc.opt unix.cma -g -I /home/hugof/Desktop/cudd cudd.cma -use-runtime /home/hugof/Desktop/cudd/cuddrun src/parser.d.cmo -o src/parser.d.byte Error while linking /home/hugof/ocaml/godi/lib/ocaml/std-lib/unix.cma(Unix): The external function `unix_dup' is not available Command exited with code 2. However if I use (S[A"-custom"]); compilation succeeds. Am I doing anything wrong? TIA, Hugo Ferreira.