From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: David Allsopp <dra-news@metastack.com>
Cc: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: [Caml-list] Specifying a framework to link with using ocamlopt?
Date: Wed, 23 Feb 2011 16:21:39 +0100 [thread overview]
Message-ID: <455E8751-BA9F-47E5-8BAA-ABABE145822A@polytechnique.org> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9490F78E2@Remus.metastack.local>
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
On 23 févr. 2011, at 15:19, David Allsopp wrote:
> It certainly is an invaluable platform debugging aid! ocamlmklib also supports it - perhaps using it with the command which generates the library may help further?
Duh, I should have thought of this!
The problem does not seem to come from gl_stubs:
[:)][top] % ocamlmklib -verbose -oc gl_stubs gl.wrap.o -framework OpenGL
+ gcc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress -o ./dllgl_stubs.so gl.wrap.o -L/Users/schmitta/godi/lib -framework OpenGL
ld: warning: -read_only_relocs cannot be used with x86_64
+ ar rc ./libgl_stubs.a gl.wrap.o; ranlib ./libgl_stubs.a
but from GL.cmxa:
[:)][top] % ocamlmklib -verbose -o GL GL.cmx -framework OpenGL -lgl_stubs
+ /Users/schmitta/godi/bin/ocamlopt -a -o GL.cmxa GL.cmx -cclib -lGL -ccopt -L/Users/schmitta/godi/lib -ccopt -framework -ccopt OpenGL -cclib -lgl_stubs
I don't understand why ocamlmklib adds the "-lGL" here. (It does the same thing with the Glut archive.)
Is this a bug?
>> Could this be related to this warning:
>> ld: warning: -read_only_relocs cannot be used with x86_64 ?
>
> http://caml.inria.fr/mantis/view.php?id=4863 (see the notes, not the bug report)
Ah, I haven't updated to 3.12 yet. Doing so ...
So the warning have gone away, but the previous behavior still remains: ocamlmklib inserts an extra "-lGL" when creating the library.
Alan
[-- Attachment #2: Type: text/html, Size: 2696 bytes --]
next prev parent reply other threads:[~2011-02-23 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 13:10 Alan Schmitt
2011-02-23 13:33 ` Daniel Bünzli
2011-02-23 13:40 ` Daniel Bünzli
2011-02-23 14:12 ` Alan Schmitt
2011-02-23 13:59 ` David Allsopp
2011-02-23 14:21 ` Alan Schmitt
2011-02-23 14:19 ` David Allsopp
2011-02-23 15:21 ` Alan Schmitt [this message]
2011-02-23 15:48 ` David Allsopp
2011-02-23 16:08 ` Alan Schmitt
2011-02-23 16:08 ` David Allsopp
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=455E8751-BA9F-47E5-8BAA-ABABE145822A@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--cc=caml-list@inria.fr \
--cc=dra-news@metastack.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