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

camlp4 broken on reinstall #150

Closed
mgree opened this issue May 3, 2019 · 7 comments
Closed

camlp4 broken on reinstall #150

mgree opened this issue May 3, 2019 · 7 comments

Comments

@mgree
Copy link

mgree commented May 3, 2019

I've had some recent issues with ExtUnix on OS X. After finding some discussion, I suspect that the core issue is one of camlp4 being inconsistent after an OPAM reinstall.

The order of events for me was:

  1. opam update
  2. opam upgrade (ExtUnix doesn't install)
  3. opam uninstall camlp4
  4. opam install camlp4
  5. opam install ExtUnix (successful)

I'm loathe to try to do more to repeat the issue because I can't get work done without ExtUnix and am now afraid to break things.

Perhaps it's related to #140? Looking at ExtUnix's CI logs, I suspect the issue is something specific to OCaml 4.07...

# opam config report
# opam-version      2.0.1 
# self-upgrade      no
# system            arch=x86_64 os=macos os-distribution=homebrew os-version=10.13.6
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              4
# repositories      1 (http) (default repo at 393c2feb)
# pinned            1 (version)
# current-switch    4.07.1+flambda
@avsm
Copy link
Contributor

avsm commented May 3, 2019 via email

@mgree
Copy link
Author

mgree commented May 3, 2019

It seems so:

$ brew info camlp4
camlp4: stable 4.07+1 (bottled), HEAD
Tool to write extensible parsers in OCaml
https://github.com/ocaml/camlp4
/usr/local/Cellar/camlp4/4.07+1 (165 files, 153.0MB) *
  Poured from bottle on 2018-09-26 at 15:28:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/camlp4.rb
==> Dependencies
Required: ocaml ✔, ocamlbuild ✘
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 359 (30 days), 1,248 (90 days), 20,219 (365 days)
install_on_request: 106 (30 days), 307 (90 days), 1,593 (365 days)
build_error: 0 (30 days)

And:

$ opam switch
#  switch          compiler                       description
→  4.07.1+flambda  ocaml-variants.4.07.1+flambda  4.07.1+flambda
   system          ocaml-system.4.07.0

But bafflingly, nobody seems to be using the system camlp4. I don't remember installing it, but August of last year was when I was doing a bunch of build/docker work, so maybe I did it?

$ brew uses --installed camlp4
$ brew uses --installed ocaml
bibtex2html    camlp4    hevea    ocamlbuild    # output edited for width

If you think the system camlp4 is the problem, is there something we could do to prevent this situation? I'm starting to think that upstream systems (brew, apt, etc.) should list OPAM as a conflict with all OCaml packages other than the system OCaml used to bootstrap OPAM.

@avsm
Copy link
Contributor

avsm commented May 3, 2019

This isn't a conflict with opam and system-installed libraries. The camlp4 package in opam is careful to detect if a system one is supplied, and install that one if available. The underlying problem is simply that the upstream packaging is broken -- it's (for decades) been the case that an upgrade of the OCaml compiler requires a recompile of dependent libraries, and Homebrew missed that in one upgrade. @Blaisorblade also just added a test case there to spot this (Homebrew/homebrew-core#39468), so you may have been unlucky with when you upgraded.

There's little that opam can do if the system-supplied versions are inconsistent, beyond installing local overrides (which is what happened when you did the reinstall, I expect).

Hope this helps; since your issue is fixed and we think the underlying Homebrew issue is also sorted, I'll close this issue.

@avsm avsm closed this as completed May 3, 2019
@mgree
Copy link
Author

mgree commented May 3, 2019

I see! I'm not certain it's quite that simple, though... why is ExtUnix's build failing if the script calls brew update (https://github.com/ocaml/ocaml-ci-scripts/blob/4466db9737c1e615d4aab631bb32b3505ea68ce6/.travis-ocaml.sh#L32)? Recent runs in my own fork don't seem to work, either... do you think this is a matter of waiting for things to percolate, or is something else going on?

@Blaisorblade
Copy link

@mgree Your latest CI build was two days ago, that's too old; please try again.

That CI failed because the fix had not yet been committed (if I had written it at all). In particular, https://travis-ci.org/ygrek/extunix/jobs/512680112#L1245 shows version 4.07+1 installed. The fix is in 4.07+1_1.

If you upgrade now, you should get 4.07+1_1, which was rebuilt on latest OCaml. I just confirmed that works for me on macOS High Sierra (the same version as in that CI script), by upgrading and running opam install ulex; other bottles were upgraded too.

@Blaisorblade
Copy link

And re your local build, I think the fix was pushed 4-5 hours ago.

@mgree
Copy link
Author

mgree commented May 4, 2019

Ah: it looks good now. Thank you so much! Glad to know this was transient breakage and not something deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants