caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Christiano F. Haesbaert" <haesbaert@haesbaert.org>
Cc: Jeremy Yallop <yallop@gmail.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Can't build a target with C stubs using ocamlbuild
Date: Fri, 5 Jun 2015 16:24:47 +0200	[thread overview]
Message-ID: <CAPFanBFqznYkecqFfiU3YasY3_PvgRcgtYXqp-OBaKz0J0Pe+Q@mail.gmail.com> (raw)
In-Reply-To: <CAPvuBUt32ZhfkwS9R=-N-21LTQRP7OahiED1fZqBxq1Pg8kcNw@mail.gmail.com>

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
<haesbaert@haesbaert.org> 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
> <haesbaert@haesbaert.org> wrote:
>> On 5 June 2015 at 12:38, Jeremy Yallop <yallop@gmail.com> wrote:
>>> On 5 June 2015 at 11:29, Christiano F. Haesbaert
>>> <haesbaert@haesbaert.org> 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

  reply	other threads:[~2015-06-05 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 10:29 Christiano F. Haesbaert
2015-06-05 10:38 ` Jeremy Yallop
2015-06-05 10:47   ` Christiano F. Haesbaert
2015-06-05 13:55     ` Christiano F. Haesbaert
2015-06-05 14:24       ` Gabriel Scherer [this message]
2015-06-05 16:47         ` Gabriel Scherer
     [not found]           ` <CAPvuBUuH0v9AUp16jy4mt-3wxBABhT2cteK2Dv81FPaABB7GeQ@mail.gmail.com>
2015-06-05 18:36             ` Gabriel Scherer
2015-06-07 20:23               ` Christiano F. Haesbaert

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=CAPFanBFqznYkecqFfiU3YasY3_PvgRcgtYXqp-OBaKz0J0Pe+Q@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=haesbaert@haesbaert.org \
    --cc=yallop@gmail.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;
as well as URLs for NNTP newsgroup(s).