All of lore.kernel.org
 help / color / mirror / Atom feed
From: mcgrof@suse.com (Luis R. Rodriguez)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Common.union_setError (was: Compiling latest coccinelle with opensuse)
Date: Wed, 14 Oct 2015 23:23:01 +0200	[thread overview]
Message-ID: <20151014212301.GJ14464@wotan.suse.de> (raw)
In-Reply-To: <alpine.DEB.2.02.1510142301540.1977@localhost6.localdomain6>

On Wed, Oct 14, 2015 at 11:04:47PM +0200, Julia Lawall wrote:
> On Wed, 14 Oct 2015, Luis R. Rodriguez wrote:
> > On Wed, Oct 14, 2015 at 10:53:50AM +0200, S?bastien Hinderer wrote:
> > > Hi,
> > > 
> > > Luis: here is what I am guessing.
> > > 
> > > At some point in the past you have installed OCaml and then compiled
> > > Menhir from sources with that version of OCaml. Meanwhile the OCaml
> > > related packages got updated but Menhir has not been recompiled with
> > > the updated version of OCaml, hence the inconsistency.
> > > 
> > > My suggestion would thus be to make sure you recompile Menhir with the
> > > currently installed version of OCaml.
> > 
> > S?bastien,
> > 
> > your guess was correct. I also tested using a new base OpenSUSE factory
> > install for both github and inria git repos for coccinelle and found
> > that:
> > 
> >   * github: works as expected
> >   * inria git: required menhir but fails with a compilation failure [0]
> > 
> > Then with only the latest and greatest on inira git:
> > 
> >   * menhir: compiled
> >   * coccinelle: compiles
> > 
> > Once I forced recompilation of menhir things worked well. The
> > reason things seem to work on debian is menhir is packaged and
> > updated regularly, and I suppose it might be updated as ocaml
> > gets updated as otherwise Debian would run into similar issues,
> > and if not I suspect they will once ocaml on Debian does get
> > upgraded :)
> > 
> > I wonder how we'll avoid these dependency issues creeping up moving
> > forward. This is pretty fragile, and if the git tree will represent
> > later the latest and greatest what should we do about mehir
> > dependencies?
> 
> I guess that it is normal that if you install something with your package 
> manager, and another thing without your package manager, then they will 
> get out of synch in strange ways.  It doesn't really seem like 
> Coccinelle's problem, specifically.

The problem here stems from users of the internal inria git tree prior
to a release, nothing more. For those users like myself the issue is
real, and I am now aware of it, and so should others. Since we know we
want to later strive towards one tree for development we should consider
this a bit more seriously though. Perhaps once compromise might be to
carry the pre-built files (as in github now) and *only* if a specific
non-default 'make menhir-update' type of target is used would we force
a re-generation of the files? Distributions should not need to run
this, ony admins of the git tree.

> Now that it has compiled, do you still have the problem with the 
> Common.union_set reference?

Oh yes. And the instructions I gave can be used to reproduce that
build I think as well now. To reproduce one can build coccinelle
on opensuse (I guess inria git version), and then apply this draft
patch onto linux-next (git am the file).

http://drvbp1.linux-foundation.org/~mcgrof/coccinelle/common-union-issue/fw-warn-init-probe-draft-v2.patch

Then try it as follows:

# Note: cancel after 20 seconds otherwise, this patch is still
# being worked on, the current iteration use will run for a long
# time, don't waste your machine cycles / overheat your box.
export COCCI=scripts/coccinelle/api/request_firmware.cocci
make coccicheck MODE=report

I get:

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

File "/tmp/ocaml_cocci_27c72e.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_eb7247.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_82ec3c.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_7c147c.ml", line 21, characters 23-39:
Error: Unbound value Common.union_setError: Unbound value Common.union_setError: Unbound value Common.union_set


Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_27c72e.ml")
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_eb7247.ml")
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_7c147c.ml")
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_82ec3c.ml")

> Sebastien seemed to think that the ability to 
> do dynamic linking in ocaml depends on more things than I would have 
> expected.  But I odn't know the details.

Interesting, let me know if you have any leads on a possible fix. In the
meantime I'll be debugging the above iteration SmPL patch on Debian.

  Luis

  reply	other threads:[~2015-10-14 21:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 20:19 [Cocci] Compiling latest coccinelle with opensuse Luis R. Rodriguez
2015-10-13 20:26 ` Julia Lawall
2015-10-13 20:37   ` Luis R. Rodriguez
2015-10-13 20:44     ` Julia Lawall
2015-10-13 20:49       ` Luis R. Rodriguez
2015-10-13 20:58     ` Julia Lawall
2015-10-13 21:14       ` Luis R. Rodriguez
2015-10-13 21:18         ` Julia Lawall
2015-10-13 22:05           ` Luis R. Rodriguez
2015-10-14  5:26             ` Julia Lawall
2015-10-14  7:11               ` Sébastien Hinderer
2015-10-14  7:59                 ` Julia Lawall
2015-10-14  8:53                   ` Sébastien Hinderer
2015-10-14 20:59                     ` Luis R. Rodriguez
2015-10-14 21:04                       ` Julia Lawall
2015-10-14 21:23                         ` Luis R. Rodriguez [this message]
2015-10-14 21:32                           ` [Cocci] Common.union_setError (was: Compiling latest coccinelle with opensuse) Julia Lawall
2015-10-14 21:39                             ` Luis R. Rodriguez
2015-10-14 21:47                               ` Julia Lawall
2015-10-14 21:53                                 ` Sébastien Hinderer
2015-10-14 21:44                       ` [Cocci] Compiling latest coccinelle with opensuse Sébastien Hinderer
2015-10-14 21:48                         ` Julia Lawall
2015-10-14 21:58                           ` Sébastien Hinderer
2015-10-14 10:54                 ` [Cocci] Compiling latest Coccinelle with openSUSE SF Markus Elfring
2015-10-14 14:47             ` [Cocci] Compiling latest coccinelle with opensuse Sébastien Hinderer
2015-10-14 15:22     ` [Cocci] Compiling latest Coccinelle with openSUSE SF Markus Elfring
2015-10-14 10:32 ` [Cocci] Compiling Coccinelle with specific OCaml versions on openSUSE SF Markus Elfring
2015-10-14 14:44   ` Sébastien Hinderer
2015-10-14 14:49     ` Julia Lawall
2015-10-14 14:57       ` Sébastien Hinderer
2015-10-14 15:43         ` SF Markus Elfring

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=20151014212301.GJ14464@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=cocci@systeme.lip6.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.