Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
unable to compile Python 2.6.4 on AIX using gcc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
chuck  
View profile  
 More options Nov 4, 9:40 am
Newsgroups: comp.lang.python
From: chuck <NOSPAM_chuckwhi...@charter.net>
Date: Tue, 03 Nov 2009 17:40:30 -0500
Local: Wed, Nov 4 2009 9:40 am
Subject: unable to compile Python 2.6.4 on AIX using gcc
Hello -- I am trying to compile Python 2.6.4 on a Power 5 PC with AIX
5.3.  Here are the settings:

export OBJECT_MODE=64
export AR="ar -X64"
export MAKE=/usr/bin/gmake
export CC="gcc"
export CFLAGS="-maix64 -O2 -g -mcpu=power5"
export LDFLAGS="-L/usr/lib64 -L/opt/freeware/lib64
-L/opt/freeware/64/lib -L/usr/X11R6/lib -L/opt/freeware/lib"
export CPPFLAGS="-I/opt/freeware/include -I/usr/lpp/X11/include/X11"
../Python-2.6.4/configure --with-gcc --disable-ipv6
--prefix=/usr/local/Python-2.6.4 > config_264.log 2>&1
make > make_264.log 2>&1

make fails very early with the following error

===========

         gcc -pthread -c -fno-strict-aliasing -DNDEBUG -O3 -Wall
-Wstrict-prototypes  -I. -IInclude -I../Python-2.6.4/Includ
e -I/opt/freeware/include -I/usr/lpp/X11/include/X11  -DPy_BUILD_CORE -o
Modules/python.o ../Python-2.6.4/Modules/python.c
In file included from ../Python-2.6.4/Include/Python.h:58,
                  from ../Python-2.6.4/Modules/python.c:3:
../Python-2.6.4/Include/pyport.h:685:2: error: #error "LONG_BIT
definition appears wrong for platform (bad gcc/glibc config
?)."
make: The error code from the last command is 1.
===========

I would appreciate any help. Thanks.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Dickinson  
View profile  
 More options Nov 4, 10:14 pm
Newsgroups: comp.lang.python
From: Mark Dickinson <dicki...@gmail.com>
Date: Wed, 4 Nov 2009 03:14:55 -0800 (PST)
Local: Wed, Nov 4 2009 10:14 pm
Subject: Re: unable to compile Python 2.6.4 on AIX using gcc
On Nov 3, 10:40 pm, chuck <NOSPAM_chuckwhi...@charter.net> wrote:

Take a look at:

http://bugs.python.org/issue1628484

Mark


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chuck  
View profile  
 More options Nov 5, 4:27 am
Newsgroups: comp.lang.python
From: chuck <NOSPAM_chuckwhi...@charter.net>
Date: Wed, 04 Nov 2009 12:27:36 -0500
Local: Thurs, Nov 5 2009 4:27 am
Subject: Re: unable to compile Python 2.6.4 on AIX using gcc
Thanks Mark. That was indeed very helpful.  Here's the current status:

=======================
1. applied changes suggested by Bob Atkins in that thread.

2. setting env variables.

export OBJECT_MODE=64
export CC="gcc"
export CFLAGS="-maix64 -mcpu=power5"
export LDFLAGS="-maix64 -L/usr/lib64 -L/opt/freeware/lib64
-L/opt/freeware/64/lib -L/usr/X11R6/lib -L/opt/freeware/lib"
export CPPFLAGS="-I/opt/freeware/include -I/usr/lpp/X11/include/X11"

3. configuring and compiling using

configure --with-gcc --enable-shared --prefix=/usr/local/Python-2.6.4 >
config_264.log 2>&1 ; make > make_264.log 2>&1
=======================

Both python (executable) and libpython2.6.a build just fine and are in
the same directory as configure.

However, none of the extensions build. I keep getting libpython2.6 not
found error.  Here's an example:

building 'math' extension
gcc -pthread -fno-strict-aliasing -maix64 -mcpu=power5 -DNDEBUG -O3
-Wall -Wstrict-prototypes -I.
-I/usr/local/build/python/Python-2.6.4/./Include -I. -
IInclude -I./Include -I/opt/freeware/include -I/usr/lpp/X11/include/X11
-I/usr/local/include -I/usr/local/build/python/Python-2.6.4/Include
-I/usr/local
/build/python/Python-2.6.4 -c
/usr/local/build/python/Python-2.6.4/Modules/mathmodule.c -o
build/temp.aix-5.3-2.6/usr/local/build/python/Python-2.6.4/Mo
dules/mathmodule.o
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp -maix64
-L/usr/lib64 -L/opt/freeware/lib64 -L/opt/freeware/64/lib
-L/usr/X11R6/lib -L/opt/freewa
re/lib -fno-strict-aliasing -maix64 -mcpu=power5 -DNDEBUG -O3 -Wall
-Wstrict-prototypes -I. -IInclude -I./Include -I/opt/freeware/include
-I/usr/lpp/X11
/include/X11
build/temp.aix-5.3-2.6/usr/local/build/python/Python-2.6.4/Modules/mathmodu le.o
-L/usr/lib64 -L/opt/freeware/lib64 -L/opt/freeware/64/lib -
L/usr/X11R6/lib -L/opt/freeware/lib -L/usr/local/lib -lm -lpython2.6 -o
build/lib.aix-5.3-2.6/math.so
collect2: library libpython2.6 not found

I hacked Makefile to
LDFLAGS=        <> -L./     <other flags>

I now get:

ld: 0711-224 WARNING: Duplicate symbol: PyObject_Size
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
Fatal Python error: Interpreter not initialized (version mismatch?)
make: The signal code from the last command is 6.

There are no other versions of python on that machine. I would
appreciate any help.  Do I need to set the exec_prefix as well?

Thanks.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google