Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] flexlink + lacaml (lapack)
@ 2009-04-07 14:56 DESMONS Bertrand
  2009-04-07 15:31 ` Alain Frisch
  0 siblings, 1 reply; 2+ messages in thread
From: DESMONS Bertrand @ 2009-04-07 14:56 UTC (permalink / raw)
  To: caml-list

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] flexlink + lacaml (lapack)
  2009-04-07 14:56 [Caml-list] flexlink + lacaml (lapack) DESMONS Bertrand
@ 2009-04-07 15:31 ` Alain Frisch
  0 siblings, 0 replies; 2+ messages in thread
From: Alain Frisch @ 2009-04-07 15:31 UTC (permalink / raw)
  To: bertrand.desmons; +Cc: caml-list

DESMONS Bertrand wrote:
> Hello,
> 
> Compiling a little program using Lacaml (in a cygwin shell) gives me the
> error:

The library file seems to be a symbolic link. flexlink is a regular 
Win32 application and does not know about this Cygwin-specific notion. 
The good news is that it can use the external command cygpath (that 
comes with Cygwin) to resolve such links (and more generally Cygwin 
paths). This is the default behavior for the cygwin toolchain, but not 
for mingw. Can you try passing "-ccopt -cygpath" to ocamlc?


Regards,

Alain


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-07 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-07 14:56 [Caml-list] flexlink + lacaml (lapack) DESMONS Bertrand
2009-04-07 15:31 ` Alain Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox