Discover.ml: No such file or directory (when installing Dream)

Good morning,

after severel years of looking at Dream from afar I finaly found a good usecase for it :slight_smile:

However, when installing it I’m stuck at this error:

**#=== ERROR while compiling conf-libev.4-12 ====================================#**
**Sys_error("~/.opam/repo/default/packages/conf-libev/conf-libev.4-12/files/discover.ml: No such file or directory")**

I already tried to install everything libev related - but without success.

For completenes:

opam install -y dream

Summary

[NOTE] External dependency handling not supported for OS family β€˜macos’.
You can disable this check using β€˜opam option --global depext=false’
The following actions will be performed:
βˆ— install psq 0.2.1 [required by dream-httpaf]
βˆ— install mirage-clock 4.2.0 [required by dream]
βˆ— install ocplib-endian 1.2 [required by lwt]
βˆ— install duration 0.2.1 [required by mirage-crypto-rng, mirage-crypto-rng-lwt]
βˆ— install magic-mime 1.3.1 [required by dream]
βˆ— install menhirSdk 20231231 [required by menhir]
βˆ— install bigarray-compat 1.1.0 [required by dream]
βˆ— install conf-libev 4-12 [required by dream]
βˆ— install bigarray-overlap 0.2.1 [required by prettym]
βˆ— install menhirLib 20231231 [required by menhir]
βˆ— install base64 3.5.1 [required by dream-httpaf, multipart_form]
βˆ— install ocaml-syntax-shims 1.0.0 [required by angstrom]
βˆ— install conf-libssl 4 [required by ssl]
βˆ— install menhirCST 20231231 [required by menhir]
βˆ— install stringext 1.6.0 [required by uri]
βˆ— install dune-configurator 3.13.0 [required by mirage-crypto, mirage-crypto-rng]
βˆ— install topkg 1.0.7 [required by ptime, logs, mtime]
βˆ— install pecu 0.6 [required by multipart_form]
βˆ— install menhir 20231231 [required by graphql_parser]
βˆ— install ssl 0.7.0 [required by dream]
βˆ— install lwt 5.7.0 [required by dream]
βˆ— install bigstringaf 0.9.1 [required by multipart_form, caqti, dream-httpaf, multipart_form-lwt]
βˆ— install uutf 1.0.3 [required by multipart_form]
βˆ— install rresult 0.7.0 [required by graphql]
βˆ— install ptime 1.1.0 [required by dream]
βˆ— install mtime 2.0.0 [required by mirage-crypto-rng-lwt]
βˆ— install hmap 0.8.1 [required by dream-pure]
βˆ— install fmt 0.9.0 [required by dream]
βˆ— install lwt_ssl 1.2.0 [required by dream]
βˆ— install lwt_ppx 2.1.0 [required by dream]
βˆ— install faraday 0.8.2 [required by dream-httpaf]
βˆ— install angstrom 0.16.0 [required by multipart_form, caqti, dream-httpaf, multipart_form-lwt]
βˆ— install logs 0.7.0 [required by dream]
βˆ— install ke 0.6 [required by multipart_form, dream-httpaf, multipart_form-lwt]
βˆ— install graphql_parser 0.14.0 [required by dream]
βˆ— install cstruct 6.2.0 [required by dream]
βˆ— install faraday-lwt 0.8.2 [required by faraday-lwt-unix]
βˆ— install uri 4.4.0 [required by dream]
βˆ— install unstrctrd 0.3 [required by multipart_form]
βˆ— install prettym 0.0.3 [required by multipart_form]
βˆ— install graphql 0.14.0 [required by graphql-lwt]
βˆ— install eqaf 0.9 [required by mirage-crypto]
βˆ— install faraday-lwt-unix 0.8.2 [required by dream-httpaf]
βˆ— install dream-pure 1.0.0~alpha2 [required by dream]
βˆ— install caqti 1.9.0 [required by dream]
βˆ— install multipart_form 0.5.0 [required by dream]
βˆ— install graphql-lwt 0.14.0 [required by dream]
βˆ— install mirage-crypto 0.11.2 [required by dream]
βˆ— install digestif 1.1.4 [required by dream-httpaf]
βˆ— install caqti-lwt 1.9.0 [required by dream]
βˆ— install multipart_form-lwt 0.5.0 [required by dream]
βˆ— install mirage-crypto-rng 0.11.2 [required by dream]
βˆ— install dream-httpaf 1.0.0~alpha2 [required by dream]
βˆ— install mirage-crypto-rng-lwt 0.11.2 [required by dream]
βˆ— install dream 1.0.0~alpha5
===== βˆ— 55 =====

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> :camel:
:arrow_down: retrieved base64.3.5.1 (cached)
:arrow_down: retrieved bigarray-overlap.0.2.1 (cached)
:arrow_down: retrieved bigstringaf.0.9.1 (cached)
:arrow_down: retrieved bigarray-compat.1.1.0 (cached)
:arrow_down: retrieved caqti.1.9.0 (cached)
:arrow_down: retrieved angstrom.0.16.0 (cached)
:arrow_down: retrieved caqti-lwt.1.9.0 (cached)

#=== ERROR while compiling conf-libev.4-12 ====================================#
Sys_error(β€œ~/.opam/repo/default/packages/conf-libev/conf-libev.4-12/files/discover.ml: No such file or directory”)

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> :camel:
β”Œβ”€ The following actions failed
β”‚ :arrow_down: fetch cstruct 6.2.0
β”‚ Ξ» build base64 3.5.1
β”‚ Ξ» build bigarray-compat 1.1.0
β”‚ Ξ» build bigarray-overlap 0.2.1
β”‚ Ξ» build conf-libev 4-12
└─
╢─ No changes have been performed

Run eval $(opam env) to update the current shell environment

System: MacBook Pro M1 running macOS 13.6

Opam is installed from Nix packages.

Does anybody use Dream on macOS and could give some hints how to fix this?

Seems like I can’t even source it:

$ opam source conf-libev                                                                                                  
Fatal error:
Sys_error("~/.opam/repo/default/packages/conf-libev/conf-libev.4-12/files/discover.ml: No such file or directory")

Could you show the output of opam config report ?

Thanks for considering to help me! Here it is:

$ opam config report                                                                                                         # opam config report
# opam-version         2.1.5
# self-upgrade         no
# system               arch=arm64 os=macos os-distribution=macos os-version=13.6
# solver               builtin-mccs+glpk
# install-criteria     -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria     -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs                 7
# repositories         1 (http) (default repo at b7ebd0f8)
# pinned               0
# current-switch       default
[NOTE] External dependency handling not supported for OS family 'macos'.
       You can disable this check using 'opam option --global depext=false'
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /Users/j/.opam/default/lib/ocaml/stublibs:/Users/j/.opam/default/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       5.1.1

Aside from the modified os-distribution and os-family option that is displaying a warning I’m not seeing any issues from a first glance.

Could you try using the latest beta:

bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --dev"

and if it still doesn’t work could you open a ticket in the opam bugtracker?

Thx everybody. I deleted ~/.opam and tried it again. Now it works.

Here are the steps:

  • rm ~/.opam
  • opam init
  • set PKG_CONFIG_PATH to the directory than contains an openssl.pc
  • opam install -y dream