Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile camlp4 39af3807183e on 4.02.0+dev4-2014-04-03 #6371

Closed
vicuna opened this Issue Apr 16, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Apr 16, 2014

Original bug ID: 6371
Reporter: @whitequark
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:26:36Z)
Resolution: fixed
Priority: normal
Severity: crash
Platform: 64-bit Linux
OS: Debian
OS Version: 7.0
Fixed in version: 4.02.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues

Bug description

If 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/Camlp4.ml

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://github.com/ocaml/camlp4
$ cd camlp4
$ ./configure
$ make all

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Apr 16, 2014

Comment author: @whitequark

Bisecting points to this: fb74ef5

I'm a bit at a loss of how to fix it.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Apr 16, 2014

Comment author: @garrigue

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Apr 16, 2014

Comment author: @whitequark

This was impressively quick. Thanks!

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

@vicuna vicuna closed this Dec 11, 2015

@vicuna vicuna added the camlp4 label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.