Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005353OCaml~DO NOT USE (was: OCaml general)public2011-09-01 09:502011-09-06 16:42
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

# 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/
# ocamlopt -verbose -linkall /tmp/
# 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
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)
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
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker