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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 5933BBBAF for ; Tue, 22 Jul 2008 11:08:10 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkBAIpAhUjRVZKzcGdsb2JhbACSBEMBDAMIGgOXSoVV X-IronPort-AV: E=Sophos;i="4.31,230,1215381600"; d="scan'208";a="27560761" Received: from wa-out-1112.google.com ([209.85.146.179]) by mail4-smtp-sop.national.inria.fr with ESMTP; 22 Jul 2008 11:08:09 +0200 Received: by wa-out-1112.google.com with SMTP id j4so957204wah.3 for ; Tue, 22 Jul 2008 02:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=Vkz6GdsJUfOgeyL4iECNfJEVLMk5jHhet9H+cO8o51c=; b=dgqsc4/Q1BIA7N1VTAjPD8iyTnIUYTJSMCpS5Zi679g9fSiyNM2QQxcNtIeQltB59g 7QYRZUeSEe2d/pBltQVexu0Z5IiqWmLpEqwcCUcT7HyXs1b57y54W1yVcGJ2UqfVCygT kZMfs/4g7Y1bMd2WBlGRaW+N+oITFhNoztk0Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Jorcel2diJXNk45psnPd0lZXgvBrI5FIsdI0ANjiARzSDrBdSiwiAA6rJh027Pus5I A4Gm/P8+I7WFrTLnvyrS9hTZYy2az+qpW2eJL0Ed95jVbpB1Ur8r2xaNTPhCB7mR4LaT +pYEAFSypnDAVDCdJ/konb9m8CUBDv8WpjxNE= Received: by 10.115.73.20 with SMTP id a20mr3567542wal.213.1216717688222; Tue, 22 Jul 2008 02:08:08 -0700 (PDT) Received: by 10.114.194.19 with HTTP; Tue, 22 Jul 2008 02:08:08 -0700 (PDT) Message-ID: <9a3dee4b0807220208v6f81dda5m8ad3802ec266977c@mail.gmail.com> Date: Tue, 22 Jul 2008 11:08:08 +0200 From: "Jonathan Marchand" To: caml-list@yquem.inria.fr Subject: Compiling a shared library with amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam: no; 0.00; ocaml:01 runtimes:01 -fpic:01 ocaml:01 runtimes:01 -fpic:01 libasmrun:01 -wall:01 -wall:01 tarball:01 makefiles:01 marchand:98 compile:01 compile:01 caml-list:01 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