Bugs item #1633863, was opened at 2007-01-12 09:46
Message generated for change (Comment added) made by smudd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1633863&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Johannes Abt (jabt)
Assigned to: Nobody/Anonymous (nobody)
Summary: AIX: configure ignores $CC

Initial Comment:
CC=xlc_r ./configure does not work on AIX-5.1, because configure 
unconditionally sets $CC to "cc_r":

        case $ac_sys_system in
        AIX*)   CC=cc_r
                without_gcc=;;


It would be better to leave $CC and just add "-qthreaded" to $CFLAGS. 

Furthermore, much of the C source code of Python uses C++ /C99 comments. This 
is an error with the standard AIX compiler. Please add the compiler flag 
"-qcpluscmt".

An alternative would be to use a default of "xlc_r" for CC on AIX. This calls 
the compiler in a mode that both accepts C++ comments and generates reentrant 
code.

Regards,
Johannes

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

Comment By: Simon Mudd (smudd)
Date: 2007-02-20 11:36

Message:
Logged In: YES 
user_id=1724042
Originator: NO

This issue also prevents trying to build Python with gcc on AIX which I am
attempting at the moment.
While trying to resolve my own issue I have applied the following dirty
patch to the python-2.5 tar ball.
The patch should allow you to set CC to a non standard value.

# Patch to make Python work with AIX and OpenPKG.
#
# This patch is NOT complete.
# - configure is not automatically recreated from configure.in
# - The correct behaviour for AIX should be to use CC if set and
#   otherwise to look for cc_r, cc and gcc (not sure about the order).
#
Index: configure.in
--- configure.in.orig   2007-02-19 15:19:32.000000000 +0100
+++ configure.in        2007-02-19 15:21:35.000000000 +0100
@@ -346,8 +346,15 @@
                without_gcc=$withval;;
        esac], [
        case $ac_sys_system in
-       AIX*)   CC=cc_r
-               without_gcc=;;
+       AIX*)
+               # set CC if not set already.
+               # - SHOULD enhance check to look for cc or gcc in case it
+               #   is in the PATH.
+               if /usr/bin/test -z "$CC"; then
+                       CC=cc_r
+                       without_gcc=
+               fi
+               ;;
        BeOS*)
                case $BE_HOST_CPU in
                ppc)
Index: configure
*** configure.orig      Tue Feb 20 10:14:18 2007
--- configure           Tue Feb 20 10:15:23 2007
***************
*** 1719,1726 ****
  else

        case $ac_sys_system in
!       AIX*)   CC=cc_r
!               without_gcc=;;
        BeOS*)
                case $BE_HOST_CPU in
                ppc)
--- 1719,1733 ----
  else

        case $ac_sys_system in
!       AIX*)
!               # set CC if not set already.
!               # - SHOULD enhance check to look for cc or gcc in case it
!               #   is in the PATH.
!               if /usr/bin/test -z "$CC"; then
!                       CC=cc_r
!                       without_gcc=
!               fi
!               ;;
        BeOS*)
                case $BE_HOST_CPU in
                ppc)


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

Comment By: Johannes Abt (jabt)
Date: 2007-01-30 14:07

Message:
Logged In: YES 
user_id=1563402
Originator: YES

Sorry about the C++ comments... all the C++ comments I have found concern
Windows, PC or Darwin. I must have confused this with another project
I have been compiling.

Though there still the issue with setting $CC.


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

Comment By: Neal Norwitz (nnorwitz)
Date: 2007-01-19 06:47

Message:
Logged In: YES 
user_id=33168
Originator: NO

There shouldn't be any C++ comments in the Python code.  If there are, it
is a mistake.  I did see some get removed recently.  Could you let me know
where you see the C++ comments?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1633863&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to