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

ocamlopt -plugin is broken #7516

Closed
vicuna opened this Issue Apr 16, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Apr 16, 2017

Original bug ID: 7516
Reporter: @whitequark
Assigned to: @dra27
Status: closed (set by @dra27 on 2017-04-16T08:46:43Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: Linux
Version: 4.04.0
Fixed in version: 4.04.1
Category: compiler driver

Bug description

It 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

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Apr 16, 2017

Comment author: @dra27

This was fixed in #980 (#980) and is in OCaml 4.04.1

@vicuna vicuna closed this Apr 16, 2017

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.