compiling on AIX 5.3 with vacpp

Discussion in 'Python' started by pruebauno@latinmail.com, Oct 26, 2006.

  1. Guest

    I am trying to compile Python 2.5 on AIX 5.3. I used

    export PATH=/usr/bin:/usr/vacpp/bin

    OPT=-O2 ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64"
    --disable-ipv6 AR="ar -X64"

    make

    The following error stops make in its track:

    building '_locale' extension
    ../Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp
    build/temp.aix-5.3-2.5/home/pxadm/.test/Python-2.5/Modules/_localemodule.o
    -L/usr/local/lib -o build/lib.aix-5.3-2.5/_locale.so
    ld: 0711-317 ERROR: Undefined symbol: .bindtextdomain
    ld: 0711-317 ERROR: Undefined symbol: .textdomain
    ld: 0711-317 ERROR: Undefined symbol: .dcgettext
    ld: 0711-317 ERROR: Undefined symbol: .dgettext
    ld: 0711-317 ERROR: Undefined symbol: .gettext
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
    information.
    *** WARNING: renaming "_locale" since importing it failed:
    0509-022 Cannot load module build/lib.aix-5.3-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.

    Stop.

    >


    Any help appreciated as to explain what that error could mean and
    possible ways of fixing it.
    , Oct 26, 2006
    #1
    1. Advertising

  2. Guest

    wrote:
    > I am trying to compile Python 2.5 on AIX 5.3. I used
    >
    > building '_locale' extension
    > ./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp
    > build/temp.aix-5.3-2.5/home/pxadm/.test/Python-2.5/Modules/_localemodule.o
    > -L/usr/local/lib -o build/lib.aix-5.3-2.5/_locale.so
    > ld: 0711-317 ERROR: Undefined symbol: .bindtextdomain
    > ld: 0711-317 ERROR: Undefined symbol: .textdomain
    > ld: 0711-317 ERROR: Undefined symbol: .dcgettext
    > ld: 0711-317 ERROR: Undefined symbol: .dgettext
    > ld: 0711-317 ERROR: Undefined symbol: .gettext


    The problem is that an additional library is needed to link the locale
    module. You will first need to determine what library is needed.
    Maybe libintl? To find out, you can do a man on any of those symbols,
    for example, man textdomain.

    That should tell you want library is required. You will then need to
    modify setup.py to add the extra library for the locale module.
    There's already some support for this in setup.py around line 390:

    # access to ISO C locale support
    data = open('pyconfig.h').read()
    m = re.search(r"#s*define\s+WITH_LIBINTL\s+1\s*", data)
    if m is not None:
    locale_libs = ['intl']
    else:
    locale_libs = []
    if platform == 'darwin':
    locale_extra_link_args = ['-framework', 'CoreFoundation']
    else:
    locale_extra_link_args = []


    exts.append( Extension('_locale', ['_localemodule.c'],
    libraries=locale_libs,
    extra_link_args=locale_extra_link_args)
    )

    Once you get something working, please post a patch.

    n
    , Oct 28, 2006
    #2
    1. Advertising

  3. Guest

    wrote:
    > wrote:
    > > I am trying to compile Python 2.5 on AIX 5.3. I used
    > >
    > > building '_locale' extension
    > > ./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp
    > > build/temp.aix-5.3-2.5/home/pxadm/.test/Python-2.5/Modules/_localemodule.o
    > > -L/usr/local/lib -o build/lib.aix-5.3-2.5/_locale.so
    > > ld: 0711-317 ERROR: Undefined symbol: .bindtextdomain
    > > ld: 0711-317 ERROR: Undefined symbol: .textdomain
    > > ld: 0711-317 ERROR: Undefined symbol: .dcgettext
    > > ld: 0711-317 ERROR: Undefined symbol: .dgettext
    > > ld: 0711-317 ERROR: Undefined symbol: .gettext

    >
    > The problem is that an additional library is needed to link the locale
    > module. You will first need to determine what library is needed.
    > Maybe libintl? To find out, you can do a man on any of those symbols,
    > for example, man textdomain.
    >
    > That should tell you want library is required. You will then need to
    > modify setup.py to add the extra library for the locale module.
    > There's already some support for this in setup.py around line 390:
    >
    > # access to ISO C locale support
    > data = open('pyconfig.h').read()
    > m = re.search(r"#s*define\s+WITH_LIBINTL\s+1\s*", data)
    > if m is not None:
    > locale_libs = ['intl']
    > else:
    > locale_libs = []
    > if platform == 'darwin':
    > locale_extra_link_args = ['-framework', 'CoreFoundation']
    > else:
    > locale_extra_link_args = []
    >
    >
    > exts.append( Extension('_locale', ['_localemodule.c'],
    > libraries=locale_libs,
    > extra_link_args=locale_extra_link_args)
    > )
    >
    > Once you get something working, please post a patch.
    >
    > n


    Thanks for the info Neil,

    sorry for taking long to answer. This is skunkwork, I am working on it
    whenever I get some time.

    indeed as you say. libintl.h is required so I hard coded it into
    setup.py to no effect. At what point does setup.py get called? by make?

    my code
    # access to ISO C locale support
    data = open('pyconfig.h').read()
    m = re.search(r"#s*define\s+WITH_LIBINTL\s+1\s*", data)
    if m is not None:
    locale_libs = ['intl']
    else:
    locale_libs = []
    if platform == 'darwin':
    locale_extra_link_args = ['-framework', 'CoreFoundation']
    else:
    locale_extra_link_args = []

    locale_libs=['intl']

    exts.append( Extension('_locale', ['_localemodule.c'],
    libraries=locale_libs,
    extra_link_args=locale_extra_link_args) )
    , Nov 1, 2006
    #3
  4. Guest

    wrote:
    >
    > indeed as you say. libintl.h is required so I hard coded it into
    > setup.py to no effect. At what point does setup.py get called? by make?


    Yes. When you do make, python itself is built. After that, with the
    built python setup.py gets called to build all the modules.

    BTW, it's best to copy me on all mails as I read c.l.p only
    occassionally.

    n
    , Nov 2, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. marko sarunac
    Replies:
    0
    Views:
    581
    marko sarunac
    Nov 17, 2003
  2. iqbal
    Replies:
    1
    Views:
    848
    Victor Bazarov
    Jun 24, 2003
  3. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,127
    Thomas Dickey
    Aug 24, 2007
  4. shankha
    Replies:
    0
    Views:
    680
    shankha
    May 5, 2009
  5. Replies:
    5
    Views:
    200
    Philippe Lucas
    Jul 8, 2005
Loading...

Share This Page