caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dmitriy Kargapolov <dmitriy.kargapolov@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Dynlink ocamlfind problem
Date: Tue, 13 Oct 2009 22:36:40 -0400	[thread overview]
Message-ID: <63caf42f0910131936o6e8ccab2m5f898478770b9107@mail.gmail.com> (raw)

Hi All,
This already was discussed but in context of Win32/Cygwin.
I found similar behaviour in Unix environment.
Playing with ocamlfind command I found that option "-package dynlink"
didn't add anything to the generated build command, but other
packages, extlib for example, did that.
Looks like problem with ocamlfind.

test1:

$ ocamlfind ocamlopt -verbose -o test test.ml -linkpkg
Effective set of compiler predicates: autolink,native
+ ocamlopt.opt -verbose -o test test.ml
+ as -o 'test.o' '/tmp/camlasm635817.s'
+ as -o '/tmp/camlstartupdd953f.o' '/tmp/camlstartup783576.s'
+ gcc -o 'test'   '-L/usr/lib/ocaml' '/tmp/camlstartupdd953f.o'
'/usr/lib/ocaml/std_exit.o' 'test.o' '/usr/lib/ocaml/stdlib.a'
'/usr/lib/ocaml/libasmrun.a' -lm  -ldl


test2:

$ ocamlfind ocamlopt -verbose -o test test.ml -linkpkg -package dynlink
Effective set of compiler predicates: pkg_dynlink,autolink,native
+ ocamlopt.opt -verbose -o test test.ml
+ as -o 'test.o' '/tmp/camlasmc8032e.s'
+ as -o '/tmp/camlstartup436e2c.o' '/tmp/camlstartup632e4c.s'
+ gcc -o 'test'   '-L/usr/lib/ocaml' '/tmp/camlstartup436e2c.o'
'/usr/lib/ocaml/std_exit.o' 'test.o' '/usr/lib/ocaml/stdlib.a'
'/usr/lib/ocaml/libasmrun.a' -lm  -ldl


test3:

$ ocamlfind ocamlopt -verbose -o test test.ml -linkpkg -package extlib
Effective set of compiler predicates: pkg_extlib,autolink,native
+ ocamlopt.opt -verbose -o test -I /usr/lib/ocaml/extlib -ccopt
-I/usr/lib/ocaml/extlib -ccopt -L/usr/lib/ocaml/extlib
/usr/lib/ocaml/extlib/extLib.cmxa test.ml
+ as -o 'test.o' '/tmp/camlasmf474f8.s'
+ as -o '/tmp/camlstartup453a69.o' '/tmp/camlstartupe0a59a.s'
+ gcc -o 'test'   '-L/usr/lib/ocaml/extlib' '-L/usr/lib/ocaml'
'/tmp/camlstartup453a69.o' '/usr/lib/ocaml/std_exit.o' 'test.o'
'/usr/lib/ocaml/extlib/extLib.a' '/usr/lib/ocaml/stdlib.a'
'/usr/lib/ocaml/libasmrun.a' -lm  -ldl -I/usr/lib/ocaml/extlib
-L/usr/lib/ocaml/extlib

Note that I have this dynlink installed:

$ ocamlfind query dynlink -l
package:     dynlink
description: Dynamic loading and linking of object files
version:     [distributed with Ocaml]
archive(s):
linkopts:
location:    /usr/lib/ocaml

I have all latest packages from fedora11 distribution:

$ rpm -qa ocaml\* |sort
ocaml-3.11.0-3.fc11.i586
ocaml-camlp4-3.11.0-3.fc11.i586
ocaml-camlp4-devel-3.11.0-3.fc11.i586
ocaml-extlib-1.5.1-6.fc11.i586
ocaml-extlib-devel-1.5.1-6.fc11.i586
ocaml-findlib-1.2.3-6.fc11.i586
ocaml-findlib-devel-1.2.3-6.fc11.i586
ocaml-omake-0.9.8.5-7.fc11.i586
ocaml-runtime-3.11.0-3.fc11.i586
ocaml-sexplib-4.2.7-2.fc11.i586
ocaml-sexplib-devel-4.2.7-2.fc11.i586
ocaml-type-conv-1.6.7-1.fc11.i586

$ cat /usr/lib/ocaml/dynlink/META
# Specifications for the "dynlink" library:
requires = ""
version = "[distributed with Ocaml]"
description = "Dynamic loading and linking of object files"
directory = "^"
browse_interfaces = " Btype Bytesections Clflags Config Consistbl Dll
Dynlink Ident Meta Misc Opcodes Path Predef Runtimedef Symtable Tbl
Types "
archive(byte) = "dynlink.cma"


             reply	other threads:[~2009-10-14  2:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14  2:36 Dmitriy Kargapolov [this message]
2009-10-14 19:09 ` Dmitriy Kargapolov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63caf42f0910131936o6e8ccab2m5f898478770b9107@mail.gmail.com \
    --to=dmitriy.kargapolov@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).