seletz / z3c.recipe.staticlxml

A buildout recipe for building a statically linked lxml library
Other
1 stars 2 forks source link

Error compiling lxml for plone/FreeBSD 9 64bits #8

Closed MordicusEtCubitus closed 11 years ago

MordicusEtCubitus commented 11 years ago

Hi,

While compiling lxml with Plone Unified Installer I've encoutered this error using z3c.recipe.staticlxml:

xml: Building lxml ... 2 /usr/bin/ld: <...>/parts/lxml/libxslt/lib/libxslt.a(xslt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 3 <...>/parts/lxml/libxslt/lib/libxslt.a: could not read symbols: Bad value

It appears that my processor, Intel Core i5 was not seen as 'X86_64' by patform.machine() but as 'amd64'.

So I've patched z3c.recipe.staticlxml-0.8-py2.7.egg/z3c/recipe/staticlxml/init.py like below to solve this issue:

99c99
<         if platform.machine() == 'x86_64':

---
>         if platform.machine() in ('x86_64', 'amd64'):
121c121
<         if platform.machine() == 'x86_64':

---
>         if platform.machine() in ('x86_64', 'amd64'):

Could you implement this work around or another testing '64' is contained in platform.machine() by example in next release ?

Thanks in advance.

Best regards. PS: Si my blog entry at http://www.makina-corpus.org/blog/error-compiling-lxml-plonefreebsd-64-srclxmllxmletreec1380-error-expected-specifier-qualifier-l for more details