[oe] Building Python extensions

Davis, Scott (AGRE) Scott.Davis at smiths-aerospace.com
Tue May 22 19:17:43 UTC 2007


I am trying to build a 32-bit shared library for a C library I have on
an x86_64 AMD SuSE linux system.  I am observing the same problem that
apparently someone on your list has had.  I have a commercial C 32-bit
linux library that I want to use SWIG to build a python extension for.
My linux system is 64-bit and when I compile against Python.h for Python
2.4 I get #error LONG BIT below emitted. 

The original post is at the URL below:
http://projects.linuxtogo.org/pipermail/openembedded-devel/2007-March/00
1722.html

What is the fix to build 32-bit shared library python extension on a
64-bit linux system?

#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 

Scott Davis
GE
Aviation
Digital Systems
Principal Software Engineer

T 616 224 6659
F 616 241 8707
E scott.davis at smiths-aerospace.com
www.ge.com/aviation 

3290 Patterson Ave, SE 
Grand Rapids, MI 49512, U.S.A.



</table> </Pre>
<HTML>
<br>
<br>
************************************************<br>
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.<br>
************************************************<br>
</HTML>


More information about the Openembedded-devel mailing list