Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007516OCamlcompiler driverpublic2017-04-16 06:212017-04-16 10:46
Reporterwhitequark 
Assigned Todra 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSOS Version
Product Version4.04.0 
Target VersionFixed in Version4.04.1 
Summary0007516: ocamlopt -plugin is broken
DescriptionIt seems that some symbols are not exported properly from ocamlopt. This bug is actually extremely weird, because on my opam install (as is usual) both ocamlc and ocamlopt are native-code, but it works with ocamlc.

$ file `which ocamlc`
~/.opam/4.04.0+32bit/bin/ocamlc: symbolic link to ocamlc.opt
$ file `which ocamlopt`
~/.opam/4.04.0+32bit/bin/ocamlopt: symbolic link to ocamlopt.opt
Steps To Reproduce$ cat >t.ml
let () =
  let x = [|0;1;2|] in (* allocate something *)
  for i = 0 to 2 do print_int x.(i) done
$ ocamlbuild t.cmxs
$ ocamlopt -plugin _build/t.cmxs
File "_none_", line 1:
Error: error loading shared library: _build/t.cmxs: undefined symbol: caml_alloc3 while loading argument of -plugin
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017740)
dra (developer)
2017-04-16 10:46

This was fixed in GPR#980 (https://github.com/ocaml/ocaml/pull/980 [^]) and is in OCaml 4.04.1

- Issue History
Date Modified Username Field Change
2017-04-16 06:21 whitequark New Issue
2017-04-16 06:22 whitequark Summary ocamopt -plugin is broken => ocamlopt -plugin is broken
2017-04-16 06:24 whitequark Description Updated View Revisions
2017-04-16 10:46 dra Note Added: 0017740
2017-04-16 10:46 dra Status new => closed
2017-04-16 10:46 dra Assigned To => dra
2017-04-16 10:46 dra Resolution open => fixed
2017-04-16 10:46 dra Fixed in Version => 4.04.1


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker