Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005353OCamlOCaml generalpublic2011-09-01 09:502011-09-06 16:42
Reporterguesdon 
Assigned To 
PriorityhighSeveritymajorReproducibilityhave not tried
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version 
Summary0005353: Missing symbols from libasmrun.a even with -linkall
DescriptionHello,

# 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0006109)
frisch (developer)
2011-09-01 11:09

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)
(0006118)
xleroy (administrator)
2011-09-06 16:42

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...).

- Issue History
Date Modified Username Field Change
2011-09-01 09:50 guesdon New Issue
2011-09-01 11:09 frisch Note Added: 0006109
2011-09-06 16:42 xleroy Note Added: 0006118
2011-09-06 16:42 xleroy Status new => closed
2011-09-06 16:42 xleroy Resolution open => won't fix


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker