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 q0DLQTEb006234 for ; Fri, 13 Jan 2012 22:26:29 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuUEAIugEE8+3JIEgWdsb2JhbABCnHqQNSIBARYmJYFyAQEEAQxiEAsLGA0hRRIrh2gCBrcFg32FBII5YwSOMYZhhVGMbw X-IronPort-AV: E=Sophos;i="4.71,506,1320620400"; d="diff'?scan'208";a="126851369" Received: from vs.philou.ch ([62.220.146.4]) by mail4-smtp-sop.national.inria.fr with ESMTP; 13 Jan 2012 22:26:24 +0100 Received: from [192.168.1.102] (80-218-99-84.dclient.hispeed.ch [80.218.99.84]) by vs.philou.ch (Postfix) with ESMTPSA id 77FBA69C5EB for ; Fri, 13 Jan 2012 22:26:24 +0100 (CET) From: Philippe Strauss Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary=Apple-Mail-5-290433080 Date: Fri, 13 Jan 2012 22:26:23 +0100 In-Reply-To: <4758C5C2-5444-4C24-99CB-7AD010D06C6E@polytechnique.org> To: caml-list@inria.fr References: <4758C5C2-5444-4C24-99CB-7AD010D06C6E@polytechnique.org> Message-Id: <53AB84F5-72B7-4390-9425-5565058DB032@philou.ch> X-Mailer: Apple Mail (2.1084) Subject: Re: [Caml-list] ocamlmklib OSX/OpenGL weirdness --Apple-Mail-5-290433080 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Thanks Alan, it does works fine now ! I attach another patch, very straight to the point, but not of the most ref= ineds aesthetics, still to the same makefile, about paths to libjpeg and it= 's headers files. (so in one thread on the ML archive we have all patches to build glMlite on= OSX) sorry, I was mixing the GL.o of glMlite and some kind of /usr/lib/libGL.so = in my previous email. would have spent half a day on it or more without yours. Thanks ! Le 13 janv. 2012 =E0 21:48, Alan Schmitt a =E9crit : > On 13 Jan 2012, at 20:41, Philippe Strauss wrote: >=20 >> I'm running 3.12.1 plus J=E9r=E9mie Dimino gprint patch, and an up to da= te godi setup. >> Trying to build Florent Monnier glMlite, I'm finding this singularity: >>=20 >> ocamlopt.opt -verbose -g -c GL.ml >> + as -arch x86_64 -o 'GL.o' '/var/folders/Yj/YjSPq8kWEbucqe1B6qhw4E+++T= I/-Tmp-/camlasm11ff8f.s' >>=20 >> ocamlmklib -verbose -o GL GL.cmx -framework OpenGL -lgl_stubs >> + /opt/godi312/bin/ocamlopt -a -o GL.cmxa GL.cmx -cclib -lGL -ccopt -L= /opt/godi312/lib -ccopt -framework -ccopt OpenGL -cclib -lgl_stubs >>=20 >> it seems (or I missed something) that ocamlmklib add -lGL when it invoke= s ocamlopt, it should not on OSX, which requires "-framework OpenGL". >>=20 >> BTW, the two -ccopt -framework -ccopt OpenGL is a trickery for whitespac= e containing linker arguments ? >=20 > Yes. >=20 > About the main question, I asked this a while back. This thread should ex= plain what is going on. > https://sympa-roc.inria.fr/wws/arc/caml-list/2011-02/msg00144.html >=20 > This lead me to write a small patch to glMlite, which I attach. As this p= atch is OS X specific (the current build system is targeted for Linux), it = has not been incorporated upstream. I have not have found the time to do a = "universal" patch yet. >=20 > Hope this helps, >=20 > Alan >=20 >=20 > --=20 > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >=20 > --Apple-Mail-5-290433080 Content-Disposition: attachment; filename=glmlite-make-libjpeg-paths.diff Content-Type: application/octet-stream; name="glmlite-make-libjpeg-paths.diff" Content-Transfer-Encoding: 7bit --- Makefile.orig 2012-01-13 15:23:23.000000000 +0100 +++ Makefile 2012-01-13 22:07:20.000000000 +0100 @@ -425,6 +425,9 @@ jpeg_opt: jpeg_loader.cmxa jpeg: jpeg_byte jpeg_opt +LDPATH=/opt/local/lib +CCOPTS=-ccopt "-I/opt/local/include" -ccopt "-L$(LDPATH)" + jpeg_loader.cmi jpeg_loader.cmo: jpeg_loader.ml GL.cmi $(OCAMLC) -c $< @@ -432,16 +435,16 @@ $(OCAMLOPT) -c $< loader-libjpeg.o: loader-libjpeg.c loader-libjpeg-mem.c loader-texure.h - $(OCAMLC) -c $< + $(OCAMLC) $(CCOPTS) -c $< dlljpeg_loader.so libjpeg_loader.a: loader-libjpeg.o - $(OCAMLMKLIB) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg + $(OCAMLMKLIB) -L$(LDPATH) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg jpeg_loader.cmxa jpeg_loader.a: jpeg_loader.cmx dlljpeg_loader.so - $(OCAMLMKLIB) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg + $(OCAMLMKLIB) -L$(LDPATH) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg jpeg_loader.cma: jpeg_loader.cmo dlljpeg_loader.so - $(OCAMLMKLIB) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg + $(OCAMLMKLIB) -L$(LDPATH) -o jpeg_loader $< $(GL_LIBS) -L"$(OCAML_PATH)" -lbigarray -ljpeg # }}} --Apple-Mail-5-290433080 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii -- Philippe Strauss http://www.philou.ch/ --Apple-Mail-5-290433080--