[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | DESMONS Bertrand <bertrand.desmons@u...> |
| Subject: | [Caml-list] flexlink + lacaml (lapack) |
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 = <abstr>
# let str = input_line input;;
val str : string = "!<symlink>liblapack.dll.a\000"
# let str = input_line input;;
Exception: End_of_file.
# close_in input;;
- : unit = ()
# input;;
- : in_channel = <abstr>
#
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