[py-dev] error building greenlets

Alain Poirier alain.poirier at net-ng.com
Wed Aug 24 23:31:57 CEST 2005


A code compiled with the -fPIC option must preserve the ebx register. So, if
it's noted as "clobbered", the new versions of gcc emit an error.

A 'push ebx' / 'pop ebx' pair need to be added into the slp_switch function
of switch_x86_unix.h 

Le Mercredi 24 Août 2005 19:14, Uche Ogbuji a écrit :
> I can't get greenlets to build on Fedora Core 4 Linux + Python 2.4.1 (or
> Python 2.3.4.  I keep getting the following error.  I'm using a pull
> form Subversion this week.  I've tried all sorts of fussing about with
> the full py library (py/env.py and all that) and all sorts of random
> tinkering, to no avail.  I don't find anything on the error via Google.
> Any ideas?
>
>
> Traceback (most recent call last):
>   File "test_generator.py", line 1, in ?
>     from py.magic import greenlet
>   File "/home/uogbuji/src/publiccvs/py-dist/py/initpkg.py", line 181, in
> __getattr__
>     result = self.__package__._resolve(extpy)
>   File "/home/uogbuji/src/publiccvs/py-dist/py/initpkg.py", line 69, in
> _resolve    implmodule = self._loadimpl(fspath[:-3])
>   File "/home/uogbuji/src/publiccvs/py-dist/py/initpkg.py", line 99, in
> _loadimpl
>     return __import__(modpath, None, None, ['__doc__'])
>   File "/home/uogbuji/src/publiccvs/py-dist/py/magic/greenlet.py", line
> 5, in ?
>     greenlet = path.getpymodule().greenlet
>   File "/home/uogbuji/src/publiccvs/py-dist/py/path/local/local.py",
> line 408, in getpymodule
>     mod = make_module_from_c(self)
>   File "/home/uogbuji/src/publiccvs/py-dist/py/misc/buildcmodule.py",
> line 66, in make_module_from_c
>     raise RuntimeError("cannot compile %s: %s\n%s" % (cfile, e,
> RuntimeError: cannot
> compile
> /home/uogbuji/src/publiccvs/py-dist/py/c-extension/greenlet/greenlet.c:
> error: command 'gcc' failed with exit status 1
> /home/uogbuji/src/publiccvs/py-dist/py/c-extension/greenlet/greenlet.c:
> In function ‘g_switchstack’:
> /home/uogbuji/src/publiccvs/py-dist/py/c-extension/greenlet/greenlet.c:27
>4: warning: control may reach end of non-void function ‘slp_switch’ being
> inlined
> /home/uogbuji/src/publiccvs/py-dist/py/c-extension/greenlet/switch_x86_un
>ix.h:34: error: PIC register ‘ebx’ clobbered in ‘asm’
>
>
> [1] http://www.xml.com/pub/at/24




More information about the Pytest-dev mailing list