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

opam 2.0.2 throwing weird errors during install phase #3700

Closed
pmetzger opened this Issue Dec 13, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@pmetzger
Copy link
Member

pmetzger commented Dec 13, 2018

I'm trying to upgrade MacPorts to install 2.0.2. Unfortunately, I run into this during the install phase. It happens over and over:

cmdliner error: Undefined variable $($b,\$OPAMBESTEFFORT) in "Don't fail if all requested packages can't be installed: try to install as many as possible. Note that not all external solvers may support this option (recent versions of $(i,aspcud) or $(i,mccs) should). This is equivalent to setting $($b,\\$OPAMBESTEFFORT) environment variable."

(BTW, if it's not obvious, I'm the MacPorts maintainer for OCaml, and what I'm trying to do here is upgrade the MacPorts provided package. I can't ask anyone else to help me, I'm supposedly the "expert".)

@avsm

This comment has been minimized.

Copy link
Member

avsm commented Dec 14, 2018

Some more details would be useful about the build/install environment. Is MacPorts doing anything special in the install phase, such as setting some environment variables for fakeroot or similar? How was the binary compiled?

@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Dec 14, 2018

Unfortunately there's a typo. That error's appearing during the install phase because opam still builds the man pages during the install phase (I know, I know... it's on the list). Unfortunately, opam --help will also output that error to stderr.

@rjbou - it's cosmetic, but probably sufficient to need to release a single-character-fixing 2.0.3, I think.

@avsm

This comment has been minimized.

Copy link
Member

avsm commented Dec 14, 2018

It might be simpler to actually do the installation during the build phase, and just copy the files over in the install phase :-)

@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Dec 14, 2018

@avsm - it wouldn't fix the problem, unfortunately! The issue is that some targets are unconditionally rebuilt (for development convenience)

@avsm

This comment has been minimized.

Copy link
Member

avsm commented Dec 14, 2018

So what's different from the Homebrew package then, which works? There's clearly a workaround for this issue or else all the package managers would see it...

    ENV.deparallelize

    system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"
    system "make", "lib-ext"
    system "make"
    system "make", "man"
    system "make", "install"
@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Dec 14, 2018

@avsm - assuming you’ve got 2.0.2 installed with homebrew, run opam —help, then quit the pager and see what appeared on stderr (which should be that same error message)

@avsm

This comment has been minimized.

Copy link
Member

avsm commented Dec 16, 2018

Hm, oddly enough I can't repro this with a 2.0.2 binary on my laptop, but an upgrade on my desktop does happen with opam --help on Homebrew as well. I'll chalk the laptop failed repro down to some developer/upgrade hitch...

@pmetzger

This comment has been minimized.

Copy link
Member

pmetzger commented Dec 16, 2018

@dra27 Can you post the patch needed to fix this? I can then have MacPorts apply it during the patch phase. Or, if 2.0.3 will be out within a few days, I can just wait for that.

@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Dec 16, 2018

@pmetzger - either 626baf5 from #3706 or f0a6ae2 from #3703.

@rjbou rjbou closed this in #3703 Dec 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment