Hello! I'v tried to build lxml 2.3.2 with pypy 1.7 (linux64) and got the following error: ------------------------------------------------------------------------------------ $ pypy setup.py build_ext -i pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Building lxml version 2.3.2. Building without Cython. Using build configuration of libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /usr/lib running build_ext building 'lxml.etree' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/lxml cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/local/pypy/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w src/lxml/lxml.etree.c: In function ‘__Pyx_PyObject_Pop’: src/lxml/lxml.etree.c:3683:16: error: ‘PyListObject’ has no member named ‘allocated’ src/lxml/lxml.etree.c:3688:30: error: ‘PySet_Type’ undeclared (first use in this function) src/lxml/lxml.etree.c:3688:30: note: each undeclared identifier is reported only once for each function it appears in src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd’: src/lxml/lxml.etree.c:72226:7: error: ‘_save’ undeclared (first use in this function) .... ... error: command 'cc' failed with exit status 1 ------------------------------------------------------------------------------------ Next I have tried the following (which is probabely a "nonsense"): ------------------------------------------------------------------------------------ $ pypy setup.py build_ext -i -I/usr/include/python2.7 pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Building lxml version 2.3.2. Building without Cython. Using build configuration of libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /usr/lib running build_ext building 'lxml.etree' extension cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/local/pypy/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w cc -shared build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -L/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o /home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so building 'lxml.objectify' extension cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/local/pypy/include -c src/lxml/lxml.objectify.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -w cc -shared build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -L/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o /home/nik/tmp/lxml-2.3.2/src/lxml/objectify.pypy-17.so ------------------------------------------------------------------------------------ $ PYTHONPATH=src pypy pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:11) [PyPy 1.7.0 with GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``happy new year''
from lxml import etree Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: unable to load extension module '/home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so': /home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so: undefined symbol: PyClass_Type
Has anyone ever tried to build lxml with pypy? What is the correct way to build an extension module? Any feedback is very much appreciated! Regards Nik PS: By the way, what do pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) mean? Both libraries are available on my PC.
On Tue, Nov 22, 2011 at 3:15 PM, nitralime <nitralime@googlemail.com> wrote:
Hello!
I'v tried to build lxml 2.3.2 with pypy 1.7 (linux64) and got the following error:
------------------------------------------------------------------------------------ $ pypy setup.py build_ext -i pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Building lxml version 2.3.2. Building without Cython. Using build configuration of libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /usr/lib running build_ext building 'lxml.etree' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/lxml cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/local/pypy/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w src/lxml/lxml.etree.c: In function ‘__Pyx_PyObject_Pop’: src/lxml/lxml.etree.c:3683:16: error: ‘PyListObject’ has no member named ‘allocated’ src/lxml/lxml.etree.c:3688:30: error: ‘PySet_Type’ undeclared (first use in this function) src/lxml/lxml.etree.c:3688:30: note: each undeclared identifier is reported only once for each function it appears in src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd’: src/lxml/lxml.etree.c:72226:7: error: ‘_save’ undeclared (first use in this function) .... ... error: command 'cc' failed with exit status 1 ------------------------------------------------------------------------------------
Next I have tried the following (which is probabely a "nonsense"):
------------------------------------------------------------------------------------ $ pypy setup.py build_ext -i -I/usr/include/python2.7 pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Building lxml version 2.3.2. Building without Cython. Using build configuration of libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /usr/lib running build_ext building 'lxml.etree' extension cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/local/pypy/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w cc -shared build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -L/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o /home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so building 'lxml.objectify' extension cc -fPIC -Wimplicit -I/usr/include/libxml2 -I/usr/include/python2.7 -I/usr/local/pypy/include -c src/lxml/lxml.objectify.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -w cc -shared build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -L/usr/lib -lxslt -lexslt -lxml2 -lz -lm -o /home/nik/tmp/lxml-2.3.2/src/lxml/objectify.pypy-17.so ------------------------------------------------------------------------------------
$ PYTHONPATH=src pypy pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by pypy) pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required by pypy) Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:11) [PyPy 1.7.0 with GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``happy new year''
from lxml import etree Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: unable to load extension module '/home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so': /home/nik/tmp/lxml-2.3.2/src/lxml/etree.pypy-17.so: undefined symbol: PyClass_Type
Has anyone ever tried to build lxml with pypy? What is the correct way to build an extension module?
Any feedback is very much appreciated!
Regards Nik
Hi. lxml is unsupported because it's a cython-generated extension and cython pokes inside internals of CPython objects. This is unsupported and likely will never be (pypy objects are different enough). The fix is to either fix cython or provide a different cython backend. There was some work on the latter, but it did not go very far. For now you have to assume lxml won't work on pypy unfortunately :-/ Cheers, fijal
Hi, I' m failing to install a Grok project with 'groproject' in a PyPy virtual Environment. I don't have this problem on a regular Python-2.7 virtual environment. pypy-c-jit-50199-24a17a8610e1-linux Ubuntu Lucid Lynx Regards, Aroldo. ------ links ----- http://pypi.python.org/pypi/grokproject http://grok.zope.org/about/download ------------ output ------------------------------------- (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which python /home/aroldo/tmp/python/tmp-env-pypy/bin/python (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ python Python 2.7.1 (24a17a8610e1, Dec 06 2011, 04:30:54) [PyPy 1.7.1-dev0 with GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. executing the Python startup file: "~/.pystartup" And now for something completely different: ``out-of-lie-guards''
quit() (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which pip /home/aroldo/tmp/python/tmp-env-pypy/bin/pip (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ env|grep ENV VIRTUAL_ENV=/home/aroldo/tmp/python/tmp-env-pypy PIP_ENVIRONMENT=/home/aroldo/tmp/python/tmp-env-pypy (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ pip install grokproject Downloading/unpacking grokproject Downloading grokproject-2.6.tar.gz (68Kb): 68Kb downloaded Running setup.py egg_info for package grokproject
Downloading/unpacking PasteScript>=1.6 (from grokproject) Downloading PasteScript-1.7.5.tar.gz (129Kb): 129Kb downloaded Running setup.py egg_info for package PasteScript ... Installing grokproject script to /home/aroldo/tmp/python/tmp-env-pypy/bin Running setup.py install for PasteScript ... Successfully installed grokproject PasteScript Paste PasteDeploy Cleaning up... (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which grokproject /home/aroldo/tmp/python/tmp-env-pypy/bin/grokproject (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ grokproject MyCave Enter user (Name of an initial administrator user): grok Enter passwd (Password for the initial administrator user): Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "/home/aroldo/tmp/python/tmp-env-pypy/bin/grokproject", line 8, in <module> load_entry_point('grokproject==2.6', 'console_scripts', 'grokproject')() File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/grokproject/main.py", line 91, in main exit_code = runner.run(option_args + ['-t', template_name, project] + extra_args) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/command.py", line 238, in run result = self.command() File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/create_distro.py", line 125, in command vars = template.check_vars(vars, self) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/grokproject/templates.py", line 66, in check_vars vars = super(GrokProject, self).check_vars(vars, cmd) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/templates.py", line 73, in check_vars response = cmd.challenge(prompt, var.default, var.should_echo) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/command.py", line 321, in challenge response = prompt_method(prompt).strip() File "/opt/pypy/lib-python/2.7/getpass.py", line 74, in unix_getpass stream.flush() # issue7208 IOError: [Errno 29] Illegal seek: '<fdopen>' (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$
On Wed, Dec 7, 2011 at 6:31 AM, Aroldo Souza-Leite <asouzaleite@gmx.de> wrote:
I' m failing to install a Grok project with 'groproject' in a PyPy virtual Environment. I don't have this problem on a regular Python-2.7 virtual environment.
Your error seems like a pypy bug, but are you sure grok is compatible with pypy? Doesn't it need ZODB? -- Leonardo Santagada
On Wed, Dec 7, 2011 at 10:31 AM, Aroldo Souza-Leite <asouzaleite@gmx.de> wrote:
Hi,
I' m failing to install a Grok project with 'groproject' in a PyPy virtual Environment. I don't have this problem on a regular Python-2.7 virtual environment.
pypy-c-jit-50199-24a17a8610e1-linux Ubuntu Lucid Lynx
Regards,
Aroldo.
------ links -----
http://pypi.python.org/pypi/grokproject http://grok.zope.org/about/download
------------ output ------------------------------------- (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which python /home/aroldo/tmp/python/tmp-env-pypy/bin/python (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ python Python 2.7.1 (24a17a8610e1, Dec 06 2011, 04:30:54) [PyPy 1.7.1-dev0 with GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. executing the Python startup file: "~/.pystartup" And now for something completely different: ``out-of-lie-guards''
quit() (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which pip /home/aroldo/tmp/python/tmp-env-pypy/bin/pip (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ env|grep ENV VIRTUAL_ENV=/home/aroldo/tmp/python/tmp-env-pypy PIP_ENVIRONMENT=/home/aroldo/tmp/python/tmp-env-pypy (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ pip install grokproject Downloading/unpacking grokproject Downloading grokproject-2.6.tar.gz (68Kb): 68Kb downloaded Running setup.py egg_info for package grokproject
Downloading/unpacking PasteScript>=1.6 (from grokproject) Downloading PasteScript-1.7.5.tar.gz (129Kb): 129Kb downloaded Running setup.py egg_info for package PasteScript ... Installing grokproject script to /home/aroldo/tmp/python/tmp-env-pypy/bin Running setup.py install for PasteScript ... Successfully installed grokproject PasteScript Paste PasteDeploy Cleaning up... (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ which grokproject /home/aroldo/tmp/python/tmp-env-pypy/bin/grokproject (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$ grokproject MyCave Enter user (Name of an initial administrator user): grok Enter passwd (Password for the initial administrator user): Traceback (most recent call last): File "app_main.py", line 51, in run_toplevel File "/home/aroldo/tmp/python/tmp-env-pypy/bin/grokproject", line 8, in <module> load_entry_point('grokproject==2.6', 'console_scripts', 'grokproject')() File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/grokproject/main.py", line 91, in main exit_code = runner.run(option_args + ['-t', template_name, project] + extra_args) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/command.py", line 238, in run result = self.command() File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/create_distro.py", line 125, in command vars = template.check_vars(vars, self) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/grokproject/templates.py", line 66, in check_vars vars = super(GrokProject, self).check_vars(vars, cmd) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/templates.py", line 73, in check_vars response = cmd.challenge(prompt, var.default, var.should_echo) File "/home/aroldo/tmp/python/tmp-env-pypy/site-packages/paste/script/command.py", line 321, in challenge response = prompt_method(prompt).strip() File "/opt/pypy/lib-python/2.7/getpass.py", line 74, in unix_getpass stream.flush() # issue7208 IOError: [Errno 29] Illegal seek: '<fdopen>' (tmp-env-pypy)aroldo@aroldo-laptop:~/tmp/python$
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
This does look like a pypy bug, in fact it may be a dupe of https://bugs.pypy.org/issue956 but it has to be doublechecked.
participants (4)
-
Aroldo Souza-Leite
-
Leonardo Santagada
-
Maciej Fijalkowski
-
nitralime