From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DFF0B7F918 for ; Fri, 6 Jun 2014 17:44:00 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of andre.costea@gmail.com) identity=pra; client-ip=209.85.223.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre.costea@gmail.com"; x-sender="andre.costea@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of andre.costea@gmail.com designates 209.85.223.179 as permitted sender) identity=mailfrom; client-ip=209.85.223.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre.costea@gmail.com"; x-sender="andre.costea@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f179.google.com) identity=helo; client-ip=209.85.223.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="andre.costea@gmail.com"; x-sender="postmaster@mail-ie0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoCAFnhkVPRVd+zlWdsb2JhbABZhDiCbMISCBYPAQEBAQcNCQkSKoQcER0BGx4DEgkBBjcCJAERAQUBFgwbGogLAQMRnl6DEWqLJ4Fygw2TWwoZJw1khSQRAQUMkVmBTASKK4thhAqRTxgphHkw X-IPAS-Result: AgoCAFnhkVPRVd+zlWdsb2JhbABZhDiCbMISCBYPAQEBAQcNCQkSKoQcER0BGx4DEgkBBjcCJAERAQUBFgwbGogLAQMRnl6DEWqLJ4Fygw2TWwoZJw1khSQRAQUMkVmBTASKK4thhAqRTxgphHkw X-IronPort-AV: E=Sophos;i="4.98,989,1392159600"; d="scan'208";a="78472006" Received: from mail-ie0-f179.google.com ([209.85.223.179]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 06 Jun 2014 17:44:00 +0200 Received: by mail-ie0-f179.google.com with SMTP id rd18so2711880iec.10 for ; Fri, 06 Jun 2014 08:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2N3jgzOnA4+jM0YZhnif0YC5dztLTqNbGvBYnKd8U/s=; b=gdK0vkAm5NlpcfxZLQZfoCaxvI/Kou3WShD5tSzqOnXdHDsFPe7KjPYkQ6Rg2lZKLB R20TY1TqHOz2qgsLxBITEPxFDFXbGTXWgCGjWbMoHbXmt6sbQnYcuvYd9/khzfjJIh2+ K7uRXB0E5GMyMZS7zTQKMvCu7w39MzVoXX4So+HElopLBaJ+tSZsua/XMzsdjCbNPRkX C0PQ1zxqXfjxR6O38EyL7bA620BY3SIyeitfPuvC8sbkBihBUpnT8zezuacODp36fpkU O03dKTiCt/Qiv+DhuNI/7ZUIchkcm8CWPqH3mqoWcI5MlWcDhM/YY4K+TGxHXZLVzOYg SqnA== MIME-Version: 1.0 X-Received: by 10.42.81.72 with SMTP id y8mr6892393ick.71.1402069439202; Fri, 06 Jun 2014 08:43:59 -0700 (PDT) Received: by 10.50.117.101 with HTTP; Fri, 6 Jun 2014 08:43:59 -0700 (PDT) Date: Fri, 6 Jun 2014 23:43:59 +0800 Message-ID: From: Andreea Costea To: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=90e6ba614e42dfc8d804fb2cba8c X-Validation-by: andre.costea@gmail.com Subject: [Caml-list] static linking --90e6ba614e42dfc8d804fb2cba8c Content-Type: text/plain; charset=UTF-8 Hi, I'm trying to build a rather big system written in Ocaml, using ocamlbuild. I managed to set all the needed flags nicely, so that the resulted binaries can run on any Unix machine, independent on their Ocaml distribution. However, on certain machines I have problems with the compatibility between the C libraries. Hence, I tried using "-ccopt -static" for the -lflags and -cflags, respectively, in order to produce the desired statically linked binaries while building the project. Unfortunately, this attempt leads to the following error: "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `cos' with pointer equality in `/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.a(s_sin.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" Does this mean I need to recompile the gcc libraries using -pie? Or does it mean I am using the wrong method to build the standalone executable? Any recommendation to modify the building process (i would prefer to use ocambuild)? Your answer is much appreciated, Andreea --90e6ba614e42dfc8d804fb2cba8c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I'm trying to build a rather bi= g system written in Ocaml, using ocamlbuild. I managed to set all the neede= d flags nicely, so that the resulted binaries can run on any Unix machine, = independent on their Ocaml distribution. However, on certain machines I hav= e problems with the compatibility between the C libraries. Hence, I tried u= sing "-ccopt -static" =C2=A0for the -lflags and -cflags, respecti= vely, in order to produce the desired statically linked binaries while buil= ding the project. Unfortunately, this attempt leads to the following error:=

"/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `cos= 9; with pointer equality in `/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86= _64-linux-gnu/libm.a(s_sin.o)' can not be used when making an executabl= e; recompile with -fPIE and relink with -pie"

Does this mean I need to recompile the gcc libraries us= ing -pie? Or does it mean I am using the wrong method to build the standalo= ne executable? Any recommendation to modify the building process (i would p= refer to use ocambuild)?=C2=A0

Your answer is much appreciated,
Andreea





--90e6ba614e42dfc8d804fb2cba8c--