Skip to content

Building dune crashes with Unexpected_find_result for pp library #12075

@Janno

Description

@Janno

Expected Behavior

make release succeeds

Actual Behavior

make release reports this error:

Internal error, please report upstream including the contents of _build/log.
Description:
  ("Unexpected find result", { found = Not_found; lib.name = "pp" })
Raised at Stdune__Code_error.raise in file "stdune__Code_error.ml", line 11,
  characters 30-62
Called from Fiber__Scheduler.exec in file "fiber__Scheduler.ml", line 77,
  characters 8-11
-> required by ("<unnamed>", ())
-> required by ("<unnamed>", ())
-> required by ("<unnamed>", ())
-> required by ("load-dir", In_build_dir "default/test/blackbox-tests/utils")
-> required by ("toplevel", ())

I must not crash.  Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration.  I will fully express my cases. 
Execution will pass over me and through me.  And when it has gone past, I
will unwind the stack along its path.  Where the cases are handled there will
be nothing.  Only I will remain.
make: *** [Makefile:34: release] Error 1       

Reproduction

  1. opam install --deps-only ./dune.opam
  2. make release

Specifications

  • Version of dune (output of dune --version): 3.12.0-2096-g6c8a5a3 (from ./dune.exe --version), commit: 6c8a5a339c7cdbcda6cc70ba0556fc5eec765977
  • Version of ocaml (output of ocamlc --version): 4.14.2
  • Operating system (distribution and version): Linux archlinux 6.15.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000 x86_64 GNU/Linux

Additional information

