compiling on AIX 5.3 with vacpp

pruebauno at latinmail.com pruebauno at latinmail.com
Wed Nov 1 14:31:28 EST 2006


nnorwitz at gmail.com wrote:
> pruebauno at latinmail.com 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) )




More information about the Python-list mailing list