From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p1NFLiW2006993 for ; Wed, 23 Feb 2011 16:21:45 +0100 X-IronPort-AV: E=Sophos;i="4.62,212,1297033200"; d="scan'208,217";a="88536839" Received: from top.inrialpes.fr ([194.199.25.106]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 23 Feb 2011 16:21:39 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-42-192236174 From: Alan Schmitt In-Reply-To: Date: Wed, 23 Feb 2011 16:21:39 +0100 Cc: "'caml-list@inria.fr'" Message-Id: <455E8751-BA9F-47E5-8BAA-ABABE145822A@polytechnique.org> References: <2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org> <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org> To: David Allsopp X-Mailer: Apple Mail (2.1082) Subject: Re: [Caml-list] Specifying a framework to link with using ocamlopt? --Apple-Mail-42-192236174 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 23 f=E9vr. 2011, at 15:19, David Allsopp wrote: > It certainly is an invaluable platform debugging aid! ocamlmklib also sup= ports it - perhaps using it with the command which generates the library ma= y 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 suppres= s -o ./dllgl_stubs.so gl.wrap.o -L/Users/schmitta/godi/lib -framework OpenG= L=20=20=20 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_stu= bs + /Users/schmitta/godi/bin/ocamlopt -a -o GL.cmxa GL.cmx -cclib -lGL -ccop= t -L/Users/schmitta/godi/lib -ccopt -framework -ccopt OpenGL -cclib -lgl_s= tubs=20 I don't understand why ocamlmklib adds the "-lGL" here. (It does the same t= hing 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 ? >=20 > http://caml.inria.fr/mantis/view.php?id=3D4863 (see the notes, not the bu= g report) Ah, I haven't updated to 3.12 yet. Doing so ... So the warning have gone away, but the previous behavior still remains: oca= mlmklib inserts an extra "-lGL" when creating the library. Alan= --Apple-Mail-42-192236174 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
On 23 f=E9vr. 20= 11, at 15:19, David Allsopp wrote:

It certainly is an invaluable platform debugging aid! ocamlm= klib also supports it - perhaps using it with the command which generates t= he library may help further?

Duh= , I should have thought of this!

The problem does = not seem to come from gl_stubs:

[:)][top] % ocamlm= klib -verbose  -oc  gl_stubs  gl.wrap.o  -framework Ope= nGL
+ gcc -bundle -flat_namespace -undefined suppress -read_only_relocs = suppress -o ./dllgl_stubs.so gl.wrap.o -L/Users/schmitta/godi/lib -framewor= k OpenGL   
ld: warning: -read_only_relocs cannot be used= with x86_64
+ ar rc ./libgl_stubs.a  gl.wrap.o; ranlib ./libgl_stu= bs.a

but from GL.cmxa:
[:)][top] % ocamlmk= lib -verbose  -o  GL  GL.cmx  -framework OpenGL -lgl_st= ubs
+ /Users/schmitta/godi/bin/ocamlopt -a -o GL.cmxa  GL.cm= x -cclib -lGL -ccopt -L/Users/schmitta/godi/lib -ccopt -framework -ccopt Op= enGL  -cclib -lgl_stubs 

I don't underst= and why ocamlmklib adds the "-lGL" here. (It does the same thing with the G= lut archive.)

Is this a bug?

<= /div>
Could this be rela= ted to this warning:
ld: warning:= -read_only_relocs cannot be used with x86_64 ?

http://caml.inria.fr/ma= ntis/view.php?id=3D4863 (see the notes, not the bug report)

Ah, I hav= en't updated to 3.12 yet. Doing so ...

So the warn= ing have gone away, but the previous behavior still remains: ocamlmklib ins= erts an extra "-lGL" when creating the library.

Al= an
= --Apple-Mail-42-192236174--