Contents of `_build/log`:
# ./_boot/dune.exe build @install -p dune --profile dune-bootstrap
# OCAMLPARAM: unset
# Shared cache: enabled-except-user-rules
# Shared cache location: /home/janno/.cache/dune/db
# Workspace root: /home/janno/src/dune
# Auto-detected concurrency: 32
# Dune context:
#  { name = "default"
#  ; kind = "default"
#  ; profile = User_defined "dune-bootstrap"
#  ; merlin = true
#  ; fdo_target_exe = None
#  ; build_dir = In_build_dir "default"
#  ; instrument_with = []
#  }
$ /home/janno/.opam/br-2025-02-26/bin/ocamlc.opt -config > /tmp/dune_c3b7fe_output
$ /usr/bin/uname -s > /tmp/dune_e87de2_output
Output of `opam list`
# Packages matching: installed
# Name                      # Installed    # Synopsis
abstract_algebra            v0.16.0        A small library describing abstract algebra concepts
angstrom                    0.16.1         Parser combinators built for speed and memory-efficiency
astring                     0.8.5          Alternative String module for OCaml
async                       v0.16.0        Monadic concurrency library
async_durable               v0.16.0        Durable connections for use with async
async_extra                 v0.16.0        Monadic concurrency library
async_js                    v0.16.0        A small library that provide Async support for JavaScript platforms
async_kernel                v0.16.0        Monadic concurrency library
async_rpc_kernel            v0.16.0        Platform-independent core of Async RPC library
async_rpc_websocket         v0.16.0        Library to serve and dispatch Async RPCs over websockets
async_ssl                   v0.16.1-1      An Async-pipe-based interface with OpenSSL
async_unix                  v0.16.0        Monadic concurrency library
async_websocket             v0.16.0        A library that implements the websocket protocol on top of Async
atd                         2.16.0         Parser for the ATD data format description language
atdgen                      2.15.0         Generates efficient JSON serializers, deserializers and validators
atdgen-runtime              2.16.0         Runtime library for code generated by atdgen
atdts                       2.15.0         TypeScript code generation for ATD APIs
babel                       v0.16.0        A library for defining Rpcs that can evolve over time without breaking backward compatibility.
base                        v0.16.3        Full standard library replacement for OCaml
base-bigarray               base
base-bytes                  base           Bytes library distributed with the OCaml compiler
base-threads                base
base-unix                   base
base64                      3.5.1          Base64 encoding for OCaml
base_bigstring              v0.16.0        String type based on [Bigarray], for use in I/O and C-bindings
base_quickcheck             v0.16.0        Randomized testing framework, designed for compatibility with Base
bheap                       2.0.0          Priority queues
bigarray-compat             1.1.0          Compatibility library to use Stdlib.Bigarray when possible
bignum                      v0.16.0        Core-flavoured wrapper around zarith's arbitrary-precision rationals
bigstringaf                 0.10.0         Bigstring intrinsics and fast blits based on memcpy/memmove
bin_prot                    v0.16.0        A binary protocol generator
biniou                      1.2.2          Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve
bonsai                      v0.16.0        A library for building dynamic webapps, using Js_of_ocaml
bos                         0.2.1          Basic OS interaction for OCaml
camlp-streams               5.0.1          The Stream and Genlex libraries for use with Camlp4 and Camlp5
camlzip                     1.12           Accessing compressed files in ZIP, GZIP and JAR format
chrome-trace                3.18.2         Chrome trace event generation library
cmdliner                    1.3.0          Declarative definition of command line interfaces for OCaml
cohttp                      5.3.1          An OCaml library for HTTP clients and servers
cohttp-async                5.3.0          CoHTTP implementation for the Async concurrency library
cohttp_async_websocket      v0.16.0        Websocket library for use with cohttp and async
conduit                     8.0.0          A network connection establishment library
conduit-async               8.0.0          A network connection establishment library for Async
conf-bash                   1              Virtual package to install the Bash shell
conf-gmp                    5              Virtual package relying on a GMP lib system installation
conf-gmp-powm-sec           4              Virtual package relying on a GMP lib with constant-time modular exponentiation
conf-libffi                 2.0.0          Virtual package relying on libffi system installation
conf-libssl                 4              Virtual package relying on an OpenSSL library system installation
conf-linux-libc-dev         0              Virtual package relying on the installation of the Linux kernel headers files
conf-pkg-config             4              Check if pkg-config is installed and create an opam switch local pkgconfig folder
conf-zlib                   1              Virtual package relying on zlib
core                        v0.16.2        Industrial strength alternative to OCaml's standard library
core_bench                  v0.16.0        Benchmarking library
core_kernel                 v0.16.0        Industrial strength alternative to OCaml's standard library
core_unix                   v0.16.0        Unix-specific portions of Core
cppo                        1.8.0          Code preprocessor like cpp for OCaml
crunch                      4.0.0          Convert a filesystem into a static OCaml module
cryptokit                   1.16.1         A library of cryptographic primitives
csexp                       1.5.2          Parsing and printing of S-expressions in Canonical form
ctypes                      0.23.0         Combinators for binding to C libraries without writing any C
ctypes-foreign              0.23.0         Dynamic access to foreign C libraries using Ctypes
diffable                    v0.16.0        An interface for diffs.
domain-name                 0.4.1          RFC 1035 Internet domain names
dot-merlin-reader           4.9            Reads config files for merlin
dune                        3.17.2         Fast, portable, and opinionated build system
dune-build-info             3.17.2         Embed build information inside executable
dune-configurator           3.18.2         Helper library for gathering system configuration
dune-rpc                    3.18.2         Communicate with dune using rpc
dyn                         3.18.2         Dynamic type
easy-format                 1.3.4          High-level and functional interface to the Format module of the OCaml standard library
either                      1.0.0          Compatibility Either module
expect_test_helpers_core    v0.16.0        Helpers for writing expectation tests
fiber                       3.7.0          Dune's monadic structured concurrency library
fieldslib                   v0.16.0        Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values
fileutils                   0.6.4          API to manipulate files (POSIX like) and filenames
fix                         20250428       Algorithmic building blocks for memoization, recursion, and more
fmt                         0.10.0         OCaml Format pretty-printer combinators
fpath                       0.7.3          File system paths for OCaml
fuzzy_match                 v0.16.0        Libraries for fuzzy string matching
gen                         1.1            Iterators for OCaml, both restartable and consumable
gen_js_api                  1.1.5          Easy OCaml bindings for JavaScript libraries
ISO8601                     0.2.6          ISO 8601 and RFC 3999 date parsing for OCaml
incr_dom                    v0.16.0        A library for building dynamic webapps, using Js_of_ocaml
incr_map                    v0.16.0        Helpers for incremental operations on map like data structures
incr_select                 v0.16.0        Handling of large set of incremental outputs from a single input
incremental                 v0.16.1        Library for incremental computations
indentation_buffer          v0.16.0        A library for building strings with indentation
int_repr                    v0.16.0        Integers of various widths
integers                    0.7.0          Various signed and unsigned integer types for OCaml
ipaddr                      5.6.0          A library for manipulation of IP (and MAC) address representations
ipaddr-sexp                 5.6.0          A library for manipulation of IP address representations using sexp
jane-street-headers         v0.16.0        Jane Street C header files
janestreet_lru_cache        v0.16.1        An LRU Cache implementation.
js_of_ocaml                 5.8.2          Compiler from OCaml bytecode to JavaScript
js_of_ocaml-compiler        5.8.2          Compiler from OCaml bytecode to JavaScript
js_of_ocaml-ppx             5.8.2          Compiler from OCaml bytecode to JavaScript
js_of_ocaml_patches         v0.16.0        Additions to js_of_ocaml's standard library that are required by Jane Street libraries.
jsonm                       1.0.2          Non-blocking streaming JSON codec for OCaml
jsonrpc                     1.18.0         Jsonrpc protocol implemenation
jst-config                  v0.16.0        Compile-time configuration for Jane Street libraries
lambdasoup                  1.1.1          Easy functional HTML scraping and manipulation with CSS selectors
logs                        0.9.0          Logging infrastructure for OCaml
lsp                         1.18.0         LSP protocol implementation in OCaml
lwt                         5.7.0          Promises and event-driven I/O
macaddr                     5.6.0          A library for manipulation of MAC address representations
magic-mime                  1.3.1          Map filenames to common MIME types
markup                      1.0.3          Error-recovering functional HTML5 and XML parsers and writers
memprof-limits              0.2.1          Memory limits, allocation limits, and thread cancellation
memtrace                    0.2.3          Streaming client for Memprof
memtrace_viewer             v0.16.0        Interactive memory profiler based on Memtrace
menhir                      20240715       An LR(1) parser generator
menhirCST                   20240715       Runtime support library for parsers generated by Menhir
menhirLib                   20240715       Runtime support library for parsers generated by Menhir
menhirSdk                   20240715       Compile-time library for auxiliary tools related to Menhir
merlin                      4.16-414       Editor helper, provides completion, typing and source browsing in Vim and Emacs
merlin-lib                  4.16-414       Merlin's libraries
mtime                       2.1.0          Monotonic wall-clock time for OCaml
num                         1.6            The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml                       4.14.2         The OCaml compiler (virtual package)
ocaml-compiler-libs         v0.12.4        OCaml compiler libraries repackaged
ocaml-config                2              OCaml Switch Configuration
ocaml-embed-file            v0.16.0        Files contents as module constants
ocaml-lsp-server            1.18.0         LSP Server for OCaml
ocaml-option-flambda        1              Set OCaml to be compiled with flambda activated
ocaml-option-fp             1              Set OCaml to be compiled with frame-pointers enabled
ocaml-syntax-shims          1.0.0          Backport new syntax to older OCaml versions
ocaml-variants              4.14.2+options Official release of OCaml 4.14.2
ocaml-version               4.0.1          Manipulate, parse and generate OCaml compiler version strings
ocaml_intrinsics            v0.16.2        Intrinsics
ocamlbuild                  0.16.1         OCamlbuild is a build system with builtin rules to easily build most OCaml projects
ocamlc-loc                  3.18.2         Parse ocaml compiler output into structured form
ocamlfind                   1.9.6          A library manager for OCaml
ocamlformat                 0.27.0         Auto-formatter for OCaml code
ocamlformat-lib             0.27.0         OCaml Code Formatter
ocamlformat-rpc-lib         0.27.0         Auto-formatter for OCaml code (RPC mode)
ocp-indent                  1.8.1          A simple tool to indent OCaml programs
ocplib-endian               1.2            Optimised functions to read and write int16/32/64 from strings and bigarrays
octavius                    1.2.2          Ocamldoc comment syntax parser
odoc                        2.4.2          OCaml Documentation Generator
odoc-parser                 2.4.2          Parser for ocaml documentation comments
ojs                         1.1.5          Runtime Library for gen_js_api generated libraries
ordering                    3.18.2         Element ordering
ordinal_abbreviation        v0.16.0        A minimal library for generating ordinal names of integers.
parsexp                     v0.16.0        S-expression parsing library
patdiff                     v0.16.1        File Diff using the Patience Diff algorithm
patience_diff               v0.16.0        Diff library using Bram Cohen's patience diff algorithm
polling_state_rpc           v0.16.0        An RPC which tracks state on the client and server so it only needs to send diffs across the wire.
pp                          2.0.0          Pretty-printing library
ppx_assert                  v0.16.0        Assert-like extension nodes that raise useful errors on failure
ppx_base                    v0.16.0        Base set of ppx rewriters
ppx_bench                   v0.16.0        Syntax extension for writing in-line benchmarks in ocaml code
ppx_bin_prot                v0.16.0        Generation of bin_prot readers and writers from types
ppx_cold                    v0.16.0        Expands [@cold] into [@inline never][@specialise never][@local never]
ppx_compare                 v0.16.0        Generation of comparison functions from types
ppx_css                     v0.16.0        A ppx that takes in css strings and produces a module for accessing the unique names defined within
ppx_custom_printf           v0.16.0        Printf-style format-strings for user-defined string conversion
ppx_derivers                1.2.1          Shared [@@deriving] plugin registry
ppx_deriving                6.0.2          Type-driven code generation for OCaml
ppx_deriving_yojson         3.9.0          JSON codec generator for OCaml
ppx_disable_unused_warnings v0.16.0        Expands [@disable_unused_warnings] into [@warning "-20-26-32-33-34-35-36-37-38-39-60-66-67"]
ppx_enumerate               v0.16.0        Generate a list containing all values of a finite type
ppx_expect                  v0.16.1        Cram like framework for OCaml
ppx_fields_conv             v0.16.0        Generation of accessor and iteration functions for ocaml records
ppx_fixed_literal           v0.16.0        Simpler notation for fixed point literals
ppx_globalize               v0.16.0        A ppx rewriter that generates functions to copy local values to the global heap
ppx_hash                    v0.16.0        A ppx rewriter that generates hash functions from type expressions and definitions
ppx_here                    v0.16.0        Expands [%here] into its location
ppx_ignore_instrumentation  v0.16.0        Ignore Jane Street specific instrumentation extensions
ppx_import                  1.11.0         A syntax extension for importing declarations from interface files
ppx_inline_test             v0.16.0        Syntax extension for writing in-line tests in ocaml code
ppx_jane                    v0.16.0        Standard Jane Street ppx rewriters
ppx_js_style                v0.16.0        Code style checker for Jane Street Packages
ppx_let                     v0.16.0        Monadic let-bindings
ppx_log                     v0.16.0        Ppx_sexp_message-like extension nodes for lazily rendering log messages
ppx_module_timer            v0.16.0        Ppx rewriter that records top-level module startup times
ppx_optcomp                 v0.16.0        Optional compilation for OCaml
ppx_optional                v0.16.0        Pattern matching on flat options
ppx_pattern_bind            v0.16.0        A ppx for writing fast incremental bind nodes in a pattern match
ppx_pipebang                v0.16.0        A ppx rewriter that inlines reverse application operators `|>` and `|!`
ppx_sexp_conv               v0.16.0        [@@deriving] plugin to generate S-expression conversion functions
ppx_sexp_message            v0.16.0        A ppx rewriter for easy construction of s-expressions
ppx_sexp_value              v0.16.0        A ppx rewriter that simplifies building s-expressions from ocaml values
ppx_stable                  v0.16.0        Stable types conversions generator
ppx_stable_witness          v0.16.0        Ppx extension for deriving a witness that a type is intended to be stable.  In this    context, stable means that the serialization format will never change.  This allows    programs running at different versions of the code to safely communicate.
ppx_string                  v0.16.0        Ppx extension for string interpolation
ppx_tydi                    v0.16.0        Let expressions, inferring pattern type from expression.
ppx_typed_fields            v0.16.0        GADT-based field accessors and utilities
ppx_typerep_conv            v0.16.0        Generation of runtime types from type declarations
ppx_variants_conv           v0.16.0        Generation of accessor and iteration functions for ocaml variant types
ppx_yojson_conv             v0.16.0        [@@deriving] plugin to generate Yojson conversion functions
ppx_yojson_conv_lib         v0.16.0        Runtime lib for ppx_yojson_conv
ppxlib                      0.35.0         Standard infrastructure for ppx rewriters
profunctor                  v0.16.0        A library providing a signature for simple profunctors and traversal of a record
protocol_version_header     v0.16.0        Protocol versioning
ptime                       1.2.0          POSIX time for OCaml
ptmap                       2.0.5          Maps of integers implemented as Patricia trees
ptset                       1.0.1          Sets of integers implemented as Patricia trees
re                          1.13.2         RE is a regular expression library for OCaml
record_builder              v0.16.0        A library which provides traversal of records with an applicative
result                      1.5            Compatibility Result module
rresult                     0.7.0          Result value combinators for OCaml
sedlex                      3.2            An OCaml lexer generator for Unicode
sel                         0.6.0          Simple Event Library
seq                         base           Compatibility package for OCaml's standard iterator type starting from 4.07.
sexp_grammar                v0.16.0        Sexp grammar helpers
sexp_pretty                 v0.16.0        S-expression pretty-printer
sexplib                     v0.16.0        Library for serializing OCaml values to and from S-expressions
sexplib0                    v0.16.0        Library containing the definition of S-expressions and some base converters
spawn                       v0.17.0        Spawning sub-processes
splittable_random           v0.16.0        PRNG that can be split into independent streams
stdio                       v0.16.0        Standard IO library for OCaml
stdlib-shims                0.3.0          Backport some of the new stdlib features to older compiler
stdune                      3.18.2         Dune's unstable standard library
stored_reversed             v0.16.0        A library for representing a list temporarily stored in reverse order.
streamable                  v0.16.1        A collection of types suitable for incremental serialization
stringext                   1.6.0          Extra string functions for OCaml
textutils                   v0.16.0        Text output utilities
textutils_kernel            v0.16.0        Text output utilities
tilde_f                     v0.16.0        Provides a let-syntax for continuation-passing style.
time_now                    v0.16.0        Reports the current time
timezone                    v0.16.0        Time-zone handling
toml                        7.1.0          Library for TOML with a parser, a serializer and a printer
topkg                       1.0.8          The transitory OCaml software packager
typerep                     v0.16.0        Typerep is a library for runtime types
tyxml                       4.6.0          A library for building correct HTML and SVG documents
uchar                       0.0.2          Compatibility library for OCaml's Uchar module
uri                         4.4.0          An RFC3986 URI/URL parsing library
uri-sexp                    4.4.0          An RFC3986 URI/URL parsing library
uucp                        15.0.0         Unicode character properties for OCaml
uuseg                       15.0.0         Unicode text segmentation for OCaml
uutf                        1.0.4          Non-blocking streaming Unicode codec for OCaml
variantslib                 v0.16.0        Part of Jane Street's Core library
virtual_dom                 v0.16.0        OCaml bindings for the virtual-dom library
xdg                         3.18.2         XDG Base Directory Specification
yaml                        3.2.0          Parse and generate YAML 1.1/1.2 files
yojson                      2.2.2          Yojson is an optimized parsing and printing library for the JSON format
zarith                      1.14           Implements arithmetic and logical operations over arbitrary-precision integers
zarith_stubs_js             v0.16.1        Javascripts stubs for the Zarith library

Steps to reproduce opam switch:

  1. opam switch create --no-switch --empty dune-crash
  2. eval $(opam env --switch=dune-crash --set-switch)
  3. opam repo add archive git+https://github.com/ocaml/opam-repository-archive
  4. Download exported switch https://gist.github.com/Janno/8a3e6d9fe3d34a096a5d75d685c5b165
  5. opam switch import <path-to-exported-switch>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions