Skip to content

opaque and g flags are not detected correctly on ocaml 5.2 #78

@emillon

Description

@emillon

Hi,
OCaml 5.2.0 contains ocaml/ocaml#12613 which will make ocamlc and ocamlopt error if no input files are passed.
The configure script relies on this do detect support for -opaque and -g:

ocamlc -opaque >/dev/null 2>/dev/null || opaque=""

ocamlopt -g >/dev/null 2>/dev/null || native_debugging_info=""

Concretely, building findlib in an opam switch before and after the ocaml change yields the following diff:

--- /tmp/opam-good/lib/findlib/Makefile.config
+++ /tmp/opam-bad/lib/findlib/Makefile.config
@@ -24,8 +24,8 @@
 SYSTEM=linux
 NUMTOP=
 SH=
-OPAQUE=-opaque
-OCAMLOPT_G=-g
+OPAQUE=
+OCAMLOPT_G=
 CHECK_BEFORE_INSTALL=0
 INSTALLDIR = install -d
 # change to INSTALLDIR = mkdir -p   when BSD install is unavavailable

This is visible to the end user because linking against findlib will now emit this warning:

Warning 58 [no-cmx-file]: no cmx file was found in path for module Findlib, and its interface was not compiled with -opaque

Thanks

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