Coccinelle archive on lore.kernel.org
 help / Atom feed
* [Cocci] Build issue after stdcompat upgrade
@ 2018-12-10 14:29 Oliver Schwahn
  2018-12-10 14:55 ` Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: Oliver Schwahn @ 2018-12-10 14:29 UTC (permalink / raw)
  To: cocci

Hi,

I am trying to build Coccinelle from the latest Github version (commit 
163d2058). My OCaml version is 4.05.0 on an Ubuntu 18.10.

I do the following from a clean repo checkout:
./autogen
./configure
make

and get the error:
ocamlfind ocamlc -c  -no-alias-deps -I . stdcompat__pervasives.ml -o 
stdcompat__pervasives.cmo
File "stdcompat__pervasives.ml", line 1:
Error: The implementation stdcompat__pervasives.ml
        does not match the interface stdcompat__pervasives.cmi:
        Type declarations do not match:
          type ('a, 'b) result = ('a, 'b) result = Ok of 'a | Error of 'b
        is not included in
          type ('a, 'b) result =
            ('a, 'b) Stdcompat__init.result =
              Ok of 'a
            | Error of 'b
make[2]: *** [Makefile:1370: stdcompat__pervasives.cmo] Error 2
make[2]: Leaving directory '/v/coccinelle/bundles/stdcompat/stdcompat-7'
make[1]: *** [Makefile:3: all] Error 2
make[1]: Leaving directory '/v/coccinelle/bundles/stdcompat'

Apparently this issues appeared after the upgrade of stdcompat to 
version 7. The last commit that builds on my system is 890e385a, being 
the last commit before the update.

Do you have any suggestion for a workaround?

Cheers,
Oliver
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-10 14:29 [Cocci] Build issue after stdcompat upgrade Oliver Schwahn
@ 2018-12-10 14:55 ` Julia Lawall
  2018-12-10 15:42   ` Oliver Schwahn
  0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2018-12-10 14:55 UTC (permalink / raw)
  To: Oliver Schwahn; +Cc: cocci

> Do you have any suggestion for a workaround?

Can you upgrade to 4.06?  I also have this problem with 4.05.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-10 14:55 ` Julia Lawall
@ 2018-12-10 15:42   ` Oliver Schwahn
  2018-12-10 16:13     ` Julia Lawall
  2018-12-10 17:42     ` Himanshu Jha
  0 siblings, 2 replies; 7+ messages in thread
From: Oliver Schwahn @ 2018-12-10 15:42 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cocci

>> Do you have any suggestion for a workaround?
> 
> Can you upgrade to 4.06?  I also have this problem with 4.05.

Thanks for the suggestion. OCaml 4.05 was indeed the problem. I upgraded 
to 4.07 and that worked fine.
I also had the chance to check on configurations with OCaml 4.01.0 and 
4.02.3, which also work as expected.

Just out of curiosity, when I run the included tests with:
./spatch.opt --testall
I get a score of: good = 529/552.
Is that the expected outcome or is something not working correctly?

Cheers,
Oliver
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-10 15:42   ` Oliver Schwahn
@ 2018-12-10 16:13     ` Julia Lawall
  2018-12-10 17:42     ` Himanshu Jha
  1 sibling, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2018-12-10 16:13 UTC (permalink / raw)
  To: Oliver Schwahn; +Cc: cocci



On Mon, 10 Dec 2018, Oliver Schwahn wrote:

> > > Do you have any suggestion for a workaround?
> >
> > Can you upgrade to 4.06?  I also have this problem with 4.05.
>
> Thanks for the suggestion. OCaml 4.05 was indeed the problem. I upgraded to
> 4.07 and that worked fine.
> I also had the chance to check on configurations with OCaml 4.01.0 and 4.02.3,
> which also work as expected.
>
> Just out of curiosity, when I run the included tests with:
> ./spatch.opt --testall
> I get a score of: good = 529/552.
> Is that the expected outcome or is something not working correctly?

Yes, it is the expected outcome.  The tests should only depend on OCaml
features so should be portable, and really only exist for the developers.
The tests that fail are things that should work but don't.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-10 15:42   ` Oliver Schwahn
  2018-12-10 16:13     ` Julia Lawall
@ 2018-12-10 17:42     ` Himanshu Jha
  2018-12-13 18:06       ` Flykt, Patrik
  1 sibling, 1 reply; 7+ messages in thread
From: Himanshu Jha @ 2018-12-10 17:42 UTC (permalink / raw)
  To: Oliver Schwahn, patrik.flykt, flavio.ceolin; +Cc: cocci

On Mon, Dec 10, 2018 at 04:42:05PM +0100, Oliver Schwahn wrote:
> > > Do you have any suggestion for a workaround?
> > 
> > Can you upgrade to 4.06?  I also have this problem with 4.05.
> 
> Thanks for the suggestion. OCaml 4.05 was indeed the problem. I upgraded to
> 4.07 and that worked fine.
> I also had the chance to check on configurations with OCaml 4.01.0 and
> 4.02.3, which also work as expected.

FYI Patrik & Flavio,

You too need to Upgrade and try again.

https://lore.kernel.org/cocci/ecaf70fe-1194-9457-ad0c-5f029343b2d4@cs.tu-darmstadt.de/

-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-10 17:42     ` Himanshu Jha
@ 2018-12-13 18:06       ` Flykt, Patrik
  2018-12-13 18:32         ` Himanshu Jha
  0 siblings, 1 reply; 7+ messages in thread
