[ python-Bugs-730467 ] Not detecting AIX_GENUINE_CPLUSPLUS

SourceForge.net noreply at sourceforge.net
Tue Jun 8 09:44:50 EDT 2004


Bugs item #730467, was opened at 2003-04-30 17:22
Message generated for change (Comment added) made by mjarvis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=730467&group_id=5470

Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Patrick Miller (patmiller)
Assigned to: Nobody/Anonymous (nobody)
Summary: Not detecting AIX_GENUINE_CPLUSPLUS

Initial Comment:
PYthon2.2.2 and Python2.3
AIX
xlC 

Need to update the code in configure.in to
remove the hardcoded path for load where
we detect AIX_GENUINE_CPLUSPLUS

The current version looks for
/usr/lpp/xlC/include/load.h
but it should just use <load.h>

Without it, Python uses load() for dynamic load
instead of loadAndInit() in dynload_aix.c

Patch attached

# checks for system dependent C++ extensions support
case "$ac_sys_system" in
	AIX*)	AC_MSG_CHECKING(for genuine AIX C++ extensions
support)
		AC_TRY_LINK([#include "<load.h>],
			    [loadAndInit("", 0, "")],
			    [AC_DEFINE(AIX_GENUINE_CPLUSPLUS)
			     AC_MSG_RESULT(yes)],
			    [AC_MSG_RESULT(no)]);;
	*) ;;
esac

----------------------------------------------------------------------

Comment By: Michael Jarvis (mjarvis)
Date: 2004-06-08 08:44

Message:
Logged In: YES 
user_id=108945

This is still a problem with Python 2.3.4, FYI

----------------------------------------------------------------------

Comment By: Patrick Miller (patmiller)
Date: 2003-07-16 17:23

Message:
Logged In: YES 
user_id=30074

Martin also wrote:

> will the new code still run on the old versions of

I will upload a patch that looks in all the known
directories.  

----------------------------------------------------------------------

Comment By: Patrick Miller (patmiller)
Date: 2003-07-16 17:19

Message:
Logged In: YES 
user_id=30074

Martin writes:

> When you say "update", do you mean that the code was correct

The old code was correct because the xlC code was not
in the main include directory but rather in the /usr/lpp/xlC
directory.

IBM apparently moved the file around during various releases
of AIX though it settled a few versions ago in /usr/include.

Perhaps the proper tactic is to look in the various directories
like the perl configuration does:

% more ./ext/DynaLoader/hints/aix.pl
# See dl_aix.xs for details.
use Config;
if ($Config{libs} =~ /-lC/ && -f '/lib/libC.a') {
    $self->{CCFLAGS} = $Config{ccflags} . ' -DUSE_libC';
    if (-f '/usr/vacpp/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_vacpp_load_h';
    } elsif (-f '/usr/ibmcxx/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_ibmcxx_load_h';
    } elsif (-f '/usr/lpp/xlC/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_xlC_load_h';
    } elsif (-f '/usr/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_load_h';
    }
}



----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-05-04 07:33

Message:
Logged In: YES 
user_id=21627

When you say "update", do you mean that the code was correct
for earlier versions of some software (which versions of
which software?), and is now incorrect? With the proposed
change, will the new code still run on the old versions of
the software?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=730467&group_id=5470



More information about the Python-bugs-list mailing list