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.

classification
Title: Rc2 candidates: "gcc" not found on AIX
Type: behavior Stage: resolved
Components: Build Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt, ned.deily
Priority: normal Keywords:

Created on 2018-10-15 08:34 by Michael.Felt, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (7)
msg327736 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-15 08:34
Both rc2 packages - 
$ ls -l *.xz
-rw-r--r--    1 aixtools staff      17178404 Oct 13 02:41 Python-3.6.7rc2.tar.xz
-rw-r--r--    1 aixtools staff      16974832 Oct 13 02:24 Python-3.7.1rc2.tar.xz
 return the same error on a system using gcc as default compiler - BUT xlc is installed.

$ cc
ksh: cc:  not found.
$ xlc
/opt/IBM/xlc/13.1.3/bin/.orig/xlc: 1501-294 (S) No input file specified. Please use -qhelp for more information.
$ xlc_r
ksh: xlc_r:  not found.
$ gcc
gcc: fatal error: no input files
compilation terminated.

$ ./configure
checking build system type... powerpc-ibm-aix7.2.0.0
checking host system type... powerpc-ibm-aix7.2.0.0
checking for python3.7... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc...
checking for --with-icc... no
checking for gcc... xlc_r
checking whether the C compiler works... no
configure: error: in `/home/aixtools/Python-3.7.1rc2':
configure: error: C compiler cannot create executables
See `config.log' for more details

Bug being - it does check for gcc - which is in the PATH yet substitutes it for xlc_r which is not in the PATH.

excerpt from

ksh -x ./configure:

aix7
+ CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
+ EXPORT_MACOSX_DEPLOYMENT_TARGET=#
+ print -r -- configure:3476: checking for --without-gcc
+ 1>& 5
+ print -rn -- checking for --without-gcc...
+ 1>& 6
checking for --without-gcc... + test  = set
+ CC=xlc_r
+ without_gcc=
+ print -r -- configure:3499: result:
+ 1>& 5
+ print -r --
+ 1>& 6

+ print -r -- configure:3502: checking for --with-icc
msg327798 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-10-15 22:17
Do you know if the behavior has changed here for 3.7.1rc2 and 3.6.7rc2 from earlier 3.7.x and 3.6.x releases?  I did a quick check of the configure.ac history and did not see any obvious change.  It looks like one way to handle this would be be to specify the desired compiler using the CC variable to configure:

./configure CC=gcc

Does that work?

Looking at the master branch (for the next feature release, 3.8), I see that this area has been changed substantially for 3.8 by the PR 6790 changes for Issue33483.  If you haven't already, you might want to test that and see if the behavior is reasonable for AIX.  Explicitly specifying CC=gcc should still work.
msg327820 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-16 11:30
I'll compare with the 3.7.0. As I did not have access to gcc then, would have never seen it.

Yesterday I used --with-gcc, today I'll use CC=gcc and update after I know more.
msg327821 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-16 11:46
using CC=gcc ./configure works fine

And, this does not appear to be a regression:

HEAD is now at 1bf9cc5 3.7.0 final
$ cd ../python3-3.7.0
$ ./configure
checking for git... found
checking build system type... powerpc-ibm-aix7.2.0.0
checking host system type... powerpc-ibm-aix7.2.0.0
checking for python3.7... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc...
checking for --with-icc... no
checking for gcc... xlc_r
checking whether the C compiler works... no
configure: error: in `/home/aixtools/python/git/python3-3.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
msg327841 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-10-16 19:35
I'm glad it works.  Any object to closing this issue then?
msg328003 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-10-18 20:53
On 16/10/2018 21:35, Ned Deily wrote:
> Ned Deily <nad@python.org> added the comment:
>
> I'm glad it works.  Any object to closing this issue then?
I have no objection. Should I do that?
>
> ----------
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> pending
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue34988>
> _______________________________________
>
msg328004 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-10-18 21:05
Done, thanks!
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79169
2018-10-18 21:05:22ned.deilysetstatus: open -> closed

messages: + msg328004
2018-10-18 20:53:35Michael.Feltsetstatus: pending -> open

messages: + msg328003
2018-10-16 19:35:53ned.deilysetstatus: open -> pending
resolution: not a bug
messages: + msg327841

stage: resolved
2018-10-16 11:46:56Michael.Feltsetmessages: + msg327821
2018-10-16 11:30:26Michael.Feltsetmessages: + msg327820
2018-10-15 22:17:29ned.deilysetmessages: + msg327798
2018-10-15 08:46:31serhiy.storchakasetnosy: + ned.deily
2018-10-15 08:34:33Michael.Feltcreate