Plugin containing ppx_compare library crashes at load
Steps to reproduce the issue
Create an empty Frama-C plugin with the ppx_compare
library dependency, and try to run Frama-C with this plugin.
Project structure:
hello/
├── dune
├── dune-project
└── hello.ml
dune-project:
(lang dune 3.2)
(using dune_site 0.1)
(name frama-c-hello)
(package (name frama-c-hello))
dune:
(library
(name hello)
(public_name frama-c-hello.core)
(flags -open Frama_c_kernel :standard)
(libraries frama-c.kernel ppx_compare)
)
(plugin
(optional)
(name hello)
(libraries frama-c-hello.core)
(site (frama-c plugins))
)
hello.ml:
let run () = print_endline "Hello"
let () = Db.Main.extend run
Execute dune build
and dune exec -- frama-c
.
Expected behaviour
Plugin prints Hello
to the console.
Actual behaviour
Frama-C crashes with the following backtrace:
[kernel] Current source was: :0
The full backtrace is:
Raised at Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 350, characters 23-73
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_site_plugins__Plugins.load_gen in file "otherlibs/dune-site/src/plugins/plugins.ml", line 255, characters 4-36
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_site_plugins__Plugins.load_gen in file "otherlibs/dune-site/src/plugins/plugins.ml", line 255, characters 4-36
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_site_plugins__Plugins.load_gen in file "otherlibs/dune-site/src/plugins/plugins.ml", line 255, characters 4-36
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_site_plugins__Plugins.load_gen in file "otherlibs/dune-site/src/plugins/plugins.ml", line 255, characters 4-36
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Dune_site_plugins__Plugins.load_gen in file "otherlibs/dune-site/src/plugins/plugins.ml", line 255, characters 4-36
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Frama_c_kernel__Kernel.bootstrap_loader in file "src/kernel_services/plugin_entry_points/kernel.ml", line 933, characters 35-62
Called from Frama_c_kernel__Cmdline.parse_and_boot in file "src/kernel_services/cmdline_parameters/cmdline.ml", line 894, characters 2-22
Called from Frama_c_kernel__Cmdline.catch_toplevel_run in file "src/kernel_services/cmdline_parameters/cmdline.ml", line 233, characters 4-8
Unexpected error (Dynlink.Error (Dynlink.Cannot_open_dll "Dynlink.Error (Dynlink.Cannot_open_dll \"Failure(\\\"/home/tb/.opam/default/lib/ppxlib/astlib/astlib.cmxs: undefined symbol: camlConfig__32\\\")\")")).
Please report as 'crash' at https://git.frama-c.com/pub/frama-c/issues
Your Frama-C version is 27.1 (Cobalt).
Note that a version and a backtrace alone often do not contain enough
information to understand the bug. Guidelines for reporting bugs are at:
https://git.frama-c.com/pub/frama-c/-/wikis/Guidelines-for-reporting-bugs
Contextual information
- Frama-C installation mode: using Opam (ppx_compare is also installed using Opam)
- Frama-C version:
27.1 (Cobalt)
- Plug-in used: Hello World plugin
- OS name:
Fedora Linux 38 (Workstation Edition)
Additional information (optional)
When I put the ppx_compare library also inside the (plugin (libraries ...))
section in dune
file, the same thing happens.