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

opam 2.0.4 doesn't compile when using dune 1.10.0 #3870

Open
talex5 opened this issue Jun 13, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@talex5
Copy link

commented Jun 13, 2019

opam 2.0.4 doesn't compile when using dune 1.10.0.

The build fails with:

Note: You can use "dune upgrade" to convert your project to dune.
File "src_ext/result/jbuild", line 1, characters 0-0:
Warning: jbuild files are deprecated, please convert this file to a dune file instead.
Note: You can use "dune upgrade" to convert your project to dune.
make[1]: *** [Makefile:41: man] Error 1
make[1]: Leaving directory '/tmp/opam/build/doc'
make: *** [Makefile:171: man] Error 2
Command '['/bin/sh', '-c', u'./configure && make lib-ext && ./configure && make && make install prefix="$DISTDIR" "$@"', '-']': Build failed with exit code 2
Command failed with exit status 1

Perhaps it is interpreting these jbuild warnings as build errors?

@if grep -v "^Entering directory '" man/err > man/err2 ; then cat man/err2 ; false ; fi

Building opam without dune installed fixes the problem.

@dra27

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

I can't reproduce this from a git clone - what were your precise steps?

@talex5

This comment has been minimized.

Copy link
Author

commented Jun 16, 2019

FROM ocaml/opam2
RUN opam install dune
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends wget
RUN wget https://github.com/ocaml/opam/archive/2.0.4.tar.gz
RUN tar xf 2.0.4.tar.gz
WORKDIR opam-2.0.4
RUN opam config exec -- ./configure
RUN opam config exec -- make lib-ext
RUN opam config exec -- ./configure
RUN opam config exec -- make
RUN opam config exec -- make install prefix=/tmp/foo

Then docker build . gives:

Note: You can use "dune upgrade" to convert your project to dune.
File "src_ext/result/jbuild", line 1, characters 0-0:
Warning: jbuild files are deprecated, please convert this file to a dune file instead.
Note: You can use "dune upgrade" to convert your project to dune.
Makefile:34: recipe for target 'man' failed
make[1]: Leaving directory '/home/opam/opam-repository/opam-2.0.4/doc'
make[1]: *** [man] Error 1
Makefile:171: recipe for target 'man' failed
make: *** [man] Error 2
The command '/bin/sh -c opam config exec -- make install prefix=/tmp/foo' returned a non-zero code: 2
@dra27

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

Alas, a layer 8 problem on my part - I failed to interpret from your first log that it was make install which was failing. Your original diagnosis is, unsurprisingly, correct - I'm just doing the fix.

Unrelated caveat: you don't need to re-run ./configure after make lib-ext which will save your docker container a little bit of CO₂

@rjbou rjbou added this to the 2.0.5 milestone Jun 26, 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.