Re: Issues compiling 2.6.5 on AIX 6.1

2010-07-10 Thread Dan Stromberg
On Fri, Jul 9, 2010 at 5:54 AM, Stopp, Bryan bryan.st...@argushealth.comwrote:

 I checked, none of the files are symlinks. The install process never got
 to the point where it created sym-links for libraries (if it even does,
 I haven't gotten to that point in the install process.)

 -B

 -Original Message-
 From: python-list-bounces+cbds=argushealth@python.org
 [mailto:python-list-bounces+cbds python-list-bounces%2Bcbds=
 argushealth@python.org] On Behalf
 Of Thomas Jollans
 Sent: Friday, July 09, 2010 7:10 AM
 To: python-list@python.org
 Subject: Re: Issues compiling 2.6.5 on AIX 6.1

 On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
  building '_struct' extension
 
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
  -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
  -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
  -I/build/tools/src/Python-2.6.5/Include
 -I/build/tools/src/Python-2.6.5
  -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
  build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
  ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
  build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
  -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
  build/lib.aix-6.1-2.6/_struct.so
 
  collect2: library libpython2.6 not found

 What really stumps me (and you too, I expect) about this is the two
 different error messages. Above, it looks like collect2 simply doesn't
 find a -lpython2.6 anywhere. Adding . to LIBPATH does make sense.

  building '_struct' extension
 
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
  -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
  -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
  -I/build/tools/src/Python-2.6.5/Include
 -I/build/tools/src/Python-2.6.5
  -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
  build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
  ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
  build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
  -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
  build/lib.aix-6.1-2.6/_struct.so
 
  ld: 0706-006 Cannot find or open library file: -l python2.6
 
  ld:open(): No such file or directory
 
  collect2: ld returned 255 exit status

 But what on earth is this? It looks like collect2 found the library, and
 told it's mate ld, which can't open it. collect2 thinks it find a file,
 ld hits No such file or directory on the same file.

 Maybe it's a dead symlink? Looking for a file with the right name and
 location would find it, while opening it would hit a dead end, and
 probably return No such file 


It's been a while since I've used AIX, but is it possible you're mixing 32
bit and 64 bit operations?  AIX shared libraries:
1) Are closer to windows dll's than *ix .so's - unsurprising given that
Windows shares a heritage with OS/2, and both OS/2 and AIX are from IBM.
2) A .a can hold both 32 bit and 64 bit objects.
3) If you have a .a with 32 objects in it, and try to link against it in 64
bit mode, the file is sort of there and sort of not - ls will see it, but
the linker will not.
4) 32 bit libraries suffer from a loader domain issue - the first part of
$LIBPATH optionally specifies a loader domain, which is a namespace into
which shared libraries are loaded
5) 64 bit libraries are supposed to be cleaner than 32 bit
6) Make sure that if you're building for 64 bit (for example) that ld is
doing the same when it's called from collect2 or whatever.
7) You can test what kind of shared library you're looking at (and sometimes
.a's are _shared_ on AIX - yes, it's weird, yes, it's true) with ar -X - see
the man page for more.

HTH.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Issues compiling 2.6.5 on AIX 6.1

2010-07-09 Thread Thomas Jollans
On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
 building '_struct' extension
 
 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
 -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
 -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
 -I/build/tools/src/Python-2.6.5/Include -I/build/tools/src/Python-2.6.5
 -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
 ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
 build/lib.aix-6.1-2.6/_struct.so
 
 collect2: library libpython2.6 not found

What really stumps me (and you too, I expect) about this is the two
different error messages. Above, it looks like collect2 simply doesn't
find a -lpython2.6 anywhere. Adding . to LIBPATH does make sense.

 building '_struct' extension
 
 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
 -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
 -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
 -I/build/tools/src/Python-2.6.5/Include -I/build/tools/src/Python-2.6.5
 -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
 ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
 build/lib.aix-6.1-2.6/_struct.so
 
 ld: 0706-006 Cannot find or open library file: -l python2.6
 
 ld:open(): No such file or directory
 
 collect2: ld returned 255 exit status

