Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599918 - dev-python/pypy-bin: bump to version 5.6
Summary: dev-python/pypy-bin: bump to version 5.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alice Ferrazzi
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-15 20:28 UTC by Jan Ziak (atomsymbol)
Modified: 2016-12-09 18:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pypy-5.6.0.ebuild (pypy-5.6.0.ebuild,7.20 KB, text/plain)
2016-12-08 20:27 UTC, Jan Ziak (atomsymbol)
Details
5.6.0_all_distutils_cxx.patch (5.6.0_all_distutils_cxx.patch,34.90 KB, patch)
2016-12-08 20:28 UTC, Jan Ziak (atomsymbol)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2016-11-15 20:28:22 UTC
PyPy 5.6 has been released a few days ago: 

https://morepypy.blogspot.sk/2016/11/pypy27-v56-released-stdlib-2712-support.html
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-11-16 16:34:43 UTC
I'm starting the builds in a moment.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-11-16 18:10:56 UTC
Looks like cffi is now broken on amd64...


 * Generating caches and byte-compiling ...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: ./_audioop_cffi.o: relocation R_X86_64_32S against `.data' can not b
e used when making a shared object; recompile with -fPIC
./_audioop_cffi.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
  File "_audioop_build.py", line 621, in <module>
    ffi.compile()
  File "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/api.py", line 672, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/recompiler.py", line 1475, in recompile
    compiler_verbose, debug)
  File "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/ffiplatform.py", line 29, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/ffiplatform.py", line 65, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
VerificationError: LinkError: command 'cc' failed with exit status 1
Comment 3 Jan Ziak (atomsymbol) 2016-12-08 20:27:48 UTC
Created attachment 455544 [details]
pypy-5.6.0.ebuild
Comment 4 Jan Ziak (atomsymbol) 2016-12-08 20:28:31 UTC
Created attachment 455546 [details, diff]
5.6.0_all_distutils_cxx.patch
Comment 5 Jan Ziak (atomsymbol) 2016-12-08 20:39:39 UTC
The issue is caused by deletion of -fPIC in sysconfig_pypy.py.

Patch 5.6.0_all_distutils_cxx.patch fixes this. It enables PyPy 5.6.0 to build successfully on my machine. Aside from the patch: I have dev-python/cffi-1.9.0 installed, but dev-python/cffi-1.5.2 might also be compatible with PyPy 5.6.0.

(In reply to Michał Górny from comment #2)
> Looks like cffi is now broken on amd64...
> 
> 
>  * Generating caches and byte-compiling ...
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/
> ld: ./_audioop_cffi.o: relocation R_X86_64_32S against `.data' can not b
> e used when making a shared object; recompile with -fPIC
> ./_audioop_cffi.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> Traceback (most recent call last):
>   File "_audioop_build.py", line 621, in <module>
>     ffi.compile()
>   File
> "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/
> api.py", line 672, in compile
>     compiler_verbose=verbose, debug=debug, **kwds)
>   File
> "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/
> recompiler.py", line 1475, in recompile
>     compiler_verbose, debug)
>   File
> "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/
> ffiplatform.py", line 29, in compile
>     outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
>   File
> "/var/tmp/portage/dev-python/pypy-5.6.0/image/usr/lib64/pypy/lib_pypy/cffi/
> ffiplatform.py", line 65, in _build
>     raise VerificationError('%s: %s' % (e.__class__.__name__, e))
> VerificationError: LinkError: command 'cc' failed with exit status 1
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-12-08 21:01:21 UTC
Could you expand a little on the patch? I've reordered it and diffed to the old patch, and I see that you've removed the customize() calls. I suppose they do more harm than good but are you sure this doesn't break anything?
Comment 7 Jan Ziak (atomsymbol) 2016-12-08 23:10:29 UTC
An alternative way of fixing the issue would be to extend 2.5.0_all_distutils_cxx.patch with the following lines:

- command = compiler.executables[executable] + flags
+ command = getattr(compiler, executable) + flags

The problem with the current 2.5.0_all_distutils_cxx.patch is that the new sysconfig_pypy.py uses strings while the original sysconfig_pypy.py uses lists of strings to represent commands.

Function customize_compiler in 2.5.0_all_distutils_cxx.patch is examining CFLAGS twice - the second examination is redundant and in fact makes the first one pointless because the code has no effect on compiler.executables[executable].
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-12-09 18:10:44 UTC
commit ebb224abb2e56fab233a69cffdd72c8dd14c5c69
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Fri Dec 9 17:59:54 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Fri Dec 9 19:10:15 2016

    virtual/pypy: Bump to 5.6.0

commit 2a4b1022e9403726b426baa327e192969e92b5a5
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Fri Dec 9 17:59:03 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Fri Dec 9 19:10:14 2016

    dev-python/pypy-bin: Bump to 5.6.0

commit 821aaac711cc96499f4483b6ce88cebfba239c9f
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Thu Dec 8 22:06:33 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Fri Dec 9 19:10:12 2016

    dev-python/pypy: Bump to 5.6.0, #599918
    
    Bump to 5.6.0 release. Includes an updated C/C++ compiler support patch
    by Jan Ziak.

Thanks and enjoy!