Bug 661510 - Building fails on powerpc
Summary: Building fails on powerpc
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: rawhide
Hardware: powerpc
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: fedora-ppc
TreeView+ depends on / blocked
 
Reported: 2010-12-08 21:40 UTC by Adrian Reber
Modified: 2011-01-06 16:34 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-01-05 23:39:10 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Python 10655 None None None Never

Description Adrian Reber 2010-12-08 21:40:59 UTC
Description of problem:
I am trying to build python3 on a powerpc machine and it failes with:

#error "Don't know how to implement timestamp counter for this architecture"

Version-Release number of selected component (if applicable):
python3-3.2-0.5.a1.fc15

Following in the python3.spec fixes it for me:
sed -i -e "s,__ppc__,__powerpc__,g" Python/ceval.c

In the code there if following comment:

#if defined(__ppc__) /* <- Don't know if this is the correct symbol; this
                           section should work for GCC on any PowerPC
                           platform, irrespective of OS.
                           POWER?  Who knows :-) */

and it seems that is wrong. Looking at the output of the compiler __powerpc__ is defined:

$ gcc -dM -E -x c /tmp/foo.c  | grep powerpc
#define __powerpc__ 1
#define __powerpc 1
#define powerpc 1

Comment 1 Dave Malcolm 2010-12-08 22:11:48 UTC
Thanks for filing this bug report.

What version of gcc is this with?

Comment 2 Adrian Reber 2010-12-08 22:18:10 UTC
This is with the version from rawhide

gcc                    ppc    4.5.1-6.fc12              local             11 M

built in a f12 mock chroot.

Comment 3 Adrian Reber 2010-12-09 12:50:37 UTC
See upstream bug tracker for a patch I had to include in the python 2.7 and 3.2 package to make it build.

Comment 4 Adrian Reber 2010-12-26 08:50:05 UTC
Can the patch I posted on the upstream bug tracker be included?

Comment 6 Adrian Reber 2011-01-06 10:50:09 UTC
Thanks!

python3 build was also successful on ppc:

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=115655

Could you also apply the same patch to python-2.7?

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=115657

Or should I open a new bug?

Comment 7 Dave Malcolm 2011-01-06 16:34:25 UTC
(In reply to comment #6)
> python3 build was also successful on ppc:
> 
> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=115655

Thanks for the feedback.

> Could you also apply the same patch to python-2.7?
> 
> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=115657

Sure.

> Or should I open a new bug?
No need; I've applied it to the "python" package:

 Building python-2.7.1-2.fc15 for dist-rawhide
 Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2705263


Note You need to log in before you can comment on or make changes to this bug.