Topic
  • 5 replies
  • Latest Post - ‏2010-06-22T14:27:49Z by haubi
SystemAdmin
SystemAdmin
6902 Posts

Pinned topic Building Python 2.5.2 on AIX 6 using GCC

‏2008-09-15T14:16:18Z |
Hello,

I cannot build Python 2.5.2 on my AIX 6.1 box using gcc.

I have installed the GCC (gcc-4.2.0-3.aix6.1.ppc.rpm)provided
by IBM in their "toolbox for AIX" http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html

I run the following:
./configure --with-gcc
make

The make process runs compiles and so on that are OK,
but it stops with this error:
=== http://... ===
./Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp build/temp.aix-6.1-2.5/usr/local/work/Python-2.5.2/Modules/fcntlmodule.o -o build/lib.aix-6.1-2.5/fcntl.so
ld: 0711-317 ERROR: Undefined symbol: .flock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
  • WARNING: renaming "fcntl" since importing it failed: 0509-022 Cannot load module build/lib.aix-6.1-2.5.
0509-026 System error: A file or directory in the path name does not exist.
error: No such file or directory
make: 1254-004 The error code from the last command is 1.
=============

any suggestion?

thanks
Updated on 2010-06-22T14:27:49Z at 2010-06-22T14:27:49Z by haubi
  • j.gann
    j.gann
    193 Posts

    Re: Building Python 2.5.2 on AIX 6 using GCC

    ‏2008-09-15T15:56:42Z  
    I am not familiar with the particular problem at hand, but developers porting their sw to aix report good success with the gcc packages provided by Michael Perzl -> http://www.perzl.org/aix/

    Regards
  • SystemAdmin
    SystemAdmin
    6902 Posts

    Re: Building Python 2.5.2 on AIX 6 using GCC

    ‏2008-09-17T10:56:44Z  
    (an answer to my own question:)

    Finally, for the Python build to work, I have added
    "-lbsd" to the CCOPT var in the Modules/ld_so_aix script,
    so that we have the line:
    CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -lbsd -o $objfile"
    instead of:
    CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -o $objfile"

    Then python was built correctly
  • haubi
    haubi
    6 Posts

    Re: Building Python 2.5.2 on AIX 6 using GCC

    ‏2010-04-07T11:22:21Z  
    This now happens on AIX5.3 too, after upgrading to:
    $ oslevel -s
    5300-08-09-1013

    Even if flock() was provided in libbsd.a before already, the declaration for flock() in <sys/file.h> was not.
    Thus python's configure didn't detect flock() and used something else.

    But now, as flock() is declared in <sys/file.h>, python's configure detects flock(), but doesn't link libbsd.
    This is reported as: http://bugs.python.org/issue4026

    Another thing worth to mention is:
    There seems to be no flock() implementation for 64bits on AIX5.3 (can't say for AIX6.1) - at least not in libbsd.a,
    but <sys/file.h> unconditionally declares flock() even for 64bits.

    /haubi/
  • SystemAdmin
    SystemAdmin
    6902 Posts

    Re: Building Python 2.5.2 on AIX 6 using GCC

    ‏2010-04-07T14:15:10Z  
    wow gold sale shop here,cheap wow gold,cheap wow gold,cheap wow gold,the world of wacraft gold store in the world.luxury watches
    swiss watches
  • haubi
    haubi
    6 Posts

    Re: Building Python 2.5.2 on AIX 6 using GCC

    ‏2010-06-22T14:27:49Z  
    Just for completion: There is a bug report at python for this issue:
    http://bugs.python.org/issue4026