Date: Wed, 15 Aug 2012 20:32:50 -0500 From: Jeremy Messenger <mezz.freebsd@gmail.com> To: Dmitry Sivachenko <demon@freebsd.org> Cc: gnome@freebsd.org Subject: Re: libxml2.a and -fPIC Message-ID: <CADLFttc73QnDGPtjtZE=iGt1ZJ_Sk4vPGbOpePeX0FjnqQemag@mail.gmail.com> In-Reply-To: <502B96B0.9090508@FreeBSD.org> References: <502B96B0.9090508@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 15, 2012 at 7:31 AM, Dmitry Sivachenko <demon@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLFttc73QnDGPtjtZE=iGt1ZJ_Sk4vPGbOpePeX0FjnqQemag>