From owner-freebsd-gnome@FreeBSD.ORG Thu Aug 16 01:32:51 2012 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C93C5106566C; Thu, 16 Aug 2012 01:32:51 +0000 (UTC) (envelope-from mezz.freebsd@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 839588FC14; Thu, 16 Aug 2012 01:32:51 +0000 (UTC) Received: by obbun3 with SMTP id un3so3847156obb.13 for ; Wed, 15 Aug 2012 18:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Vh/n04jfITrpk+j7OxzRQ3DaTm1eS4XotBHFITrz+B4=; b=Nf4fVtxQUlqLniJ0hmXD+4moxohtZwPcP0kzAUTx0sO/EfWB4NSjCFLP2f670Uwetu cpcTmc9sdx8n7wk82BJp/VlU5OaJLMHCF7xKhQQ15LP7qgeglEXLFvQqYqlrrOqmpzc2 G8F3ibCVecXEB8b9MJgtdhpUku87aO+WA0790RaG0oZZhZUS+g1nmRPVy3NqBFrOzaR4 Apq2MozjLO7qihR5brXTXVzZgCNn8+76Tp3VwDVXoIE0r59CbSvU8kHurWSY0DNceBP9 myseDOSd7mw662rlIyGLW6pBEfvDSIX5Cp0hXJfNUut+FiXT+Gh6YxgwH1CmF4Ut+dSt QL2A== MIME-Version: 1.0 Received: by 10.60.25.193 with SMTP id e1mr3324669oeg.87.1345080770977; Wed, 15 Aug 2012 18:32:50 -0700 (PDT) Received: by 10.76.97.168 with HTTP; Wed, 15 Aug 2012 18:32:50 -0700 (PDT) In-Reply-To: <502B96B0.9090508@FreeBSD.org> References: <502B96B0.9090508@FreeBSD.org> Date: Wed, 15 Aug 2012 20:32:50 -0500 Message-ID: From: Jeremy Messenger To: Dmitry Sivachenko Content-Type: text/plain; charset=ISO-8859-1 Cc: gnome@freebsd.org Subject: Re: libxml2.a and -fPIC X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2012 01:32:51 -0000 On Wed, Aug 15, 2012 at 7:31 AM, Dmitry Sivachenko wrote: > Hello! > > I am writing some kind of shared library at work which uses libxml2. > > I want to link statically with it. > > When I try, I get the following error: > > /usr/bin/ld: /usr/local/lib/libxml2.a(error.o): relocation R_X86_64_32 > against `a local symbol' can not be used when making a shared object; > recompile with -fPIC > > If I add -fPIC to CFLAGS and recompile libxml2 port, this error disappears. > > Is it possible to make this change to port so libxml2.a is always built with > -fPIC? Sure, go ahead. Cheers, Mezz > Thanks! -- mezz.freebsd@gmail.com - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org