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

Deal with system compilers lacking compiler-libs #26583

Open
kit-ty-kate opened this issue Sep 18, 2024 · 0 comments
Open

Deal with system compilers lacking compiler-libs #26583

kit-ty-kate opened this issue Sep 18, 2024 · 0 comments

Comments

@kit-ty-kate
Copy link
Member

Currently the ocaml-system package expects compiler-libs to be installed if ocaml is installed.
However on some platforms this is not the case.

It would be nice to have at least a detection of the issue early (e.g. a meta base-compiler-libs or something that checks that the package is here), otherwise packages will fail with weird error messages for people who don't know the OCaml compiler internals, such as:

#=== ERROR while compiling ocamlfind.1.9.6 ====================================#
# context     2.2.1 | linux/x86_64 | ocaml-system.5.1.1 | https://opam.ocaml.org#accd28112a6751e427167bf0056618f09868d85f
# path        ~/.opam/5.1.1/.opam-switch/build/ocamlfind.1.9.6
# command     ~/.opam/opam-init/hooks/sandbox.sh build make all
# exit-code   2
# env-file    ~/.opam/log/ocamlfind-131493-b2399b.env
# output-file ~/.opam/log/ocamlfind-131493-b2399b.out
### output ###
# [...]
# Warning 6 [labels-omitted]: label preds was omitted in the application of this function.
# ocamlc -I +compiler-libs  -o ocamlfind -g findlib.cma unix.cma \
#            -I +unix -I +dynlink ocaml_args.cmo frontend.cmo
# ocamlc -I +compiler-libs -opaque   -I +unix -I +dynlink -c topfind.mli
# ocamlc -I +compiler-libs -opaque   -I +unix -I +dynlink -g -c topfind.ml
# File "topfind.ml", line 49, characters 4-25:
# 49 |     Topdirs.dir_directory d;
#          ^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound module Topdirs
# make[1]: *** [Makefile:176: topfind.cmo] Error 2
# make[1]: Leaving directory '/home/aggressive_racer1/.opam/5.1.1/.opam-switch/build/ocamlfind.1.9.6/src/findlib'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant