Failed to install pfff with opam, with "make Error 1" message

I am trying to install the pfff package on my Mac.
Below is the output of opam install pfff, not sure where to start to look for a way to fix this.

$ opam install pfff
The following actions will be performed:
βˆ— install pfff 0.40.4

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><> :camel:
[pfff.0.40.4] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> :camel:
[ERROR] The compilation of pfff failed at β€œ/Users/jonathandoyle/.opam/opam-init/hooks/
build make depend”.

#=== ERROR while compiling pfff.0.40.4 ========================================#

context 2.0.0 | macos/x86_64 | ocaml-base-compiler.4.11.0 |

path ~/.opam/4.11.0/.opam-switch/build/pfff.0.40.4

command ~/.opam/opam-init/hooks/ build make depend

exit-code 2

env-file ~/.opam/log/pfff-79847-e7966f.env

output-file ~/.opam/log/pfff-79847-e7966f.out













make[1]: *** [] Error 1

make: *** [depend] Error 2

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> :camel:
β”Œβ”€ The following actions failed
β”‚ Ξ» build pfff 0.40.4
╢─ No changes have been performed

Looks like this is the command that is failing. Adding -t (table mode) or --code-ancient makes that work, so my assumption is the the newish code backend of menhir is not compatible with the released version pfff:

Options are to install an old version of menhir, or pin the development branch of pfff

opam pin add pfff

I’ve created a PR to fix the opam installation issue with current Menhir, so once this is merged this problem should go away and as @sagra mentioned, the development version of pfff doesn’t have this issue anymore.

1 Like

@jonathandoyle Also note that the pfff released on Opam is version 0.40.4, and was released almost 3 years ago. The develop branch is up to version 0.118.0 and is almost 1000 commits ahead. The pfff wiki has install instructions, and they only use opam for dependencies.