From: "Jan Beulich" Subject: Re: xen 4.4.0 dependency lzo fails to build from source due to fPIC Date: Tue, 29 Jul 2014 07:46:40 +0100 Message-ID: <53D75F700200007800027174@mail.emea.novell.com> References: <53D6BA4C.7080408@overnetdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D6BA4C.7080408@overnetdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anthony Wright Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 28.07.14 at 23:02, wrote: > If xen detects lzo, it tries to build tools/xclib/libxenguest.so.4.4.0 > with lzo support but fails with the error: > > /usr/bin/ld: > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64/liblzo2.a(lzo_ini > t.o): > relocation R_X86_64_PC32 against symbol '_lzo_config_check' can not be > used when making a shared object; recompile with -fPIC > > reading around the subject it would seem to be a problem with the lzo > library (2.08) which has been built without using the -fPIC option. > However, when I look at the lzo package there is no standard way to > build it with -fPIC. My workaround has been simply to remove the lzo > package, but I'm not sure this is a good solution, and I don't > understand why this problem doesn't seem to have been encountered before. > > Should I be building Xen with LZO support? (does everybody else build > without LZO support?) > > Should I be adding fPIC to the LZO options and rebuilding LZO? > > Is there something else I'm doing wrong that is causing the problem? The expectation is that there is a shared library to link against, not just a static one. If you want the static-only case supported, then you'll need to contribute patches (and imo those should then cover not just lzo, but all of the compression methods other than lz4). Jan