From: Alain Frisch <alain@frisch.fr>
To: Joel Stanley <jstanley@galois.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Dynamic libs w/ Ocaml + C code under Mac OS X
Date: Tue, 05 Feb 2008 22:00:03 +0100 [thread overview]
Message-ID: <47A8CE53.40500@frisch.fr> (raw)
In-Reply-To: <EC9F97A0-9252-48A4-B097-36A45E433BED@galois.com>
Joel Stanley wrote:
> Actually, I do want a stand-alone shared library that includes the OCaml
> runtime, but I don't think that changes the parameters of the problem
> much. Basically, I have an OCaml application that I'd like to wrap up
> (together with some C glue code) into a shared library for use by other
> applications.
Then, you should rather try something like:
ocamlopt -output-obj -o foo.so simple.ml wrapper.c
In the CVS version, -output-obj has been extended to allow producing
directly "standalone" .so/.dll libraries that can be loaded from C (or
anything else).
> The only real problem with the linker invocation above was the -I
> switch, as the linker doesn't support it.
If we simply remove the -I switch, then everything is ok?
> Hmm, -read_only_relocs still looks supported in the man page for ld
> under 10.5.
But does the linker really accept "-read_only_relocs suppress"?
http://developer.apple.com/releasenotes/DeveloperTools/RN-Id/index.html
seems to indicate the opposite.
> Anyone have any ideas as to how I could remedy the situation? At this
> point it looks like I might have to switch the platform the application
> I'm working on is used with, due to this linking problem alone. There
> shouldn't be a need for the code generators to produce PIC as long as
> the linker does the right thing, correct?
Yes, correct.
00 Akaub
next prev parent reply other threads:[~2008-02-05 21:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 22:39 Joel Stanley
2008-02-05 4:52 ` [Caml-list] " Alain Frisch
2008-02-05 16:39 ` Joel Stanley
2008-02-05 21:00 ` Alain Frisch [this message]
2008-02-05 21:19 ` Joel Stanley
2008-02-05 21:49 ` Alain Frisch
2008-02-06 0:02 ` Joel Stanley
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=47A8CE53.40500@frisch.fr \
--to=alain@frisch.fr \
--cc=caml-list@yquem.inria.fr \
--cc=jstanley@galois.com \
/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