What does this mean? I am trying to set ocaml-sqlite3 bindings to access the sqlite database fr...">

"The cma file is not a bytecode object file" => What does this mean?

I am trying to set ocaml-sqlite3 bindings to access the sqlite database from o'caml program.

Configuration and setup go smoothly, but the installation fails. Since the sqlite3.cma file is not an object bytecode file (see below).

    ~/Software/ocaml-sqlite3-release-1.5.6> sudo make install

[ -f *.so ] && SO_FILES=*.so; \
        ocamlfind install sqlite3 META sqlite3.cmi sqlite3.mli sqlite3.cma *.cmxa *.a *.cmx $SO_FILES
Installed /usr/lib64/ocaml/site-lib/sqlite3/dllsqlite3_stubs.so
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.cmx
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.a
Installed /usr/lib64/ocaml/site-lib/sqlite3/libsqlite3_stubs.a
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.cmxa
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.cma
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.mli
Installed /usr/lib64/ocaml/site-lib/sqlite3/sqlite3.cmi
Installed /usr/lib64/ocaml/site-lib/sqlite3/META
Updated /usr/lib64/ocaml/ld.conf
ocamlfind ocamlmktop -o sqlite3top -package "sqlite3" sqlite3.cma
The file sqlite3.cma is not a bytecode object file
make: *** [install] Error 2

What is the common reason for this and have you experienced this for this particular library? I am running ocaml v 3.11.1 compiled from source.

EDIT: It seems the file is provided by ocamlfind, maybe the problem is that I'm using environment 64?

+3
source share
2 answers

So, it seems that the problem came from different directions:

-, ocaml, ocamlfind, . , /usr/local/etc/findlib.conf. Ocamlc ocamlopt.opt, 3.10.

findlib. , 64 , , findlib -bindir -sitelib .

ocaml- -cc "gcc -m64", , - .

, -I sqlite3.cma(/usr/lib64/ocaml/site-lib/sqlite3).

, - : -).

+2

, ocaml (cma, cmo ..), ocaml. , , ocaml ( , 3.11.0 → 3.11.1).

, ocamlfind ocaml make make install?

+2

Source: https://habr.com/ru/post/1718240/


All Articles