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):
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
Thanks for filing this bug report.
What version of gcc is this with?
This is with the version from rawhide
gcc ppc 4.5.1-6.fc12 local 11 M
built in a f12 mock chroot.
See upstream bug tracker for a patch I had to include in the python 2.7 and 3.2 package to make it build.
Can the patch I posted on the upstream bug tracker be included?
I've added a version of the patch as:
Building python3-3.2-0.8.b2.fc15 for dist-rawhide
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2703674
python3 build was also successful on ppc:
Could you also apply the same patch to python-2.7?
Or should I open a new bug?
(In reply to comment #6)
> python3 build was also successful on ppc:
Thanks for the feedback.
> Could you also apply the same patch to python-2.7?
> 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