[EMAIL PROTECTED] 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

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

Reply via email to