* [Caml-list] OS X linking problem
@ 2013-11-24 8:56 Mykola
0 siblings, 0 replies; only message in thread
From: Mykola @ 2013-11-24 8:56 UTC (permalink / raw)
To: OCaml Mailing List
Hi all,
A strange thing found: ocamlopt can't link against some libraries on my OS X with the following errors:
Undefined symbols for architecture x86_64:
"_caml_atom_table", referenced from:
_intern_alloc in libasmrun.a(intern.o)
_intern_rec in libasmrun.a(intern.o)
_caml_make_vect in libasmrun.a(array.o)
_caml_array_gather in libasmrun.a(array.o)
_caml_alloc in libasmrun.a(alloc.o)
_caml_alloc_array in libasmrun.a(alloc.o)
_caml_alloc_dummy in libasmrun.a(alloc.o)
...
"_caml_code_area_end", referenced from:
_segv_handler in libasmrun.a(signals_asm.o)
"_caml_code_area_start", referenced from:
_segv_handler in libasmrun.a(signals_asm.o)
All of such libraries could be found by the following commands:
% cat test.ml
let _ = Printf.printf "Compiled!!!\n"
% list=(`(ls /usr/lib; ls /usr/local/lib; ls /usr/local/lib/ocaml) | grep '^lib' | sed -e 's/\.[^.]+$//' -e 's/^lib//' | sort -u`)
% for i in $list; do echo -n "$i ... "; ocamlopt -cclib -l$i -o test test.ml > $i.log 2>&1; if [[ $? -eq 0 ]]; then rm $i.log; echo OK; else echo FAILED; fi; done
% grep atom_table *.log
Could somebody tell me where is the problem? And what do I have to do if I need to link against one of such libraries?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-24 8:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-24 8:56 [Caml-list] OS X linking problem Mykola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox