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: 5353 Reporter:@zoggy Status: closed (set by @xavierleroy on 2011-09-06T14:42:28Z) Resolution: won't fix Priority: high Severity: major Version: 3.12.1 Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
uname -a
Linux alcazar 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux
These commands:
echo "let x = 1;;" > /tmp/foo.ml
ocamlopt -verbose -linkall /tmp/foo.ml
nm a.out | grep terminfo
produce an executable where some symbols from libasmrun.a are not available, which prevents Dylinlink (in my case, the symbol caml_terminfo_resume is missing)
The solution seems to be to use the --whole-archive of ld, but it has to be put before libasmrun.a, to keep all symbols from this lib, and followed by a --no-whole-archive option to prevent integrating all symbols from next libraries.
The text was updated successfully, but these errors were encountered:
In our code, we use a simple work-around for this issue:
(* Hack to force the inclusion of terminfo.o (found in libasmrun.lib). *)
external setup : unit -> unit = "caml_terminfo_setup"
let () = if false then setup ()
(you can put this code anywhere in your main program)
I can't see a much better solution than Alain's suggestion. Messing with obscure ld flags is nonportable and risky (cf. our frequent surprises with MacOS X's linker...).
Original bug ID: 5353
Reporter: @zoggy
Status: closed (set by @xavierleroy on 2011-09-06T14:42:28Z)
Resolution: won't fix
Priority: high
Severity: major
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
uname -a
Linux alcazar 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux
These commands:
echo "let x = 1;;" > /tmp/foo.ml
ocamlopt -verbose -linkall /tmp/foo.ml
nm a.out | grep terminfo
produce an executable where some symbols from libasmrun.a are not available, which prevents Dylinlink (in my case, the symbol caml_terminfo_resume is missing)
The solution seems to be to use the --whole-archive of ld, but it has to be put before libasmrun.a, to keep all symbols from this lib, and followed by a --no-whole-archive option to prevent integrating all symbols from next libraries.
The text was updated successfully, but these errors were encountered: