On Wed, 19 May 2010 11:56:31 +0200 Stefan Behnel <stefan_ml@behnel.de> wrote:
xyz, 19.05.2010 11:43:
relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/libxml2.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1
What did I wrong?
You didn't read the error message. Pass "-fPIC" in your CFLAGS environment variable.
Stefan
I have got a new problem after I compiled lxml in the following way: $ CFLAGS="-fPIC";export CFLAGS $ python setup.py install --static-deps ... copying build/lib.linux-x86_64-2.6/lxml/cssselect.py -> build/bdist.linux-x86_64/egg/lxml copying build/lib.linux-x86_64-2.6/lxml/usedoctest.py -> build/bdist.linux-x86_64/egg/lxml copying build/lib.linux-x86_64-2.6/lxml/pyclasslookup.py -> build/bdist.linux-x86_64/egg/lxml creating build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/html5parser.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/builder.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/clean.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/__init__.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/defs.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/_html5builder.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/_setmixin.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/soupparser.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/formfill.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/_dictmixin.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/_diffcommand.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/usedoctest.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/ElementSoup.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/html/diff.py -> build/bdist.linux-x86_64/egg/lxml/html copying build/lib.linux-x86_64-2.6/lxml/etree.so -> build/bdist.linux-x86_64/egg/lxml copying build/lib.linux-x86_64-2.6/lxml/objectify.so -> build/bdist.linux-x86_64/egg/lxml byte-compiling build/bdist.linux-x86_64/egg/lxml/builder.py to builder.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/__init__.py to __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/ElementInclude.py to ElementInclude.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/_elementpath.py to _elementpath.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/doctestcompare.py to doctestcompare.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/sax.py to sax.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/cssselect.py to cssselect.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/usedoctest.py to usedoctest.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/pyclasslookup.py to pyclasslookup.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/html5parser.py to html5parser.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/builder.py to builder.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/clean.py to clean.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/__init__.py to __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/defs.py to defs.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/_html5builder.py to _html5builder.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/_setmixin.py to _setmixin.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/soupparser.py to soupparser.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/formfill.py to formfill.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/_dictmixin.py to _dictmixin.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/_diffcommand.py to _diffcommand.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/usedoctest.py to usedoctest.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/ElementSoup.py to ElementSoup.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/html/diff.py to diff.pyc creating stub loader for lxml/etree.so creating stub loader for lxml/objectify.so byte-compiling build/bdist.linux-x86_64/egg/lxml/etree.py to etree.pyc byte-compiling build/bdist.linux-x86_64/egg/lxml/objectify.py to objectify.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying src/lxml.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying src/lxml.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying src/lxml.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying src/lxml.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO copying src/lxml.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt creating dist creating 'dist/lxml-2.2.5-py2.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing lxml-2.2.5-py2.6-linux-x86_64.egg creating /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.5-py2.6-linux-x86_64.egg Extracting lxml-2.2.5-py2.6-linux-x86_64.egg to /home/mit/programs/python/lib/python2.6/site-packages Removing lxml 2.2.6 from easy-install.pth file Adding lxml 2.2.5 to easy-install.pth file Installed /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.5-py2.6-linux-x86_64.egg Processing dependencies for lxml==2.2.5 Finished processing dependencies for lxml==2.2.5 ~ $ python Python 2.6.4 (r264:75706, Jan 28 2010, 14:19:59) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from lxml import etree Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.5-py2.6-linux-x86_64.egg/lxml/etree.so: undefined symbol: gcry_check_version
I have libgcrypt installed $rpm -qa libgcrypt libgcrypt-1.4.4-5.el5.i386 libgcrypt-1.4.4-5.el5.x86_64 What did I wrong?