Opam install fails : sources cannot be obtained


I am trying to package my application and install it locally. I more or less followed the instruction on this page : https://opam.ocaml.org/doc/Packaging.html (I say more or less because at some point pin complained that it could not install a package without an .opam file, but I was precisely trying to create an opam file…) and it worked fine on my laptop (not without a bit of fiddling though). However, when I tried to do the same on my server (simply by pulling the sources in my git repository and trying to install from source), this fails with :

opam install tensor_loops

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>

The following actions will be performed:
  ∗ install tensor_loops 0.1*
[ERROR] The sources of the following couldn't be obtained, aborting:
          - tensor_loops.0.1

My opam file is :

opam-version: "2.0"
name: "tensor_loops"
version: "0.1"
synopsis: "Custom loop generation over small kernels"
description: "This package provides an embedded DSL that allows to describe a kernel and a loop scheme in a convenient way"
maintainer: "Nicolas Tollenaere <nicolas.tollenaere@inria.fr>"
authors: "Nicolas Tollenaere <nicolas.tollenaere@inria.fr>"
homepage: "https://gitlab.inria.fr/ntollena/tensor-mapping"
dev-repo: "git+https://gitlab.inria.fr/ntollena/tensor-mapping.git"
bug-reports: "https://gitlab.inria.fr/ntollena/tensor-mapping/issues"
depends: [ "ocaml" "batteries" "ppx_deriving" ]
build: ["dune" "build" "-p" name "-j" jobs]

and my dune file (in the lib directory) is :

 (name tensor_loops)
 (public_name tensor_loops)
 (libraries batteries ppx_deriving ppx_fields_conv)
 (preprocess (pps ppx_deriving.show ppx_deriving.eq ppx_deriving.ord ppx_fields_conv))

My package does not have the same name as the root directory of my project, if that matters. Can someone help me ? Thank you in advance

1 Like

Ok, so apparently opam install silently depends on rsync ??? Installing rsync solved the problem. I am not sure why I would need rsync (which stands for remote synchronization, right ?) to install a package when sources are present locally. At the very least, the error message should explicitely says so. Is it a known problem or should I raise an issue to opam developpers ?

rsync can be used for local synchronization too

Oh, ok, glad to see there is an issue. Hope it will be solved quickly :slight_smile: Thanks for your answer