From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pAULcRWY009794 for ; Wed, 30 Nov 2011 22:38:28 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcBAKah1k7RVde2kGdsb2JhbABEqwoIIgEBAQEJCQ0bBCGBaQUdAiwBGx4DEggBB10BEQEFASI1hSaCN5kEglwKi2SCaIRxPYhxAgUKg2OHMwSIKIwvjVw9hBU X-IronPort-AV: E=Sophos;i="4.71,273,1320620400"; d="scan'208";a="133409090" Received: from mail-ey0-f182.google.com ([209.85.215.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 Nov 2011 22:38:26 +0100 Received: by eaai12 with SMTP id i12so2197690eaa.27 for ; Wed, 30 Nov 2011 13:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=ecgwmNyV/bQswCY1oUHxQYoO00KCnr0P91tGEmlUovI=; b=N0J1NBy86+DZ9WNuUJ40gI+komZ2Zf1pcv9vwjkza/SlY3x+EdLmE3OCAn3xBWXzh3 6/8cTGvkqZAxha17FwqOufb+xMJQv4XmzoS3MPKiUlTT8qGPKMPS+JwVoSUsjZRFZEn/ HF/x9yiEWRuPGwTeeoFNq9hT2FzTxlzWlL/Vw= Received: by 10.227.198.213 with SMTP id ep21mr1670409wbb.18.1322689106084; Wed, 30 Nov 2011 13:38:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.126.105 with HTTP; Wed, 30 Nov 2011 13:37:55 -0800 (PST) From: Alex Rubinsteyn Date: Wed, 30 Nov 2011 16:37:55 -0500 Message-ID: To: Caml List Content-Type: multipart/alternative; boundary=00151747b60a51081004b2fa8e47 Subject: [Caml-list] Problem with 64-bit shared libraries? --00151747b60a51081004b2fa8e47 Content-Type: text/plain; charset=ISO-8859-1 Hi, I'd like to package up some OCaml code (along with C bindings) as a shared library. However, I'm encountering the following linker error: /usr/bin/ld: /usr/lib/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/lib/ocaml/libasmrun.a: could not read symbols: Bad value Do I have to recompile OCaml with -fPIC to put the runtime inside a shared library? --00151747b60a51081004b2fa8e47 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=A0

I'd like to package up some OCaml code (along= with C bindings) as a shared library. However, I'm encountering the fo= llowing linker error:

/usr/bin/ld: /usr/lib/o= caml/libasmrun.a(startup.o): relocation R_X86_64_32 against `.rodata.str1.1= ' can not be used when making a shared object; recompile with -fPIC
/usr/lib/ocaml/libasmrun.a: could not read symbols: Bad value

Do I have to recompile OCaml with -fPIC to put th= e runtime inside a shared library?=A0


--00151747b60a51081004b2fa8e47--