Browse thread
custom toplevels and library errors
- Robert Cloud
[
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: | 2009-09-09 (04:28) |
From: | Robert Cloud <rcloud@g...> |
Subject: | custom toplevels and library errors |
Hello, I'm attempting to make a custom top level so that I can interface with some c functions. I can get it to work, but I get all kinds of errors when I try to load in the required libraries. here are the commands I'm attempting to create it with: linear_algebra.c contains c functions interfaced to from ocaml, funs.ml contains their ocaml declarations. gcc -c -I/usr/lib64/ocaml/ -I/usr/local/cuda/include/ linear_algebra.c ocamlfind ocamlc -custom -c -package bigarray,lacaml funs.ml ocamlfind ocamlmktop -custom -o cudatop -package bigarray,lacaml -linkpkg linear_algebra.o funs.cmo -cc nvcc -ccopt -lcublas This works, and I have an executable I can run to get a ocaml prompt, however, If I try to use the libraries I linked to create the top, I get an unbound module error. So actually loading them with the #load directive, or more usefully topfind, seems to "work" but the following errors are produced. Information on what is going wrong and what to do is very helpful. # #use "topfind";; - : unit = () 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 - : unit = () # #require "lacaml";; /usr/lib64/ocaml/bigarray.cma: loaded Cannot load required shared library dllbigarray. Reason: /usr/lib64/ocaml/stublibs/dllbigarray.so: /usr/lib64/ocaml/stublibs/dllbigarray.so: undefined symbol: caml_serialize_int_1. /usr/lib64/ocaml/lacaml: added to search path /usr/lib64/ocaml/lacaml/lacaml.cma: loaded Cannot load required shared library dlllacaml_stubs. Reason: /usr/lib64/ocaml/stublibs/dlllacaml_stubs.so: /usr/lib64/ocaml/stublibs/dlllacaml_stubs.so: undefined symbol: caml_string_length. /usr/lib64/ocaml/lacaml/lacaml_top.cma: loaded Cannot load required shared library dlllacaml_stubs. Reason: /usr/lib64/ocaml/stublibs/dlllacaml_stubs.so: /usr/lib64/ocaml/stublibs/dlllacaml_stubs.so: undefined symbol: caml_string_length.