sedlex icon indicating copy to clipboard operation
sedlex copied to clipboard

Error building with OPAM

Open msprotz opened this issue 5 years ago • 14 comments

Since this morning, I've had the following issue:

# File "ppx_sedlex.ml", line 11, characters 5-24:
# Error: Unbound module Ast_convenience_405

does that ring a bell? the travis logs are available here: https://travis-ci.org/FStarLang/kremlin/builds/421260062?utm_source=slack&utm_medium=notification if that helps

msprotz avatar Aug 27 '18 20:08 msprotz

I believe that this issue stems from a missing -package ppx_tools_versioned argument in the OPAM version (line 11 in src/syntax/Makefile). The current git version builds fine though, which perhaps suggests doing a new release as discussed in #57.

adrieng avatar Aug 28 '18 05:08 adrieng

This seems related to the changes introduced from ppx_tools_versioned.5.2 to ppx_tools_versioned.5.2.1 (see https://github.com/mirage/ocaml-cstruct/pull/204 for more info on why there is now a need for explicitly stating runtime dependencies on ppx_tools_versions).

nberth avatar Aug 28 '18 09:08 nberth

Someone might want to submit a patch to the opam file to fix this for now. (The Makefile can be patched in the opam build process.) That's probably the fastest way to get past the problem.

pmetzger avatar Aug 28 '18 11:08 pmetzger

More like Ast_inconvenience_404 amiright?

But yes, a quick fix would be appreciated because this takes down our entire CI.

Simn avatar Aug 28 '18 11:08 Simn

The quickest fix for anyone is to force use of ppx_tools_versioned.5.2.

A slightly "better" quick fix is to put the Makefile patch into the opam file and request a pull to the opam repository.

pmetzger avatar Aug 28 '18 14:08 pmetzger

Note that I've pushed https://github.com/ocaml/opam-repository/pull/12556 to (temporary) fix the issue in opam.

samoht avatar Sep 04 '18 09:09 samoht

Can we close this for now, or should we keep it open until the underlying issue is fixed?

pmetzger avatar Sep 08 '18 21:09 pmetzger

Hi,

There is a patch that fixes build against ppx_tools 5.2.1:

`--- sedlex-1.99.4/src/syntax/Makefile.orig 2018-10-25 07:55:34.821346628 +0000 +++ sedlex-1.99.4/src/syntax/Makefile 2018-10-25 07:58:42.761346628 +0000 @@ -8,7 +8,7 @@

OCAMLC=ocamlfind ocamlc OCAMLOPT=ocamlfind ocamlopt -g -PACKAGES=-package ppx_tools_versioned.metaquot_405 -package ocaml-migrate-parsetree +PACKAGES=-package ppx_tools_versioned.metaquot_405 -package ocaml-migrate-parsetree -package ppx_tools_versioned OCAMLFLAGS=$(PACKAGES) -linkall -w +A-4-9-42 -annot

all: ppx_sedlex$(EXE) sedlex.cma ` http://svnweb.mageia.org/packages/cauldron/ocaml-sedlex/current/SOURCES/ppx_tools_versioned-521.patch?view=markup&pathrev=1325266

david-geiger avatar Oct 25 '18 20:10 david-geiger

If you would like to submit a patch, please do so via the pull request mechanism.

pmetzger avatar Oct 26 '18 00:10 pmetzger

Er — is there a reason it's not constrained to ‘below 5.2.1’ in this repository? This issue trickled down to my fork in an unrelated fashion, and I'm confused as to why sedlex.opam in this repo now disagrees with the declaration in the opam repository about this? Simple oversight, or intentional?

Happy to PR if upstreaming of this constraint is desired. (=

ELLIOTTCABLE avatar Apr 12 '19 12:04 ELLIOTTCABLE

It's intentional. The constraint < 5.2.1 would make sedlex incompatible with a large part of the OCaml ecosystem, most notably the Jane Street libraries.

smolkaj avatar Apr 12 '19 14:04 smolkaj

@smolkaj thanks for the explanation! <3

ELLIOTTCABLE avatar Apr 23 '19 21:04 ELLIOTTCABLE

I opened #84 to help fix this. I was getting bitten by a "catch 22" situation in nixpkgs trying to build sedlex (<2.0) for ocaml 4.08.

matthewess avatar Jul 29 '19 04:07 matthewess

@matthewess I've merged it. Is the problem gone?

pmetzger avatar Aug 06 '19 20:08 pmetzger

we're now using ppxlib, should be closed

hhugo avatar Feb 17 '23 14:02 hhugo