You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7654 Reporter: bcc32 Status: resolved (set by @xavierleroy on 2017-10-07T15:20:04Z) Resolution: fixed Priority: normal Severity: minor Version: 4.04.2 Fixed in version: 4.05.0 Category: compiler driver Monitored by:@alainfrisch
Bug description
Consider the following code:
module Make (Int : sig val one : int end) = struct
let () = assert false
let two () = [Int.one + 1]
end
module M = Make (struct let one = 1 end)
let _ = M.two ()
I get a linker error compiling this code using the native-code compiler.
Undefined symbols for architecture x86_64:
"_camlTest__two_1202", referenced from:
_camlTest__entry in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
The text was updated successfully, but these errors were encountered:
Indeed this problem can't be reproduced in 4.05.0 nor in 4.06.0beta1. I think it is related to this series of bug fixes and improvements that went into 4.05: #983
Original bug ID: 7654
Reporter: bcc32
Status: resolved (set by @xavierleroy on 2017-10-07T15:20:04Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.04.2
Fixed in version: 4.05.0
Category: compiler driver
Monitored by: @alainfrisch
Bug description
Consider the following code:
I get a linker error compiling this code using the native-code compiler.
Steps to reproduce
Compile with:
ocamlopt test.ml
Additional information
Expanded example here: https://gist.github.com/bcc32/e6f3aa69443ea253a6a0719c2748d2e1
Compiler error output follows:
Undefined symbols for architecture x86_64:
"_camlTest__two_1202", referenced from:
_camlTest__entry in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking
The text was updated successfully, but these errors were encountered: