[lxml-dev] lxml install problem
Hello, I use CentOS 5.2 without root access and therefore I installed Python in my home folder. Unfortunately, I was not able to get lxml running in the following way: ------ ftp://xmlsoft.org/libxml/ cd ~/temp/libxml2-2.7.7 $ configure --prefix=/home/mit/bin/libxml2 $ make $ make install $ cd /home/mit/programs/python/lib/python2.6/site-packages $ ln -s /home/mit/bin/libxml2/lib/python2.6/site-packages/* . ---------- ftp://xmlsoft.org/libxslt/ $ ./configure --prefix=/home/mit/bin/libxslt --with-libxml-prefix=/home/mit/bin/libxml2 $ make $ make install $ cd /home/mit/programs/python/lib/python2.6/site-packages $ ln -s /home/mit/bin/libxslt/lib/python2.6/site-packages/* . --------- $ cd ~/temp/lxml-2.2.6/ $ python setup.py install --with-xml2-config=/home/mit/bin/libxml2/bin/xml2-config --with-xslt-config=/home/mit/bin/libxslt/bin/xslt-config -------- I got errors by testing the lxml in the following: $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.6-py2.6-linux-x86_64.egg/lxml/etree.so: symbol xmlSchematronSetValidStructuredErrors, version LIBXML2_2.6.32 not defined in file libxml2.so.2 with link time reference
I also tried this: $ldd /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxslt.so.1: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so: /usr/lib64/libxml2.so.2: no version information available (required by /home/mit/programs/python/lib/python2.6/site-packages/lxml-2.2.6-py2.6-linux-x86_64.egg/lxml/etree.so) libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00002b6c90034000) libexslt.so.0 => /usr/lib64/libexslt.so.0 (0x00002b6c90269000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002b6c9047b000) libz.so.1 => /usr/lib64/libz.so.1 (0x00002b6c907b9000) libm.so.6 => /lib64/libm.so.6 (0x00002b6c909cd000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6c90c50000) libc.so.6 => /lib64/libc.so.6 (0x00002b6c90e6b000) libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x00002b6c911bf000) libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00002b6c9140b000) libdl.so.2 => /lib64/libdl.so.2 (0x00002b6c9160f000) /lib64/ld-linux-x86-64.so.2 (0x0000003501c00000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b6c91813000) What did I wrong? Thank you in advance. Best regards,
xyz, 18.05.2010 14:35:
I use CentOS 5.2 without root access and therefore I installed Python in my home folder.
Unfortunately, I was not able to get lxml running in the following way: ------ ftp://xmlsoft.org/libxml/
cd ~/temp/libxml2-2.7.7 $ configure --prefix=/home/mit/bin/libxml2 $ make $ make install
$ cd /home/mit/programs/python/lib/python2.6/site-packages $ ln -s /home/mit/bin/libxml2/lib/python2.6/site-packages/* .
---------- ftp://xmlsoft.org/libxslt/
$ ./configure --prefix=/home/mit/bin/libxslt --with-libxml-prefix=/home/mit/bin/libxml2
$ make $ make install
$ cd /home/mit/programs/python/lib/python2.6/site-packages $ ln -s /home/mit/bin/libxslt/lib/python2.6/site-packages/* .
--------- $ cd ~/temp/lxml-2.2.6/
$ python setup.py install --with-xml2-config=/home/mit/bin/libxml2/bin/xml2-config --with-xslt-config=/home/mit/bin/libxslt/bin/xslt-config --------
I got errors by testing the lxml in the following:
$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.6-py2.6-linux-x86_64.egg/lxml/etree.so: symbol xmlSchematronSetValidStructuredErrors, version LIBXML2_2.6.32 not defined in file libxml2.so.2 with link time reference
Try passing the --auto-rpath option. Or, even better, use --static-deps=true. Stefan
xyz, 18.05.2010 15:07:
On Tue, 18 May 2010 14:48:47 +0200 Stefan Behnel wrote:
xyz wrote:
$ python setup.py install --with-xml2-config=/home/mit/bin/libxml2/bin/xml2-config --with-xslt-config=/home/mit/bin/libxslt/bin/xslt-config
Try passing the --auto-rpath option. Or, even better, use --static-deps=true.
How can I use --static-deps=true. Could give me an example please?
$ python setup.py install --static-deps Stefan
On Tue, 18 May 2010 15:20:57 +0200 Stefan Behnel wrote:
xyz, 18.05.2010 15:07:
On Tue, 18 May 2010 14:48:47 +0200 Stefan Behnel wrote:
xyz wrote:
$ python setup.py install --with-xml2-config=/home/mit/bin/libxml2/bin/xml2-config --with-xslt-config=/home/mit/bin/libxslt/bin/xslt-config
Try passing the --auto-rpath option. Or, even better, use --static-deps=true.
How can I use --static-deps=true. Could give me an example please?
$ python setup.py install --static-deps
Unfortunately it did not work for me with the following commands: $python setup.py install --static-deps Building lxml version 2.2.6. Traceback (most recent call last): File "setup.py", line 119, in <module> STATIC_CFLAGS, STATIC_BINARIES), File "/home/mit/temp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules libxslt_version=OPTION_LIBXSLT_VERSION) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 170, in build_libxml2xslt libxml2_dir = unpack_tarball(download_libxml2(download_dir, libxml2_version), build_dir) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 36, in download_libxml2 version_re, filename, version=version) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 49, in download_library fns = ftp_listdir(location) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 20, in ftp_listdir server = ftplib.FTP(netloc) File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 116, in __init__ self.connect(host) File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 134, in connect self.welcome = self.getresp() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 209, in getresp resp = self.getmultiline() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 195, in getmultiline line = self.getline() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 182, in getline line = self.file.readline() File "/home/mit/programs/python/lib/python2.6/socket.py", line 406, in readline data = self._sock.recv(self._rbufsize) ----------------------------- $ python setup.py install --static-deps=true Building lxml version 2.2.6. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available. Using build configuration of libxslt 1.1.17 Building against libxml2/libxslt in the following directory: /usr/lib64 usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --static-deps not recognized ----------------------------- $python setup.py install --static-deps --with-xml2-config=/home/mit/bin/libxml2/bin/xml2-config --with-xslt-config=/home/mit/bin/libxslt/bin/xslt-config Building lxml version 2.2.6. Traceback (most recent call last): File "setup.py", line 119, in <module> STATIC_CFLAGS, STATIC_BINARIES), File "/home/mit/temp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules libxslt_version=OPTION_LIBXSLT_VERSION) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 170, in build_libxml2xslt libxml2_dir = unpack_tarball(download_libxml2(download_dir, libxml2_version), build_dir) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 36, in download_libxml2 version_re, filename, version=version) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 49, in download_library fns = ftp_listdir(location) File "/home/mit/temp/lxml-2.2.6/buildlibxml.py", line 20, in ftp_listdir server = ftplib.FTP(netloc) File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 116, in __init__ self.connect(host) File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 134, in connect self.welcome = self.getresp() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 209, in getresp resp = self.getmultiline() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 195, in getmultiline line = self.getline() File "/home/mit/programs/python/lib/python2.6/ftplib.py", line 182, in getline line = self.file.readline() File "/home/mit/programs/python/lib/python2.6/socket.py", line 406, in readline data = self._sock.recv(self._rbufsize) socket.error: [Errno 104] Connection reset by peer What did I wrong?
xyz, 19.05.2010 10:06:
$python setup.py install --static-deps [...] "/home/mit/programs/python/lib/python2.6/socket.py", line 406, in readline data = self._sock.recv(self._rbufsize) socket.error: [Errno 104] Connection reset by peer
What did I wrong?
The "--static-deps" option requires FTP access to the servers that serve the libxml2 distribution. Seems like you don't have that. Stefan
On Wed, 19 May 2010 10:35:05 +0200 Stefan Behnel <stefan_ml@behnel.de> wrote:
xyz, 19.05.2010 10:06:
$python setup.py install --static-deps [...] "/home/mit/programs/python/lib/python2.6/socket.py", line 406, in readline data = self._sock.recv(self._rbufsize) socket.error: [Errno 104] Connection reset by peer
What did I wrong?
The "--static-deps" option requires FTP access to the servers that serve the libxml2 distribution. Seems like you don't have that.
Stefan
I gave FTP access now, but the installation failed with a "bad value": $ python setup.py install --static-deps ... make[4]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt/date' make[3]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt/date' make[3]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt' make[4]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt' make[3]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt' make[2]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/exslt' Making install in plugins make[2]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/plugins' make[3]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/plugins' make[3]: Nothing to be done for `install-exec-am'. make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/plugins' make[2]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests/plugins' make[2]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests' make[3]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests' make[3]: Nothing to be done for `install-exec-am'. make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests' make[2]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests' make[1]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26/tests' make[1]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26' make[2]: Entering directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26' test -z "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/bin" || /bin/mkdir -p "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/bin" /usr/bin/install -c xslt-config '/home/mit/py/lxml-2.2.5/build/tmp/libxml2/bin' test -z "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib" || /bin/mkdir -p "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib" /usr/bin/install -c -m 644 xsltConf.sh '/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib' test -z "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/share/aclocal" || /bin/mkdir -p "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/share/aclocal" /usr/bin/install -c -m 644 libxslt.m4 '/home/mit/py/lxml-2.2.5/build/tmp/libxml2/share/aclocal' test -z "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/pkgconfig" || /bin/mkdir -p "/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/pkgconfig" /usr/bin/install -c -m 644 libxslt.pc libexslt.pc '/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/pkgconfig' make[2]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26' make[1]: Leaving directory `/home/mit/py/lxml-2.2.5/build/tmp/libxslt-1.1.26' NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available. Using build configuration of libxml2 2.7.7 and libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib running install running bdist_egg running egg_info writing src/lxml.egg-info/PKG-INFO writing top-level names to src/lxml.egg-info/top_level.txt writing dependency_links to src/lxml.egg-info/dependency_links.txt reading manifest file 'src/lxml.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'src/lxml.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build/lib.linux-x86_64-2.6 creating build/lib.linux-x86_64-2.6/lxml copying src/lxml/builder.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/sax.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.6/lxml copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.6/lxml creating build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/_dictmixin.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.6/lxml/html copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.6/lxml/html running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-2.6 creating build/temp.linux-x86_64-2.6/src creating build/temp.linux-x86_64-2.6/src/lxml gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mit/py/lxml-2.2.5/build/tmp/libxml2/include -I/home/mit/py/lxml-2.2.5/build/tmp/libxml2/include/libxml2 -I/home/mit/py/lxml-2.2.5/build/tmp/libxml2/include/libxslt -I/home/mit/py/lxml-2.2.5/build/tmp/libxml2/include/libexslt -I/home/mit/programs/python/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w gcc -pthread -shared build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/libxml2.a /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/libxslt.a /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/libexslt.a -L/home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib -lz -lm -o build/lib.linux-x86_64-2.6/lxml/etree.so /usr/bin/ld: /home/mit/py/lxml-2.2.5/build/tmp/libxml2/lib/libxml2.a(encoding.o): 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?
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
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?
participants (2)
-
Stefan Behnel -
xyz