From: Flykt, Patrik @ 2018-12-13 18:06 UTC (permalink / raw)
  To: schwahn, himanshujha199640, Ceolin, Flavio; +Cc: cocci

On Mon, 2018-12-10 at 23:12 +0530, Himanshu Jha wrote:
> On Mon, Dec 10, 2018 at 04:42:05PM +0100, Oliver Schwahn wrote:
> > > > Do you have any suggestion for a workaround?
> > > 
> > > Can you upgrade to 4.06?  I also have this problem with 4.05.
> > 
> > Thanks for the suggestion. OCaml 4.05 was indeed the problem. I
> > upgraded to 4.07 and that worked fine.
> > I also had the chance to check on configurations with OCaml 4.01.0
> > and 4.02.3, which also work as expected.
> 
> FYI Patrik & Flavio,
> 
> You too need to Upgrade and try again.
> 
> https://lore.kernel.org/cocci/ecaf70fe-1194-9457-ad0c-5f029343b2d4@cs.tu-darmstadt.de/

Debian testing with ocaml from stable, i.e. ocaml 4.02.3-9, stops with:

OCAMLOPT  parsing_c/ast_c.ml
OCAMLOPT  parsing_c/includes.ml
File "parsing_c/includes.ml", line 159, characters 9-22:
Error: Unbound module Parmap
make: *** [Makefile:424: parsing_c/includes.cmx] Error 2
rm parsing_cocci/parser_cocci_menhir.ml.d parsing_cocci/lexer_script.ml parsing_cocci/lexer_cocci.ml

Here Ubuntu OCaml seems to have a difference against Debian. Ocaml
4.05.0-10+b1 is unfortunately the latest in Debian testing and
unstable. It seems I have to sit and wait until also Debian gets
updated.

Cheers,

	Patrik

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Cocci] Build issue after stdcompat upgrade
  2018-12-13 18:06       ` Flykt, Patrik
@ 2018-12-13 18:32         ` Himanshu Jha
  0 siblings, 0 replies; 7+ messages in thread
From: Himanshu Jha @ 2018-12-13 18:32 UTC (permalink / raw)
  To: Flykt, Patrik; +Cc: Ceolin, Flavio, cocci

On Thu, Dec 13, 2018 at 06:06:28PM +0000, Flykt, Patrik wrote:
> On Mon, 2018-12-10 at 23:12 +0530, Himanshu Jha wrote:
> > On Mon, Dec 10, 2018 at 04:42:05PM +0100, Oliver Schwahn wrote:
> > > > > Do you have any suggestion for a workaround?
> > > > 
> > > > Can you upgrade to 4.06?  I also have this problem with 4.05.
> > > 
> > > Thanks for the suggestion. OCaml 4.05 was indeed the problem. I
> > > upgraded to 4.07 and that worked fine.
> > > I also had the chance to check on configurations with OCaml 4.01.0
> > > and 4.02.3, which also work as expected.
> > 
> > FYI Patrik & Flavio,
> > 
> > You too need to Upgrade and try again.
> > 
> > https://lore.kernel.org/cocci/ecaf70fe-1194-9457-ad0c-5f029343b2d4@cs.tu-darmstadt.de/
> 
> Debian testing with ocaml from stable, i.e. ocaml 4.02.3-9, stops with:
> 
> OCAMLOPT  parsing_c/ast_c.ml
> OCAMLOPT  parsing_c/includes.ml
> File "parsing_c/includes.ml", line 159, characters 9-22:
> Error: Unbound module Parmap
> make: *** [Makefile:424: parsing_c/includes.cmx] Error 2
> rm parsing_cocci/parser_cocci_menhir.ml.d parsing_cocci/lexer_script.ml parsing_cocci/lexer_cocci.ml

Timur Tabi had exactly the same error and disabling parmap helped him.

But disabling parmap isn't recommmended AFAIK it supports
parallelism in coccinelle.

https://lore.kernel.org/cocci/CAOZdJXVDqxHBsOKK=+M_oazwO5Hc3uR7EsgACeg+2H3QwcWo4w@mail.gmail.com/

In future for any other issues, you can try to search the archives
like https://lore.kernel.org/cocci/?q=includes.cmx
first and perhaps there maybe someone who hit the same issue as
observed above :)

> Here Ubuntu OCaml seems to have a difference against Debian. Ocaml
> 4.05.0-10+b1 is unfortunately the latest in Debian testing and
> unstable. It seems I have to sit and wait until also Debian gets
> updated.

Debian, heh..

Then probably you would need to wait for more time since TSC decided to
raise the min CMake level 3.13 as well ;)


Thanks for the effort though Patrik and hopefully updated PPA will soon
be available.


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 14:29 [Cocci] Build issue after stdcompat upgrade Oliver Schwahn
2018-12-10 14:55 ` Julia Lawall
2018-12-10 15:42   ` Oliver Schwahn
2018-12-10 16:13     ` Julia Lawall
2018-12-10 17:42     ` Himanshu Jha
2018-12-13 18:06       ` Flykt, Patrik
2018-12-13 18:32         ` Himanshu Jha

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr cocci@archiver.kernel.org
	public-inbox-index cocci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox