Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Marcin Juszkiewicz <openembedded@hrw.one.pl>
To: openembedded-devel@lists.openembedded.org
Subject: Building Python extensions
Date: Fri, 23 Mar 2007 12:00:30 +0100	[thread overview]
Message-ID: <200703231200.31520.openembedded@hrw.one.pl> (raw)


Thanks to Mickeyl's work we have nice support for building Python and 
Python related stuff in OpenEmbedded.

Recently I was working for OpenedHand on project which required lot of 
Python work to get stuff done. And I got hit by lot of problems due to 
64bit host environment while I was building for 32bit target. In short: 
it is miracle that Python stuff was building before...

Longer version:

When we build Python extension (for example python-pygtk2) configure 
script builds one test program to check does it has Python headers. On my 
system it mostly failed due to this part of python2.4/pyport.h header:

#if LONG_BIT != 8 * SIZEOF_LONG
/* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some recent
 * 32-bit platforms using gcc.  We try to catch that here at compile-time
 * rather than waiting for integer multiplication to trigger bogus
 * overflows.
 */
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc 
config?)."
#endif

And all because wrong include path is used:

configure:9284: checking for headers required to compile python extensions
configure:9303: arm-linux-gcc -E 
-isystem/a/home/hrw/devel/build/cel/tmp/staging/arm-linux/include 
-I/a/home/hrw/devel/build/cel/tmp/staging/i686-linux/include/python2.4 
conftest.c

So as long as we are building for target of same size as host (32bit for 
32bit) everything is ok but everything is going to break for 64bit -> 
32bit (or vice versa).

I got fix for it of course. M4 scripts of each used Python extensions use 
macro AM_CHECK_PYTHON_HEADERS which I edited to add one option to 
configure: --with-python-includes which should be pointed to 
${STAGING_INCDIR}/../ to get it working.

I will sync some of Python extensions with this fix from Poky into 
OpenEmbedded in next days (python-pygtk2 already pushed).

-- 
JID: hrw-jabber.org
OpenEmbedded developer/consultant

           Q:      What's a light-year?
           A:      One-third less calories than a regular year.





             reply	other threads:[~2007-03-23 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 11:00 Marcin Juszkiewicz [this message]
2007-08-22 13:23 ` Building Python extensions Dr. Michael Lauer
2007-08-22 14:02   ` Marcin Juszkiewicz
2007-08-22 17:56     ` Dr. Michael Lauer
  -- strict thread matches above, loose matches on Subject: below --
2007-05-22 19:17 Davis, Scott (AGRE)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200703231200.31520.openembedded@hrw.one.pl \
    --to=openembedded@hrw.one.pl \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox