Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006371OCaml-for Camlp4 use 06:432015-12-11 19:26
Assigned Togarrigue 
Platform64-bit LinuxOSDebianOS Version7.0
Product Version 
Target VersionFixed in Version4.02.0+dev 
Summary0006371: Unable to compile camlp4 39af3807183e on 4.02.0+dev4-2014-04-03
DescriptionIf I try to compile camlp4 trunk on ocaml trunk, it exhibits unbounded recursion while executing:

$HOME/.opam/4.02.0dev+trunk/bin/ocamlc.opt -c -g -warn-error A -w a -I camlp4/import -I camlp4/config -I camlp4/boot -o camlp4/boot/Camlp4.cmo camlp4/boot/

Attaching gdb to the process reveals that the loop consists of calls to:
0x00000000004f1150 in camlBtype__iter_type_expr_1466 ()
0x00000000004f189f in camlBtype__it_type_expr_1518 ()

(The cycle is larger than just these two calls.)

This issue is very problematic, because I have to use trunk to get -ppx, and such commonly used packages as lwt or oasis have a hard dependency on camlp4.

Later, I will try to bisect the OCaml tree between the separation of camlp4 and trunk.
Steps To Reproduce$ git clone git:// [^]
$ cd camlp4
$ ./configure
$ make all
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
whitequark (developer)
2014-04-16 08:07

Bisecting points to this: [^]

I'm a bit at a loss of how to fix it.
garrigue (manager)
2014-04-16 08:19

Fixed in trunk, revision 14608.
The implementation of Btype.type_iterators ignored cycles in types.

Note that camlp4 is not in sync with trunk, so that you just get a type error at this point.
whitequark (developer)
2014-04-16 08:21

This was impressively quick. Thanks!

I'm planning to get camlp4 with trunk myself and send a pull request.

- Issue History
Date Modified Username Field Change
2014-04-16 06:43 whitequark New Issue
2014-04-16 08:07 whitequark Note Added: 0011287
2014-04-16 08:19 garrigue Note Added: 0011289
2014-04-16 08:19 garrigue Status new => resolved
2014-04-16 08:19 garrigue Fixed in Version => 4.02.0+dev
2014-04-16 08:19 garrigue Resolution open => fixed
2014-04-16 08:19 garrigue Assigned To => garrigue
2014-04-16 08:21 whitequark Note Added: 0011290
2015-12-11 19:26 xleroy Status resolved => closed
2016-02-08 12:49 doligez Category Camlp4 => for Camlp4 use [^]
2016-02-08 12:50 doligez Category for Camlp4 use [^] => for Camlp4 use [^]
2017-02-23 16:43 doligez Category for Camlp4 use [^] => -for Camlp4 use [^]

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker