From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 29911BBAF for ; Wed, 23 Jul 2008 09:16:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuMCAMx3hkjB/BYeX2dsb2JhbACSRRcFAgQYBZ8Z X-IronPort-AV: E=Sophos;i="4.31,237,1215381600"; d="scan'208";a="13374667" Received: from smtp23.orange.fr ([193.252.22.30]) by mail2-smtp-roc.national.inria.fr with ESMTP; 23 Jul 2008 09:16:59 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2328.orange.fr (SMTP Server) with ESMTP id 792BC7000089; Wed, 23 Jul 2008 09:16:58 +0200 (CEST) Received: from [192.168.1.66] (APuteaux-154-1-65-47.w81-249.abo.wanadoo.fr [81.249.48.47]) by mwinf2328.orange.fr (SMTP Server) with ESMTP id 3C5967000085; Wed, 23 Jul 2008 09:16:58 +0200 (CEST) X-ME-UUID: 20080723071658247.3C5967000085@mwinf2328.orange.fr Message-ID: <4886DAE6.605@frisch.fr> Date: Wed, 23 Jul 2008 09:16:54 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jonathan Marchand Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Compiling a shared library with amd64 References: <9a3dee4b0807220208v6f81dda5m8ad3802ec266977c@mail.gmail.com> <4885A55E.2070302@frisch.fr> <9a3dee4b0807230008t3d68e3bu920c1a4af658e857@mail.gmail.com> In-Reply-To: <9a3dee4b0807230008t3d68e3bu920c1a4af658e857@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 ocaml:01 cvs:01 -shared:01 foo:01 foo:01 usr:01 lib:01 -rdynamic:01 -wl:01 runtime:01 usr:01 lib:01 ocaml:01 Jonathan Marchand wrote: > I still have the same problem with ocaml from CVS (exemple from rocaml): > > cc -shared -o foo.so foo_rocaml_wrapper.o -L. -L/usr/lib -L. > -rdynamic -Wl,-export-dynamic foo_rocaml_runtime.o > /usr/local/lib/ocaml/libasmrun.a /usr/local/lib/ocaml/libunix.a > /usr/local/lib/ocaml/libnums.a -lruby1.8 -lpthread -ldl -lcrypt -lm > -lc > /usr/bin/ld: /usr/local/lib/ocaml/libasmrun.a(startup.o): relocation > R_X86_64_32 against `a local symbol' can not be used when making a > shared object; recompile with -fPIC > /usr/local/lib/ocaml/libasmrun.a: could not read symbols: Bad value > collect2: ld returned 1 exit status > make: *** [foo.so] Erreur 1 You mentioned in your previous email that you got rid of such errors by adding -fPIC to *COMPOPTS variables. Cannot you do the same for other C libraries? The changes in the CVS only affect the code generated by OCaml, like stdlib.a (the native code produced by ocamlopt for the standard library). -- Alain