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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id DF985BBAF for ; Tue, 7 Apr 2009 16:57:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMBAKwF20nBvsFKmWdsb2JhbACWJQEBAQEBCAsKBxG4K4N9Bg X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="27220976" Received: from dnsp.umh.ac.be (HELO hermes1.umh.ac.be) ([193.190.193.74]) by mail1-smtp-roc.national.inria.fr with ESMTP; 07 Apr 2009 16:57:17 +0200 Received: from webmail.umh.ac.be (localhost [127.0.0.1]) by hermes1.umh.ac.be (8.14.2/8.13.6) with ESMTP id n37EuOjQ704614 for ; Tue, 7 Apr 2009 16:56:24 +0200 Received: from 86.208.86.61 (SquirrelMail authenticated user et040247); by webmail.umh.ac.be with HTTP; Tue, 7 Apr 2009 16:56:24 +0200 (DFT) Message-ID: <1491.86.208.86.61.1239116185.squirrel@86.208.86.61> Date: Tue, 7 Apr 2009 16:56:24 +0200 (DFT) Subject: [Caml-list] flexlink + lacaml (lapack) From: "DESMONS Bertrand" To: caml-list@yquem.inria.fr Reply-To: bertrand.desmons@umh.ac.be User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Scanned-By: MIMEDefang 2.64 on 193.190.193.76 X-Spam: no; 0.00; lacaml:01 lapack:01 lacaml:01 cygwin:01 ocamlfind:01 ocamlc:01 -package:01 -linkpkg:01 cygwin:01 lib:01 runtime:01 impl:01 compilation:01 ocamlfind:01 ocamlc:01 Hello, Compiling a little program using Lacaml (in a cygwin shell) gives me the error: | acer@PC~/UMH/Master 2 | $ ocamlfind ocamlc -package lacaml -linkpkg d.ml | ** Fatal error: Error while reading c:/cygwin/lib\liblapack.a: Sys_error("Invali | d argument") | File "d.ml", line 1, characters 0-1: |Error: Error while building custom runtime system Here is the file d.ml: | open Lacaml.Impl.D | | let f x = add x one | | let () = | let i = 3. in | let n = f i in | print_float n Verbosing the compilation command gives: | acer@PC~/UMH/Master 2 | $ ocamlfind ocamlc -package lacaml -linkpkg -verbose d.ml | Effective set of compiler predicates: pkg_bigarray,pkg_lacaml.core,pkg_lacaml,au | tolink,byte | + ocamlc.opt -verbose -I c:/Program Files/Objective Caml/lib/site-lib/lacaml -cc | opt -I"c:/Program Files/Objective Caml/lib/site-lib/lacaml" -ccopt -L"c:/Program | Files/Objective Caml/lib/site-lib/lacaml" C:/Program Files/Objective Caml/lib\b | igarray.cma c:/Program Files/Objective Caml/lib/site-lib/lacaml\lacaml.cma d.ml | + flexlink -chain mingw -exe -o "camlprog.exe" "-Lc:/Program Files/Objective C | aml/lib/site-lib/lacaml" "-LC:\Program Files\Objective Caml\lib" "C:\DOCUME~1\ac | er\LOCALS~1\Temp\camlprim6b3257.c" "-llacaml_stubs" "-llapack" "-lblas" "-lbigar | ray" "-lcamlrun" -lws2_32 -I"c:/Program Files/Objective Caml/lib/site-lib/lacaml | " -L"c:/Program Files/Objective Caml/lib/site-lib/lacaml" -Lc:/cygwin/lib | ** Fatal error: Error while reading c:/cygwin/lib\liblapack.a: Sys_error("Invali | d argument") | File "d.ml", line 1, characters 0-1: | Error: Error while building custom runtime system | ocamlc.opt returned with exit code 2 The file in question does exist, as Ocaml can read it: Objective Caml version 3.11.0 Findlib has been successfully loaded. Additional directives: #require "package";; to load a package #list;; to list the available packages #camlp4o;; to load camlp4 (standard syntax) #camlp4r;; to load camlp4 (revised syntax) #predicates "p,q,...";; to set these predicates Topfind.reset();; to force that packages will be reloaded #thread;; to enable threads # let input = open_in "C:/cygwin/lib\\liblapack.a";; val input : in_channel = # let str = input_line input;; val str : string = "!liblapack.dll.a\000" # let str = input_line input;; Exception: End_of_file. # close_in input;; - : unit = () # input;; - : in_channel = # So the problem seems to come from flexlink... I have no idea of what happens... It worked when I was with OCaml 3.10.2... Of course, I recompiled all the necessary when passing to 3.11. I'm running Windows XP, and as said above, compiling under Cygwin (but OCaml is the Win32/MinGW one). Thank you for any suggestions, Bertrand Desmons