caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Marchand" <jonathlela@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Compiling a shared library with amd64
Date: Tue, 22 Jul 2008 11:08:08 +0200	[thread overview]
Message-ID: <9a3dee4b0807220208v6f81dda5m8ad3802ec266977c@mail.gmail.com> (raw)

Hi,

I would like to compile a native shared library with ocaml on amd64. I
googled the problem and as far as I understand, I need both runtimes
and libraries (the ones used in my library) compiled with -fPIC:

http://caml.inria.fr/mantis/view.php?id=3924

The above trick allowed me to compile ocaml runtimes with -fPIC
(linker doesn't complain about libasmrun.a anymore):

BYTECCCOMPOPTS=-fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
NATIVECCCOMPOPTS=-Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
NATIVECCPROFOPTS=-Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
SUPPORTS_SHARED_LIBRARIES=true
BNG_ARCH=amd64

http://caml.inria.fr/pub/ml-archives/caml-list/2005/12/6ac193aca085629903e7efd79ae0274f.en.html

But I still have issues with the ocaml libraries. I don't know how to
compile the standard library from the ocaml tarball with -fPIC. I
looked at the Makefiles, but I could'nt figure out what to change to
achieve this task.

I've looked at rocaml (http://eigenclass.org/hiki/rocaml) which fails
to compile amd64 library too, so I imagine the problem is definitly in
the way of compiling the ocaml libraries.

Any hints how to compile these libraries with -fPIC ?

Jonathan


             reply	other threads:[~2008-07-22  9:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22  9:08 Jonathan Marchand [this message]
2008-07-22  9:16 ` [Caml-list] " Alain Frisch
2008-07-23  7:08   ` Jonathan Marchand
2008-07-23  7:16     ` Alain Frisch
     [not found]       ` <9a3dee4b0807230117m102363a1ubca8ed069e15db41@mail.gmail.com>
2008-07-23  8:24         ` Alain Frisch

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=9a3dee4b0807220208v6f81dda5m8ad3802ec266977c@mail.gmail.com \
    --to=jonathlela@gmail.com \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).