But what on earth is this? It looks like collect2 found the library, and
told it's mate ld, which can't open it. collect2 thinks it find a file,
ld hits No such file or directory on the same file.

Maybe it's a dead symlink? Looking for a file with the right name and
location would find it, while opening it would hit a dead end, and
probably return No such file 


-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Issues compiling 2.6.5 on AIX 6.1

2010-07-09 Thread Stopp, Bryan
I checked, none of the files are symlinks. The install process never got
to the point where it created sym-links for libraries (if it even does,
I haven't gotten to that point in the install process.)

-B 

-Original Message-
From: python-list-bounces+cbds=argushealth@python.org
[mailto:python-list-bounces+cbds=argushealth@python.org] On Behalf
Of Thomas Jollans
Sent: Friday, July 09, 2010 7:10 AM
To: python-list@python.org
Subject: Re: Issues compiling 2.6.5 on AIX 6.1

On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
 building '_struct' extension
 
 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
 -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
 -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
 -I/build/tools/src/Python-2.6.5/Include
-I/build/tools/src/Python-2.6.5
 -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
 ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
 build/lib.aix-6.1-2.6/_struct.so
 
 collect2: library libpython2.6 not found

What really stumps me (and you too, I expect) about this is the two
different error messages. Above, it looks like collect2 simply doesn't
find a -lpython2.6 anywhere. Adding . to LIBPATH does make sense.

 building '_struct' extension
 
 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
 -Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
 -I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
 -I/build/tools/src/Python-2.6.5/Include
-I/build/tools/src/Python-2.6.5
 -c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 
 ./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
 build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
 -L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
 build/lib.aix-6.1-2.6/_struct.so
 
 ld: 0706-006 Cannot find or open library file: -l python2.6
 
 ld:open(): No such file or directory
 
 collect2: ld returned 255 exit status

But what on earth is this? It looks like collect2 found the library, and
told it's mate ld, which can't open it. collect2 thinks it find a file,
ld hits No such file or directory on the same file.

Maybe it's a dead symlink? Looking for a file with the right name and
location would find it, while opening it would hit a dead end, and
probably return No such file 


-- 
http://mail.python.org/mailman/listinfo/python-list

PRIVILEGED AND CONFIDENTIAL
This email transmission contains privileged and confidential information 
intended only for the use of the individual or entity named above.  If the 
reader of the email is not the intended recipient or the employee or agent 
responsible for delivering it to the intended recipient, you are hereby 
notified that any use, dissemination or copying of this email transmission is 
strictly prohibited by the sender.  If you have received this transmission in 
error, please delete the email and immediately notify the sender via the email 
return address or mailto:postmas...@argushealth.com.  Thank you.




-- 
http://mail.python.org/mailman/listinfo/python-list


Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
I've seen other threads on this issue, but the resolution still doesn't
seem to exist for me. 

 

I'm running the configure script with these parameters:

 

./configure --prefix=/build/tools \

--exec-prefix=/build/tools \

--enable-shared \

--enable-ipv6 \

--with-gcc \

--with-pth 

 

I also want to state that I already edited all of the configure 
config.guess scripts to comprehend AIX6.1 (they're not updated yet). And
as you can see, I'm running this using the -with-gcc option.

 

The configure seems to have no problems; so I run a:

 

make clean  make

 

This results in a completed compile. If I go back and look I see a lot
of this:

 

building '_struct' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
-I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
-I/build/tools/src/Python-2.6.5/Include -I/build/tools/src/Python-2.6.5
-c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o

./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
-L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
build/lib.aix-6.1-2.6/_struct.so

collect2: library libpython2.6 not found

 

 

Notice that it can't find the Python lib.. well, it's not installed yet.
It's built and in the current directory I'm working out of, but that's
not in my LiBPATH. I'll come back to that.

 

If I don't do anything and try to make install it pushes the python 
libpython libraries to the appropriate locations, and then it appears it
tries to re-make the modules:

 

building '_struct' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
-I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
-I/build/tools/src/Python-2.6.5/Include -I/build/tools/src/Python-2.6.5
-c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o

./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
-L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
build/lib.aix-6.1-2.6/_struct.so

 

However this time it results in a mass of:

 

ld: 0711-224 WARNING: Duplicate symbol: some symbol

 

I mean I get like 1000+ of these warnings. But they all culminate in:

 

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.

 

 

 

Now, I said I'd get back to the LIBPATH issue. I thought that if it was
looking for that libpython file to compile the modules, it just wasn't
finding it. So I executed a:

 

LIBPATH=.:$LIBPATH make

 

This resulted in:

 

building '_struct' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/build/tools/src/Python-2.6.5/./Include
-I/build/tools/include -I. -IInclude -I./Include -I/usr/local/include
-I/build/tools/src/Python-2.6.5/Include -I/build/tools/src/Python-2.6.5
-c /build/tools/src/Python-2.6.5/Modules/_struct.c -o
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o

./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp
build/temp.aix-6.1-2.6/build/tools/src/Python-2.6.5/Modules/_struct.o
-L/build/tools/lib -L/usr/local/lib -lpython2.6 -o
build/lib.aix-6.1-2.6/_struct.so

ld: 0706-006 Cannot find or open library file: -l python2.6

ld:open(): No such file or directory

collect2: ld returned 255 exit status

 

Huh? Can't find the library now?

 

In any event, I can't get Python to compile and/or install on my
machine. Does anyone have any insight into what is happening to cause
this problem?

 

-B 




PRIVILEGED AND CONFIDENTIAL
This email transmission contains privileged and confidential information 
intended only for the use of the individual or entity named above.  If the 
reader of the email is not the intended recipient or the employee or agent 
responsible for delivering it to the intended recipient, you are hereby 
notified that any use, dissemination or copying of this email transmission is 
strictly prohibited by the sender.  If you have received this transmission in 
error, please delete the email and immediately notify the sender via the email 
return address or mailto:postmas...@argushealth.com.  Thank you.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Thomas Jollans
On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
 I’ve seen other threads on this issue, but the resolution still doesn’t
 seem to exist for me.
 
  
 
 I’m running the configure script with these parameters:
 
  
 
 ./configure --prefix=/build/tools \
 
 --exec-prefix=/build/tools \
 
 --enable-shared \
 
 --enable-ipv6 \
 
 --with-gcc \
 
 --with-pth
 
  
 
 I also want to state that I already edited all of the configure 
 config.guess scripts to comprehend AIX6.1 (they’re not updated yet).

This smells horribly like rather risky business. I don't know what you
changed or how experienced you are when it comes to editing these
auto-generated, system-specific files.

Have you tried with Python 2.7, or do you need 2.6? Python 2.7 might
work here?

Since configure and config.guess are auto-generated, maybe you can
regenerate them with a newer/updated version of autoconf that supports
your system.

Quite frankly, it surprises me that changes to configure would be
necessary. Is the system that unusual?

What happens if you --disable-shared ? I expect you want the shared
library, but - does it work?

Just some random thoughts -- I know nothing about AIX and little about
cross-UNIX portability beyond, to an extent, GNU vs BSD.

Cheers,

Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
These are good points, but I've fixed the configure  config.guess on
about 10 other OSS projects that I needed to compile on this machine. So
I know that my changes are correct. The changes boil down to:

There are a number of lines in the files that reference AIX versions for
configuring details about the system. Specifically, it'll be if or
case statements that look like:

*-ibm-aix5*)

*aix4*|*aix5*)

