This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Not detecting AIX_GENUINE_CPLUSPLUS
Type: behavior Stage: patch review
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, ajaksu2, georg.brandl, loewis, mjarvis, patmiller, sable
Priority: normal Keywords: patch

Created on 2003-04-30 22:22 by patmiller, last changed 2022-04-10 16:08 by admin. This issue is now closed.

File name Uploaded Description Edit
AIX_GENUINE_CPLUSPLUS.patch patmiller, 2003-04-30 22:22 Patch to fix search for AIX_GENUINE_CPLUSPLUS
patch_aix_cxx.diff sable, 2011-02-10 11:17
Messages (11)
msg15792 - (view) Author: Patrick Miller (patmiller) Date: 2003-04-30 22:22
PYthon2.2.2 and Python2.3

Need to update the code in to
remove the hardcoded path for load where

The current version looks for
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
		AC_TRY_LINK([#include "<load.h>],
			    [loadAndInit("", 0, "")],
	*) ;;
msg15793 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-04 12:33
Logged In: YES 

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?
msg15794 - (view) Author: Patrick Miller (patmiller) Date: 2003-07-16 22:19
Logged In: YES 

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

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/
# 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';

msg15795 - (view) Author: Patrick Miller (patmiller) Date: 2003-07-16 22:23
Logged In: YES 

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
msg15796 - (view) Author: Michael Jarvis (mjarvis) Date: 2004-06-08 13:44
Logged In: YES 

This is still a problem with Python 2.3.4, FYI
msg81713 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-12 03:16
Check still present in mentioned form in
msg114235 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-18 15:52
Can an AIX user state whether or not this is still an issue.  The current patch is a one liner.  A patch that looks in all the known
directories was promised but never delivered.
msg117132 - (view) Author: Sébastien Sablé (sable) Date: 2010-09-22 10:32
I can confirm this is still a problem in py3k for AIX 5.3 and AIX 6.1.
The file "/usr/lpp/xlC/include/load.h" does not exist anymore; it is now "/usr/include/load.h".

The proposed patch would only create a problem for very old versions of AIX and xlc (which are no longer supported by IBM anyway and I doubt anybody is going to compile Python 3.x on them some day), while the current state is that it is broken for current versions ("current" being "released in the last 7 years"!).
msg117134 - (view) Author: Sébastien Sablé (sable) Date: 2010-09-22 10:48
It should also be changed in Python/dynload_aix.c:

Index: Python/dynload_aix.c
--- Python/dynload_aix.c	(révision 84964)
+++ Python/dynload_aix.c	(copie de travail)
@@ -12,7 +12,7 @@
-#include "/usr/lpp/xlC/include/load.h"
+#include <load.h>
 #define aix_load loadAndInit
 #define aix_load load
msg128283 - (view) Author: Sébastien Sablé (sable) Date: 2011-02-10 11:17
Here is a patch that combines the corrections in and dynload_aix.c.

All recent versions of AIX would benefit from this correction I think (recent meaning a version of AIX released in the last 10 years or something).

Could someone apply it?
Thanks in advance
msg128619 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-02-15 19:49
Committed to py3k in r88430.
Date User Action Args
2022-04-10 16:08:29adminsetgithub: 38409
2011-02-15 19:49:21georg.brandlsetstatus: open -> closed

messages: + msg128619
resolution: fixed
nosy: loewis, georg.brandl, patmiller, mjarvis, sable, ajaksu2, BreamoreBoy
2011-02-15 19:00:10pitrousetnosy: + georg.brandl
2011-02-10 11:17:39sablesetfiles: + patch_aix_cxx.diff

messages: + msg128283
keywords: + patch
nosy: loewis, patmiller, mjarvis, sable, ajaksu2, BreamoreBoy
2010-09-22 10:48:39sablesetmessages: + msg117134
2010-09-22 10:32:31sablesetmessages: + msg117132
2010-09-14 13:07:27sablesetnosy: + sable
2010-08-18 15:52:28BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2
nosy: + BreamoreBoy

messages: + msg114235

type: behavior
stage: patch review
2009-02-12 03:16:53ajaksu2setnosy: + ajaksu2
messages: + msg81713
2003-04-30 22:22:01patmillercreate