From owner-freebsd-gnome@FreeBSD.ORG Wed Aug 15 12:38:27 2012 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3DAA106564A for ; Wed, 15 Aug 2012 12:38:27 +0000 (UTC) (envelope-from demon@FreeBSD.org) Received: from elephant.yandex.ru (elephant.yandex.ru [77.88.34.7]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD4F8FC15 for ; Wed, 15 Aug 2012 12:38:27 +0000 (UTC) Received: from dhcp175-40-red.yandex.net (dhcp175-40-red.yandex.net [95.108.175.40]) by elephant.yandex.ru (Postfix) with ESMTP id 3Wxqmz3Shwz45JpH for ; Wed, 15 Aug 2012 16:32:03 +0400 (MSK) Message-ID: <502B96B0.9090508@FreeBSD.org> Date: Wed, 15 Aug 2012 16:31:44 +0400 From: Dmitry Sivachenko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120609 Thunderbird/13.0 MIME-Version: 1.0 To: gnome@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: 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: Wed, 15 Aug 2012 12:38:27 -0000 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? Thanks!