I just add the aix6 clause:

*-ibm-aix5* | *-ibm-aix6*)

*aix4*|*aix5*|*aix6*)

As Aix6 is binary compatible with 5, but the configure defaults it to an
unknown AIX version and completely mis-configures the compiler.

As for using the autoconf tool for my system, I'm not really sure if
it's even installed or if the latest autoconf supports this version.
Oddly enough I'm not the sys admin, but I do play one on TV.

I do want to stick with Python 2.6 if I can, but I will give compiling
2.7 a shot to see what, if anything, changes/is fixed.

Thanks for the feedback!

-B 


-Original Message-
From: python-list-bounces+cbds=argushealth@python.org
[mailto:python-list-bounces+cbds=argushealth@python.org] On Behalf
Of Thomas Jollans
Sent: Thursday, July 08, 2010 11:51 AM
To: python-list@python.org
Subject: Re: Issues compiling 2.6.5 on AIX 6.1

On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
 I've seen other threads on this issue, but the resolution still
doesn't
 seem to exist for me.
 
  
 
 I'm running the configure script with these parameters:
 
  
 
 ./configure --prefix=/build/tools \
 
 --exec-prefix=/build/tools \
 
 --enable-shared \
 
 --enable-ipv6 \
 
 --with-gcc \
 
 --with-pth
 
  
 
 I also want to state that I already edited all of the configure 
 config.guess scripts to comprehend AIX6.1 (they're not updated yet).

This smells horribly like rather risky business. I don't know what you
changed or how experienced you are when it comes to editing these
auto-generated, system-specific files.

Have you tried with Python 2.7, or do you need 2.6? Python 2.7 might
work here?

Since configure and config.guess are auto-generated, maybe you can
regenerate them with a newer/updated version of autoconf that supports
your system.

Quite frankly, it surprises me that changes to configure would be
necessary. Is the system that unusual?

What happens if you --disable-shared ? I expect you want the shared
library, but - does it work?

Just some random thoughts -- I know nothing about AIX and little about
cross-UNIX portability beyond, to an extent, GNU vs BSD.

Cheers,

Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list

PRIVILEGED AND CONFIDENTIAL
This email transmission contains privileged and confidential information 
intended only for the use of the individual or entity named above.  If the 
reader of the email is not the intended recipient or the employee or agent 
responsible for delivering it to the intended recipient, you are hereby 
notified that any use, dissemination or copying of this email transmission is 
strictly prohibited by the sender.  If you have received this transmission in 
error, please delete the email and immediately notify the sender via the email 
return address or mailto:postmas...@argushealth.com.  Thank you.




-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
I just wanted to follow up my previous email: I tried compiling 2.7
(without editing any config.guess or configure files as they are up to
date for AIX6) and it failed with the exact same errors.

So I'm still stuck and not sure what I should to do get this to compile.
Any other ideas out there?

-B 

-Original Message-
From: python-list-bounces+cbds=argushealth@python.org
[mailto:python-list-bounces+cbds=argushealth@python.org] On Behalf
Of Thomas Jollans
Sent: Thursday, July 08, 2010 11:51 AM
To: python-list@python.org
Subject: Re: Issues compiling 2.6.5 on AIX 6.1

On 07/08/2010 04:36 PM, Stopp, Bryan wrote:
 I've seen other threads on this issue, but the resolution still
doesn't
 seem to exist for me.
 
  
 
 I'm running the configure script with these parameters:
 
  
 
 ./configure --prefix=/build/tools \
 
 --exec-prefix=/build/tools \
 
 --enable-shared \
 
 --enable-ipv6 \
 
 --with-gcc \
 
 --with-pth
 
  
 
 I also want to state that I already edited all of the configure 
 config.guess scripts to comprehend AIX6.1 (they're not updated yet).

This smells horribly like rather risky business. I don't know what you
changed or how experienced you are when it comes to editing these
auto-generated, system-specific files.

Have you tried with Python 2.7, or do you need 2.6? Python 2.7 might
work here?

Since configure and config.guess are auto-generated, maybe you can
regenerate them with a newer/updated version of autoconf that supports
your system.

Quite frankly, it surprises me that changes to configure would be
necessary. Is the system that unusual?

What happens if you --disable-shared ? I expect you want the shared
library, but - does it work?

Just some random thoughts -- I know nothing about AIX and little about
cross-UNIX portability beyond, to an extent, GNU vs BSD.

Cheers,

Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list

PRIVILEGED AND CONFIDENTIAL
This email transmission contains privileged and confidential information 
intended only for the use of the individual or entity named above.  If the 
reader of the email is not the intended recipient or the employee or agent 
responsible for delivering it to the intended recipient, you are hereby 
notified that any use, dissemination or copying of this email transmission is 
strictly prohibited by the sender.  If you have received this transmission in 
error, please delete the email and immediately notify the sender via the email 
return address or mailto:postmas...@argushealth.com.  Thank you.




-- 
http://mail.python.org/mailman/listinfo/python-list