From: Mykola <nick@mykola.org>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] OS X linking problem
Date: Sun, 24 Nov 2013 10:56:06 +0200 [thread overview]
Message-ID: <EBDAD085-8BE4-4F32-A11F-4FC60500E911@mykola.org> (raw)
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?
reply other threads:[~2013-11-24 8:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EBDAD085-8BE4-4F32-A11F-4FC60500E911@mykola.org \
--to=nick@mykola.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox