mirage/ocaml-cstruct

Cannot install with opam (jbuilder-related?)

Closed this issue · 4 comments

cfcs commented

I'm on this commit currently:

commit 62321881c962d825427f10c54a1564d3055ce812
Merge: 299a30b 5cd4e6a
Author: Anil Madhavapeddy <anil@recoil.org>
Date:   Wed May 10 23:18:48 2017 +0100

    Merge pull request #133 from avsm/jbuild
    
    port to jbuilder

When I do:

~/ocaml/ocaml-cstruct$ opam pin add cstruct file://$(pwd)

I get the following error:

=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building cstruct.2.4.1:
  ./configure --prefix /DEV.PUB.OCAML/.opam/4.04.0 --enable-lwt --enable-ppx --disable-async --enable-unix
  make
  make install
  make js-install
[ERROR] The compilation of cstruct.2.4.1 failed.
Removing cstruct.2.4.1.
  make js-uninstall
  ocamlfind remove cstruct


#=== ERROR while installing cstruct.2.4.1 =====================================#
Internal error:
  "./configure": command not found.
avsm commented

You've pinned an older version of a cstruct opam file to the development version of the tree, but seem to be using the wrong opam file.

If you do opam pin add cstruct --dev does it work for you?

cfcs commented

I am not sure what I am looking for. Is this what I am supposed to do?

opam pin add cstruct --dev file://$(pwd)

Below is the capped output:

### stdout ###
# jbuilder build
### stderr ###
# ...[truncated]
#     ocamlopt lwt/cstruct_lwt.{a,cmxa}
#     ocamlopt lib/cstruct.cmxs
#     ocamlopt unix/cstruct_unix.cmxs
#     ocamlopt lwt/cstruct_lwt.cmxs
#     ocamlopt ppx/ppx_cstruct.{cmx,o}
#     ocamlopt ppx/ppx_cstruct__Standalone.{cmx,o}
#     ocamlopt ppx/ppx_cstruct.{a,cmxa}
#     ocamlopt ppx/ppx_cstruct.cmxs
#     ocamlopt default/ppx_cstruct/ppx.exe [.ppx]
# make: *** No rule to make target 'install'.  Stop.

As mentioned in #142 (comment) I do have a work-around, I was just wondering if this is a general problem or if my opam installation has deviated from the norm somehow.

avsm commented

Is this still a problem @cfcs?

cfcs commented

Nope! Everything builds fine now!