[fedora-arm] Bootstrapping python

Jon Masters jcm at redhat.com
Fri Jul 8 09:17:42 UTC 2011


On Fri, 2011-07-08 at 05:09 -0400, Jon Masters wrote:
> On Tue, 2011-07-05 at 08:45 -0500, Dennis Gilmore wrote:
> > On Monday, July 04, 2011 11:40:21 PM Jon Masters wrote:
> > > On Mon, 2011-07-04 at 03:40 -0400, Jon Masters wrote:
> > > > I'm interested in collectively helping to solve the python bootstrap,
> > > > since it might take some effort, and it doesn't need to all be your
> > > > burden to solve. Therefore, can you let us know what you're doing so
> > > > far, what your suggested tack is, and so on. We can figure out who
> > > > should help build packages, or we can help with patches, etc.
> > > 
> > > Dennis says he has a minimal build. Hopefully, he can reply to document
> > > what (if anything) beyond minimal config he did to get it to build. If
> > > we can get this build asap, we can build more packages later today,
> > > including the deps for python so that we can rebuild it fully, and then
> > > have mock, and yum, and koji before Wednesday ;)
> > > 
> > > Jon.
> > what i did was
> > rpm -ivh python-src.rpm
> > rpmbuild -bp path/to/python.spec
> > cd /root/rpmbuild/BUILD/Python-2.7.1/
> > ./configure --prefix=/usr --without-dtrace --with-system-expat --with-system-ffi 
> > --enable-shared
> > 
> > i think had to remove some references to dtrace in the Makefile and i commented 
> > out in Modules/Setup the bits for tkinter 
> > i then did a make -j2 
> > 
> > 
> > you will need to make sure you have the expat and libffi rpms installed
> 
> The resultant python binary generates a library warning (note also the
> hard-coded lib64 locations being used by python anyway):
> 
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> Python 2.7.1 (r271:86832, Jul  8 2011, 08:17:56) 
> [GCC 4.6.0 20110428 (Red Hat 4.6.0-6)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys; sys.path
> ['', '/usr/lib64/python27.zip', '/usr/lib64/python2.7',
> '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk',
> '/usr/lib64/python2.7/lib-old', '/usr/lib64/lib-dynload',
> '/usr/lib64/python2.7/site-packages',
> '/usr/lib/python2.7/site-packages']
> 
> It seems to work for minimal math functions, etc. though and the
> libraries do seem to be there. I know Yum uses the rpm native library to
> do various things, and that currently generates this:
> 
> bash-4.2# yum
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> There was a problem importing one of the Python modules
> required to run yum. The error leading to this problem was:
> 
>    No module named rpm
> 
> However, I feel I just made a relatively trivial mistake, and it's late,
> so perhaps you'll help me straighten this out so we can get it into
> place and have people building python stuff. I'll commit my bits onto
> armv7hl-jcm, but not to armv7hl. Perhaps you can help fix?

I did the prep stage on an x86_64 host, but configure ran on the correct
target so it shouldn't have mattered. Sleeping now, but input welcome.

Jon.




More information about the arm mailing list