Bug 889784

Summary: Distutils: Incorrect shared library extension on linux
Product: [Fedora] Fedora Reporter: Sandro Mani <manisandro>
Component: python3Assignee: Dave Malcolm <dmalcolm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.badger, amcnabb, bgilbert, bkabrda, dmalcolm, jreznik, pf.rhlists, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-01 10:55:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 922149    
Bug Blocks: 894484    
Attachments:
Description Flags
Patch none

Description Sandro Mani 2012-12-23 14:30:05 UTC
Created attachment 668051 [details]
Patch

Description of problem:
The find_library_file searches libraries with the python-versioned ".cpython-33m.so" extension, and hence always fails to find regular libraries.

Investigation shows that the library extension is being overridden by the one defined in the /usr/lib64/python3.3/config-3.3m/Makefile. The responsible line is
compiler.shared_lib_extension = so_ext
at
/usr/lib64/python3.3/distutils/sysconfig.py@customize_compiler::235
which overrides the default (and correct)
shared_lib_extension = ".so"
set at
/usr/lib64/python3.3/distutils/unixcompiler.py::77

A tentative patch is simply to comment out the statement at sysconfig.py::235 (patch attached).

See also upstream bug report http://bugs.python.org/issue16754


Version-Release number of selected component (if applicable):
python3-3.3.0-2.fc19.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Attempt to build a project with setuptools where the setup.py uses find_library_file
2. find_library_file will fail to find any regular shared library

Comment 1 Toshio Ernie Kuratomi 2013-01-09 23:15:11 UTC
Note, this is one of the dependencies of the F19 Pillow feature which was approved by FESCo today.  dmalcolm: any ideas about whether we can move forward with the attached patch?

Comment 2 Dave Malcolm 2013-01-10 17:20:16 UTC
(In reply to comment #1)
> Note, this is one of the dependencies of the F19 Pillow feature which was
> approved by FESCo today.  dmalcolm: any ideas about whether we can move
> forward with the attached patch?
For reference, this is: https://fedoraproject.org/wiki/Features/Pillow

Comment 3 Sandro Mani 2013-01-16 10:46:38 UTC
May I ask for a quick status update on the bug? Essentially just to know whether I should post a pillow review request without the python3 subpackages for now, or whether it's worth waiting a little while longer for this to get fixed.

Thanks.

Comment 4 Toshio Ernie Kuratomi 2013-02-04 23:56:48 UTC
I think we better get the package reviewed without this bug fixed otherwise it will get too late in the cycle to test it.

Comment 5 Sandro Mani 2013-02-05 22:59:56 UTC
Ok, review posted, see bug #908114 . I really wish someone could rebuild python3 with the attached patch though...

Comment 6 Toshio Ernie Kuratomi 2013-02-28 16:13:49 UTC
Hey dmalcolm, at yesterday's fesco meeting, we wondered if there was any update on this.  Even if it's a response of "I have no time, could someone else look into the following aspects of the patch:" it would help us know where things stand (and perhaps get someone to do some of the legwork.)

Comment 7 Dave Malcolm 2013-03-07 02:43:37 UTC
Sorry for not getting around to this; I'm about to disappear for a week.

The analysis seems correct, and patch seems like a reasonable workaround.  Feel free to commit and rebuild.

Comment 8 Sandro Mani 2013-03-10 23:52:07 UTC
Could someone with sufficient privileges please do the rebuild? Thanks.

Comment 9 Toshio Ernie Kuratomi 2013-03-14 16:34:17 UTC
Rebuilt for rawhide.... For F19, getting a build failure:
http://kojipkgs.fedoraproject.org//work/tasks/2064/5122064/build.log

I don't think it's related to the patch.  F-19 is having difficulties right now (although I wouldn't think it would cause this either).  I can have another try at building tonight or tomorrow night (at a conference so I'm only free occasionally).

Comment 10 Toshio Ernie Kuratomi 2013-03-15 08:19:30 UTC
dmalcolm analyzed this.and found that the problem is in the release name.  /etc/fedora-release has schrödinger in it.  the non ascii char is what is killi the platform.platform call.

Comment 11 Toshio Ernie Kuratomi 2013-03-15 15:17:01 UTC
For the UnicodeError:

https://bugzilla.redhat.com/show_bug.cgi?id=922149

http://bugs.python.org/issue17429

Scratch build with the patch I created for that issue applied: http://koji.fedoraproject.org/koji/taskinfo?taskID=5126807

If that completes, I (or anyone else) can make a new build that fixes both that issue and this.

Comment 12 Toshio Ernie Kuratomi 2013-03-15 22:28:04 UTC
Fixed in
http://koji.fedoraproject.org/koji/taskinfo?taskID=5129382

Please check if you are able to build the python3-pillow subpackages now.

Comment 13 Sandro Mani 2013-03-17 00:26:04 UTC
Thanks a lot Toshio. I'll push Pillow 2.0.0 with the python3 packages enabled as soon as I've found out why one of the tests hangs...

Comment 14 Sandro Mani 2013-04-01 10:55:42 UTC
This is now fixed.