Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 298244

Summary: dev-python/gmpy-1.14 fails to build with Python 3.2 (PyCObject)
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: Current packagesAssignee: Stefan Briesenick (RETIRED) <sbriesen>
Status: RESOLVED FIXED    
Severity: normal CC: casevh, esigra
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 292402    
Attachments: gmpy-1.10:20091224-185431.log

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-12-24 18:46:42 UTC
dev-python/gmpy doesn't work with Python 3.2. It uses PyCObject-related functions which are deprecated in Python 3.1 and removed in Python 3.2. PyCapsule-related functions should be used.
http://docs.python.org/3.1/c-api/cobject.html
http://docs.python.org/3.1/c-api/capsule.html

$ python3.2 -c 'import gmpy'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /usr/lib64/python3.2/site-packages/gmpy.so: undefined symbol: PyCObject_FromVoidPtr
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-12-24 18:52:32 UTC
Created attachment 214055 [details]
gmpy-1.10:20091224-185431.log

-Werror=implicit-function-declaration allows to reproduce this bug during building.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-12-29 02:35:11 UTC
http://code.google.com/p/gmpy/source/detail?r=196
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2010-05-07 12:04:05 UTC
gmpy-1.11 is in portage, which compiles fine with python3.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-07 16:54:07 UTC
Building of gmpy extension now succeeds, but building of pysymbolicext extension fails.

src/pysymbolicext.c: In function ‘initpysymbolicext’:
src/pysymbolicext.c:441: error: implicit declaration of function ‘PyCObject_Check’
src/pysymbolicext.c:441: error: implicit declaration of function ‘PyCObject_AsVoidPtr’
src/pysymbolicext.c:441: warning: cast to pointer from integer of different size
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2010-07-20 21:06:01 UTC
since you added gmpy 1.12, is the bug still there?
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-07-21 15:49:58 UTC
I updated summary.
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2010-07-22 11:05:53 UTC
ok, it's an incompability. What to do now? Try to fix it, or wait for new upstream release?

I can't test/do it, since python 3.2 isn't even in portage yet.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-12-06 17:24:03 UTC
Python 3.2_pre* is available in python overlay.
Comment 9 casevh 2011-03-25 03:16:43 UTC
(I'm the current maintainer of gmpy. I just stumbled across this bug. It wasn't reported upstream.)

pysymbolicext.c has been removed from the development version of gmpy 2.x (aka gmpy2) and should have been removed from 1.14. gmpy itself no longer uses PyCObject or PyCapsule functions.

Can the compiling of pysymbolicext.c just be removed from the build?

If not, would I need to release a new version that removes pysymbolicext.c?
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-03-25 19:54:05 UTC
(In reply to comment #9)

We thought that pysymbolicext extension is somehow useful. I have now disabled building of this extension.