From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7DD3F7EEEF for ; Sun, 7 Jun 2015 22:23:49 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christiano.fh@gmail.com) identity=pra; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christiano.fh@gmail.com"; x-sender="christiano.fh@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of christiano.fh@gmail.com designates 209.85.216.53 as permitted sender) identity=mailfrom; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christiano.fh@gmail.com"; x-sender="christiano.fh@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vn0-f53.google.com) identity=helo; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christiano.fh@gmail.com"; x-sender="postmaster@mail-vn0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A0AQA5p3RVmzXYVdFCGoNkXgaDGKxojnKBYocIBzoSAQEBAQEBAREBAQEBAQYLCwkhLoQjAQEEEhEEGQEtCwEDDAEFBQsNAgIJHQICIQESAQUBChIGExIQh3YDEg06ng4+MYs/hGSYZScDCoUlJgEFDoETiiKCTYUogUUFhUsKhgyHTYRAhQqBYIEvQI5kCYMogg8SI4EVXYFQHIFUPDEBgkYBAQE X-IPAS-Result: A0A0AQA5p3RVmzXYVdFCGoNkXgaDGKxojnKBYocIBzoSAQEBAQEBAREBAQEBAQYLCwkhLoQjAQEEEhEEGQEtCwEDDAEFBQsNAgIJHQICIQESAQUBChIGExIQh3YDEg06ng4+MYs/hGSYZScDCoUlJgEFDoETiiKCTYUogUUFhUsKhgyHTYRAhQqBYIEvQI5kCYMogg8SI4EVXYFQHIFUPDEBgkYBAQE X-IronPort-AV: E=Sophos;i="5.13,569,1427752800"; d="scan'208";a="163749054" Received: from mail-vn0-f53.google.com ([209.85.216.53]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Jun 2015 22:23:48 +0200 Received: by vnbf7 with SMTP id f7so14911338vnb.7 for ; Sun, 07 Jun 2015 13:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=DvxJ1cbn1/o9WDbwXldtYv5/wBk7LAHeluQswH28LKo=; b=XsyrLz1YIQrcntFsNeprWDO6mXKDV0CMfPzbjVrKFu9miqr99ObBc41U8vdexm8SJS yGQTndxOAA32USOSN1ySQzeRek4qmm6nk5/rVJMXQSyhJQNKFaxdIv4Aq08uJoZu2h6g rUOAJ0hY08y3WyF4ss3UWZqQF+gz1fCTP3EX3zcP2lAXPimlw9E7wI9daG+lFtaxCdUd 9p5h4btJqNdxgN02VfJ3lP98Gwd5Qh65WIUu0MOW0JUHGiXRIaSy1HlXu3tLofPbizwx i6fZr7RO1U//5b6S04PrsuG4gcmex29y4ihKf7FNt9NnHi6UhwV56aafS4IdLvtVYjBj eyDA== MIME-Version: 1.0 X-Received: by 10.52.75.201 with SMTP id e9mr25249641vdw.33.1433708626937; Sun, 07 Jun 2015 13:23:46 -0700 (PDT) Sender: christiano.fh@gmail.com Received: by 10.31.140.135 with HTTP; Sun, 7 Jun 2015 13:23:46 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Jun 2015 22:23:46 +0200 X-Google-Sender-Auth: 77ukbvVw8BrE80AHkZrmKXqHe40 Message-ID: From: "Christiano F. Haesbaert" To: Gabriel Scherer Cc: caml users Content-Type: text/plain; charset=UTF-8 X-Validation-by: haesbaert@haesbaert.org Subject: Re: [Caml-list] Can't build a target with C stubs using ocamlbuild I've just test 4.02.0+trunk and can confirm it fixes the issue. Thanks again for fixing it :D. On 5 June 2015 at 20:36, Gabriel Scherer wrote: > (Replying in-list as other people may be interested) > > On Fri, Jun 5, 2015 at 7:09 PM, Christiano F. Haesbaert > wrote: >> What is the common workflow to test such diff ? >> >> Is there a way to pin the compiler in opam ? > > My personal workflow is to use my script > https://github.com/gasche/opam-compiler-conf > which creates an opam switch from a compiler directory, using the > compiler version and git branch name to choose the switch name. > > Steps are: > - install the opam-compiler-conf script in your $PATH *outside* opam > (otherwise you will need to install it in all switches, pain) > - clone the compiler somewhere (and go to the branch you want to test) > - apply the patch you want to test > - opam compiler-conf configure (instead of "./configure" as suggested by README) > - make world.opt > - opam compiler-conf install (instead of "make install" as suggested by README) > > This will create a switch with the compiler you installed named, for > example, 4.02.2+local-git-4.02 (more generally > $OCAMLVER+local-git-$BRANCHNAME). You can install opam packages and > test them as in any switch. > > Then, if you modify the compiler again and make world.opt again, you can use > - make install > from the compiler directory to install the compiler without > reinstalling the OPAM packages (if the binary interface didn't change > and recompilation is not needed) > or > - opam compiler-conf reinstall > to also recompile all the OPAM packages of the script > > (Another common way to get a switch: pull-request made against > github/ocaml/ocaml automatically create a corresponding switch.) > > On Fri, Jun 5, 2015 at 7:09 PM, Christiano F. Haesbaert > wrote: >> Thanks, off list, >> >> What is the common workflow to test such diff ? >> >> Is there a way to pin the compiler in opam ? >> >> On 5 June 2015 at 18:47, Gabriel Scherer wrote: >>> I reported and proposed a fix at >>> http://caml.inria.fr/mantis/view.php?id=6893 >>> >>> On Fri, Jun 5, 2015 at 4:24 PM, Gabriel Scherer >>> wrote: >>>> This seems to be an ocamlbuild bug that should be reported on the bugtracker: >>>> http://caml.inria.fr/mantis/ >>>> >>>> On Fri, Jun 5, 2015 at 3:55 PM, Christiano F. Haesbaert >>>> wrote: >>>>> Just one more question, now with the real code, I was able to move >>>>> everything to myocamlbuild, but I'm getting a warning: >>>>> File "_tags", line 10, characters 12-28: >>>>> Warning: the tag "linkdep(stubs.o)" is not used in any flag >>>>> declaration, so it will have no effect; it may be a typo. Otherwise >>>>> use `mark_tag_used` in your myocamlbuild.ml to disable this warning. >>>>> >>>>> ## build.sh ## >>>>> ocamlbuild -use-ocamlfind all.otarget $@ >>>>> >>>>> ## _tags line ## >>>>> <*.native>: linkdep(stubs.o) >>>>> >>>>> ## myocamlbuild.ml ## >>>>> open Ocamlbuild_plugin;; >>>>> dispatch begin function >>>>> | After_rules -> >>>>> pflag ["ocaml";"compile";] "ppopt" (fun s -> S [A"-ppopt"; A s]); >>>>> pflag ["ocaml";"ocamldep";] "ppopt" (fun s -> S [A"-ppopt"; A s]); >>>>> pdep ["link"] "linkdep" (fun param -> [param]) >>>>> | _ -> () >>>>> end;; >>>>> >>>>> It seems to be the same case as >>>>> http://stackoverflow.com/questions/25585813/mark-tag-used-warning-with-ocaml-4-02-0 >>>>> >>>>> Should I just use mark_tag_used ? It seems something else is wrong >>>>> since the tag is actually used. >>>>> >>>>> >>>>> On 5 June 2015 at 12:47, Christiano F. Haesbaert >>>>> wrote: >>>>>> On 5 June 2015 at 12:38, Jeremy Yallop wrote: >>>>>>> On 5 June 2015 at 11:29, Christiano F. Haesbaert >>>>>>> wrote: >>>>>>>> ### toto_c.c ### >>>>>>>> ### toto_c.ml ### >>>>>>> >>>>>>> Both of these files will be compiled to object files called >>>>>>> 'toto_c.o'. Renaming one of them (e.g. toto_c.c to toto_c_stubs.c) >>>>>>> should fix the problem. >>>>>> >>>>>> Hooray, great, that did the trick, thanks a lot :D. >>>>> >>>>> -- >>>>> Caml-list mailing list. Subscription management and archives: >>>>> https://sympa.inria.fr/sympa/arc/caml-list >>>>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >>>>> Bug reports: http://caml.inria.fr/bin/caml-bugs