public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling GCC 10.2 on AIX 7.2
@ 2020-08-17  6:02 Randal T. Rioux
  2020-08-17 10:28 ` Jonathan Wakely
  0 siblings, 1 reply; 12+ messages in thread
From: Randal T. Rioux @ 2020-08-17  6:02 UTC (permalink / raw)
  To: gcc-help

System: IBM POWER 740 (POWER7 CPU)
OS Level: 7200-04-02-2016
Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)

Please let me know if I need to include anything else. Hopefully I've
provided enough information to aid in my request here.

Environment Variables:

export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
export CXXFLAGS=$CFLAGS
export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
-Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
-Wl,-bmaxdata:0x80000000"
export CONFIG_SHELL=/opt/freeware/bin/bash
export CONFIG_ENV_ARGS=/opt/freeware/bin/bash

configure output: https://pastebin.com/FinvPRPU
config.log: https://pastebin.com/4Y30z9tU
config.status: https://pastebin.com/C7ZC9uzB

configure seems to work fine, although the config.log seems to show it
ignores my flags to only enable c/c++ compilers (I could be reading this
wrong).

Running make works for a little bit, then dies around:

(snip)
mkdir -p -- common/.deps
mkdir -p -- analyzer/.deps
config.status: executing default commands
gmake[2]: Leaving directory '/usr/src/gcc-build'
gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
gmake[1]: Leaving directory '/usr/src/gcc-build'
gmake: *** [Makefile:1002: all] Error 2

I've been going crazy trying to figure this one out. But it's time to
reach out for a little help!

Thanks for any advice.

Randal


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-17  6:02 Compiling GCC 10.2 on AIX 7.2 Randal T. Rioux
@ 2020-08-17 10:28 ` Jonathan Wakely
  2020-08-17 16:12   ` Randal T. Rioux
  0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Wakely @ 2020-08-17 10:28 UTC (permalink / raw)
  To: Randal T. Rioux; +Cc: gcc-help

On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>
> System: IBM POWER 740 (POWER7 CPU)
> OS Level: 7200-04-02-2016
> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>
> Please let me know if I need to include anything else. Hopefully I've
> provided enough information to aid in my request here.
>
> Environment Variables:
>
> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
> export CXXFLAGS=$CFLAGS
> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> -Wl,-bmaxdata:0x80000000"
> export CONFIG_SHELL=/opt/freeware/bin/bash
> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>
> configure output: https://pastebin.com/FinvPRPU
> config.log: https://pastebin.com/4Y30z9tU
> config.status: https://pastebin.com/C7ZC9uzB
>
> configure seems to work fine, although the config.log seems to show it
> ignores my flags to only enable c/c++ compilers (I could be reading this
> wrong).

You are reading it wrong.

>
> Running make works for a little bit, then dies around:
>
> (snip)
> mkdir -p -- common/.deps
> mkdir -p -- analyzer/.deps
> config.status: executing default commands
> gmake[2]: Leaving directory '/usr/src/gcc-build'
> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> gmake[1]: Leaving directory '/usr/src/gcc-build'
> gmake: *** [Makefile:1002: all] Error 2

You've snipped the actual error so we can't see what failed.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-17 10:28 ` Jonathan Wakely
@ 2020-08-17 16:12   ` Randal T. Rioux
  2020-08-17 16:15     ` Jonathan Wakely
  0 siblings, 1 reply; 12+ messages in thread
From: Randal T. Rioux @ 2020-08-17 16:12 UTC (permalink / raw)
  To: Jonathan Wakely, gcc-help

On 8/17/20 6:28 AM, Jonathan Wakely wrote:
> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>
>> System: IBM POWER 740 (POWER7 CPU)
>> OS Level: 7200-04-02-2016
>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>>
>> Please let me know if I need to include anything else. Hopefully I've
>> provided enough information to aid in my request here.
>>
>> Environment Variables:
>>
>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
>> export CXXFLAGS=$CFLAGS
>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>> -Wl,-bmaxdata:0x80000000"
>> export CONFIG_SHELL=/opt/freeware/bin/bash
>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>
>> configure output: https://pastebin.com/FinvPRPU
>> config.log: https://pastebin.com/4Y30z9tU
>> config.status: https://pastebin.com/C7ZC9uzB
>>
>> configure seems to work fine, although the config.log seems to show it
>> ignores my flags to only enable c/c++ compilers (I could be reading this
>> wrong).
> 
> You are reading it wrong.

Okay then.

>> Running make works for a little bit, then dies around:
>>
>> (snip)
>> mkdir -p -- common/.deps
>> mkdir -p -- analyzer/.deps
>> config.status: executing default commands
>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>> gmake: *** [Makefile:1002: all] Error 2
> 
> You've snipped the actual error so we can't see what failed.

What specifically would help you (or anyone else) to diagnose this?

Thanks



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-17 16:12   ` Randal T. Rioux
@ 2020-08-17 16:15     ` Jonathan Wakely
  2020-08-17 19:28       ` Randal T. Rioux
  0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Wakely @ 2020-08-17 16:15 UTC (permalink / raw)
  To: Randal T. Rioux; +Cc: gcc-help

On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
>
> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
> > On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>
> >> System: IBM POWER 740 (POWER7 CPU)
> >> OS Level: 7200-04-02-2016
> >> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
> >>
> >> Please let me know if I need to include anything else. Hopefully I've
> >> provided enough information to aid in my request here.
> >>
> >> Environment Variables:
> >>
> >> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
> >> export CXXFLAGS=$CFLAGS
> >> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
> >> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >> -Wl,-bmaxdata:0x80000000"
> >> export CONFIG_SHELL=/opt/freeware/bin/bash
> >> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> >>
> >> configure output: https://pastebin.com/FinvPRPU
> >> config.log: https://pastebin.com/4Y30z9tU
> >> config.status: https://pastebin.com/C7ZC9uzB
> >>
> >> configure seems to work fine, although the config.log seems to show it
> >> ignores my flags to only enable c/c++ compilers (I could be reading this
> >> wrong).
> >
> > You are reading it wrong.
>
> Okay then.
>
> >> Running make works for a little bit, then dies around:
> >>
> >> (snip)
> >> mkdir -p -- common/.deps
> >> mkdir -p -- analyzer/.deps
> >> config.status: executing default commands
> >> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >> gmake: *** [Makefile:1002: all] Error 2
> >
> > You've snipped the actual error so we can't see what failed.
>
> What specifically would help you (or anyone else) to diagnose this?

Showing the error.

Something failed, and then make kept printing some more lines and then
exited. You've only shown the exiting part, not the error that
preceded it.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-17 16:15     ` Jonathan Wakely
@ 2020-08-17 19:28       ` Randal T. Rioux
  2020-08-18 22:38         ` Randal T. Rioux
  0 siblings, 1 reply; 12+ messages in thread
From: Randal T. Rioux @ 2020-08-17 19:28 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 8/17/20 12:15 PM, Jonathan Wakely wrote:
> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>
>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>
>>>> System: IBM POWER 740 (POWER7 CPU)
>>>> OS Level: 7200-04-02-2016
>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>>>>
>>>> Please let me know if I need to include anything else. Hopefully I've
>>>> provided enough information to aid in my request here.
>>>>
>>>> Environment Variables:
>>>>
>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
>>>> export CXXFLAGS=$CFLAGS
>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>>>> -Wl,-bmaxdata:0x80000000"
>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>>>
>>>> configure output: https://pastebin.com/FinvPRPU
>>>> config.log: https://pastebin.com/4Y30z9tU
>>>> config.status: https://pastebin.com/C7ZC9uzB
>>>>
>>>> configure seems to work fine, although the config.log seems to show it
>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
>>>> wrong).
>>>
>>> You are reading it wrong.
>>
>> Okay then.
>>
>>>> Running make works for a little bit, then dies around:
>>>>
>>>> (snip)
>>>> mkdir -p -- common/.deps
>>>> mkdir -p -- analyzer/.deps
>>>> config.status: executing default commands
>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>>>> gmake: *** [Makefile:1002: all] Error 2
>>>
>>> You've snipped the actual error so we can't see what failed.
>>
>> What specifically would help you (or anyone else) to diagnose this?
> 
> Showing the error.
> 
> Something failed, and then make kept printing some more lines and then
> exited. You've only shown the exiting part, not the error that
> preceded it.

I see - running parallel make added output past the failure point.

This is the part where it conks out:

(snip)
gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
-L/opt/freeware/lib
-Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
-Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
compilation terminated.
gmake[3]: *** [Makefile:110: full-stamp] Error 1
gmake[3]: Leaving directory
'/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
gmake[2]: Leaving directory '/usr/src/gcc-build'
gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
gmake[1]: Leaving directory '/usr/src/gcc-build'
gmake: *** [Makefile:1002: all] Error 2

Could it be an ld or binutils issue?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-17 19:28       ` Randal T. Rioux
@ 2020-08-18 22:38         ` Randal T. Rioux
  2020-08-19  6:43           ` Jonathan Wakely
  2020-08-19  7:04           ` Kewen.Lin
  0 siblings, 2 replies; 12+ messages in thread
From: Randal T. Rioux @ 2020-08-18 22:38 UTC (permalink / raw)
  To: gcc-help

On 8/17/20 3:28 PM, Randal T. Rioux wrote:
> On 8/17/20 12:15 PM, Jonathan Wakely wrote:
>> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>
>>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
>>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>>
>>>>> System: IBM POWER 740 (POWER7 CPU)
>>>>> OS Level: 7200-04-02-2016
>>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>>>>>
>>>>> Please let me know if I need to include anything else. Hopefully I've
>>>>> provided enough information to aid in my request here.
>>>>>
>>>>> Environment Variables:
>>>>>
>>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
>>>>> export CXXFLAGS=$CFLAGS
>>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
>>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>>>>> -Wl,-bmaxdata:0x80000000"
>>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
>>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>>>>
>>>>> configure output: https://pastebin.com/FinvPRPU
>>>>> config.log: https://pastebin.com/4Y30z9tU
>>>>> config.status: https://pastebin.com/C7ZC9uzB
>>>>>
>>>>> configure seems to work fine, although the config.log seems to show it
>>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
>>>>> wrong).
>>>>
>>>> You are reading it wrong.
>>>
>>> Okay then.
>>>
>>>>> Running make works for a little bit, then dies around:
>>>>>
>>>>> (snip)
>>>>> mkdir -p -- common/.deps
>>>>> mkdir -p -- analyzer/.deps
>>>>> config.status: executing default commands
>>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>>>>> gmake: *** [Makefile:1002: all] Error 2
>>>>
>>>> You've snipped the actual error so we can't see what failed.
>>>
>>> What specifically would help you (or anyone else) to diagnose this?
>>
>> Showing the error.
>>
>> Something failed, and then make kept printing some more lines and then
>> exited. You've only shown the exiting part, not the error that
>> preceded it.
> 
> I see - running parallel make added output past the failure point.
> 
> This is the part where it conks out:
> 
> (snip)
> gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
> -L/opt/freeware/lib
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
> server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
> collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
> compilation terminated.
> gmake[3]: *** [Makefile:110: full-stamp] Error 1
> gmake[3]: Leaving directory
> '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
> gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
> gmake[2]: Leaving directory '/usr/src/gcc-build'
> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> gmake[1]: Leaving directory '/usr/src/gcc-build'
> gmake: *** [Makefile:1002: all] Error 2
> 
> Could it be an ld or binutils issue?

Quick update.

Uninstalling GNU binutils helped. But I hit a different wall.

These are my current environment variables (which work for compiling
other software like Apache HTTPD):

# export CONFIG_SHELL=/opt/freeware/bin/bash
# export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
# export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
-I/opt/freeware/include"
# export CXXFLAGS=$CFLAGS
# export RM="/usr/bin/rm -f"
# export AR="/usr/bin/ar -X64"
# export OBJECT_MODE=64"
# export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
-Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
-Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"

This is my configure line:

# /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
--disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
--with-cloog=no --with-ppl=no --disable-libstdcxx-pch
--enable-__cxa_atexit --disable-werror --enable-bootstrap

And this is the end of make where it dies:

[ -f stage_final ] || echo stage3 > stage_final
make[1]: Entering directory '/usr/src/gcc-build'
make[2]: Entering directory '/usr/src/gcc-build'
make[3]: Entering directory '/usr/src/gcc-build'
rm -f stage_current
make[3]: Leaving directory '/usr/src/gcc-build'
make[2]: Leaving directory '/usr/src/gcc-build'
make[2]: Entering directory '/usr/src/gcc-build'
Configuring stage 1 in ./intl
configure: loading cache ./config.cache
checking for powerpc-ibm-aix7.2.4.0-gcc... gcc
checking whether the C compiler works... no
configure: error: in `/usr/src/gcc-build/intl':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[2]: *** [Makefile:6461: configure-stage1-intl] Error 77
make[2]: Leaving directory '/usr/src/gcc-build'
make[1]: *** [Makefile:20799: stage1-bubble] Error 2
make[1]: Leaving directory '/usr/src/gcc-build'
make: *** [Makefile:1002: all] Error 2
bash-5.0#

Still looking for help from anyone brave enough to venture in this hole.
I just really want to figure out why compiling GCC 64-bit for AIX is so
difficult.

Thanks!


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-18 22:38         ` Randal T. Rioux
@ 2020-08-19  6:43           ` Jonathan Wakely
  2020-08-19  7:18             ` Kewen.Lin
  2020-08-19  7:04           ` Kewen.Lin
  1 sibling, 1 reply; 12+ messages in thread
From: Jonathan Wakely @ 2020-08-19  6:43 UTC (permalink / raw)
  To: Randal T. Rioux; +Cc: gcc-help

On Tue, 18 Aug 2020 at 23:41, Randal T. Rioux <randal@procyonlabs.com> wrote:
>
> On 8/17/20 3:28 PM, Randal T. Rioux wrote:
> > On 8/17/20 12:15 PM, Jonathan Wakely wrote:
> >> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>
> >>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
> >>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>>>
> >>>>> System: IBM POWER 740 (POWER7 CPU)
> >>>>> OS Level: 7200-04-02-2016
> >>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
> >>>>>
> >>>>> Please let me know if I need to include anything else. Hopefully I've
> >>>>> provided enough information to aid in my request here.
> >>>>>
> >>>>> Environment Variables:
> >>>>>
> >>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
> >>>>> export CXXFLAGS=$CFLAGS
> >>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
> >>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >>>>> -Wl,-bmaxdata:0x80000000"
> >>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
> >>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> >>>>>
> >>>>> configure output: https://pastebin.com/FinvPRPU
> >>>>> config.log: https://pastebin.com/4Y30z9tU
> >>>>> config.status: https://pastebin.com/C7ZC9uzB
> >>>>>
> >>>>> configure seems to work fine, although the config.log seems to show it
> >>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
> >>>>> wrong).
> >>>>
> >>>> You are reading it wrong.
> >>>
> >>> Okay then.
> >>>
> >>>>> Running make works for a little bit, then dies around:
> >>>>>
> >>>>> (snip)
> >>>>> mkdir -p -- common/.deps
> >>>>> mkdir -p -- analyzer/.deps
> >>>>> config.status: executing default commands
> >>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >>>>> gmake: *** [Makefile:1002: all] Error 2
> >>>>
> >>>> You've snipped the actual error so we can't see what failed.
> >>>
> >>> What specifically would help you (or anyone else) to diagnose this?
> >>
> >> Showing the error.
> >>
> >> Something failed, and then make kept printing some more lines and then
> >> exited. You've only shown the exiting part, not the error that
> >> preceded it.
> >
> > I see - running parallel make added output past the failure point.
> >
> > This is the part where it conks out:
> >
> > (snip)
> > gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
> > -L/opt/freeware/lib
> > -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> > -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
> > server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
> > collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
> > compilation terminated.
> > gmake[3]: *** [Makefile:110: full-stamp] Error 1
> > gmake[3]: Leaving directory
> > '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
> > gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
> > gmake[2]: Leaving directory '/usr/src/gcc-build'
> > gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> > gmake[1]: Leaving directory '/usr/src/gcc-build'
> > gmake: *** [Makefile:1002: all] Error 2
> >
> > Could it be an ld or binutils issue?
>
> Quick update.
>
> Uninstalling GNU binutils helped. But I hit a different wall.
>
> These are my current environment variables (which work for compiling
> other software like Apache HTTPD):
>
> # export CONFIG_SHELL=/opt/freeware/bin/bash
> # export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> # export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
> -I/opt/freeware/include"
> # export CXXFLAGS=$CFLAGS
> # export RM="/usr/bin/rm -f"
> # export AR="/usr/bin/ar -X64"
> # export OBJECT_MODE=64"
> # export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
> -Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
>
> This is my configure line:
>
> # /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
> --disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
> --with-cloog=no --with-ppl=no --disable-libstdcxx-pch

GCC hasn't used cloog or ppl for some years, it uses ISL now so those
options do nothing. If it isn't found, it won't be used, but you can
use --without-isl if you want.

> --enable-__cxa_atexit --disable-werror --enable-bootstrap
>
> And this is the end of make where it dies:
>
> [ -f stage_final ] || echo stage3 > stage_final
> make[1]: Entering directory '/usr/src/gcc-build'
> make[2]: Entering directory '/usr/src/gcc-build'
> make[3]: Entering directory '/usr/src/gcc-build'
> rm -f stage_current
> make[3]: Leaving directory '/usr/src/gcc-build'
> make[2]: Leaving directory '/usr/src/gcc-build'
> make[2]: Entering directory '/usr/src/gcc-build'
> Configuring stage 1 in ./intl
> configure: loading cache ./config.cache
> checking for powerpc-ibm-aix7.2.4.0-gcc... gcc
> checking whether the C compiler works... no
> configure: error: in `/usr/src/gcc-build/intl':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> make[2]: *** [Makefile:6461: configure-stage1-intl] Error 77
> make[2]: Leaving directory '/usr/src/gcc-build'
> make[1]: *** [Makefile:20799: stage1-bubble] Error 2
> make[1]: Leaving directory '/usr/src/gcc-build'
> make: *** [Makefile:1002: all] Error 2
> bash-5.0#
>
> Still looking for help from anyone brave enough to venture in this hole.
> I just really want to figure out why compiling GCC 64-bit for AIX is so
> difficult.

Like it says, see config.log for more details.

The problem is probably those environment variables you're defining.

Building GCC on AIX 7.2 is possible with the following config
(providing valid paths for gmp and libiconv):

PATH=/opt/freeware/bin:$PATH
.../src/configure --disable-werror --enable-languages=c,c++
--with-gmp=... --with-libiconv-prefix=... --disable-libstdcxx-pch
--with-included-gettext
make SHELL=/bin/bash CONFIG_SHELL=/bin/bash

The SHELL and CONFIG_SHELL variables aren't required, they just speed things up.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-18 22:38         ` Randal T. Rioux
  2020-08-19  6:43           ` Jonathan Wakely
@ 2020-08-19  7:04           ` Kewen.Lin
  2020-08-19 14:37             ` David Edelsohn
  1 sibling, 1 reply; 12+ messages in thread
From: Kewen.Lin @ 2020-08-19  7:04 UTC (permalink / raw)
  To: Randal T. Rioux; +Cc: gcc-help, David Edelsohn

Hi Randal,

on 2020/8/19 上午6:38, Randal T. Rioux wrote:
> On 8/17/20 3:28 PM, Randal T. Rioux wrote:
>> On 8/17/20 12:15 PM, Jonathan Wakely wrote:
>>> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>
>>>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
>>>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>>>
>>>>>> System: IBM POWER 740 (POWER7 CPU)
>>>>>> OS Level: 7200-04-02-2016
>>>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>>>>>>
>>>>>> Please let me know if I need to include anything else. Hopefully I've
>>>>>> provided enough information to aid in my request here.
>>>>>>
>>>>>> Environment Variables:
>>>>>>
>>>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
>>>>>> export CXXFLAGS=$CFLAGS
>>>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
>>>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>>>>>> -Wl,-bmaxdata:0x80000000"
>>>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
>>>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>>>>>
>>>>>> configure output: https://pastebin.com/FinvPRPU
>>>>>> config.log: https://pastebin.com/4Y30z9tU
>>>>>> config.status: https://pastebin.com/C7ZC9uzB
>>>>>>
>>>>>> configure seems to work fine, although the config.log seems to show it
>>>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
>>>>>> wrong).
>>>>>
>>>>> You are reading it wrong.
>>>>
>>>> Okay then.
>>>>
>>>>>> Running make works for a little bit, then dies around:
>>>>>>
>>>>>> (snip)
>>>>>> mkdir -p -- common/.deps
>>>>>> mkdir -p -- analyzer/.deps
>>>>>> config.status: executing default commands
>>>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>>>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>>>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>>>>>> gmake: *** [Makefile:1002: all] Error 2
>>>>>
>>>>> You've snipped the actual error so we can't see what failed.
>>>>
>>>> What specifically would help you (or anyone else) to diagnose this?
>>>
>>> Showing the error.
>>>
>>> Something failed, and then make kept printing some more lines and then
>>> exited. You've only shown the exiting part, not the error that
>>> preceded it.
>>
>> I see - running parallel make added output past the failure point.
>>
>> This is the part where it conks out:
>>
>> (snip)
>> gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
>> -L/opt/freeware/lib
>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>> -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
>> server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
>> collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
>> compilation terminated.
>> gmake[3]: *** [Makefile:110: full-stamp] Error 1
>> gmake[3]: Leaving directory
>> '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
>> gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>> gmake: *** [Makefile:1002: all] Error 2
>>
>> Could it be an ld or binutils issue?
> 
> Quick update.
> 
> Uninstalling GNU binutils helped. But I hit a different wall.
> 
> These are my current environment variables (which work for compiling
> other software like Apache HTTPD):
> 
> # export CONFIG_SHELL=/opt/freeware/bin/bash
> # export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> # export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
> -I/opt/freeware/include"
> # export CXXFLAGS=$CFLAGS
> # export RM="/usr/bin/rm -f"
> # export AR="/usr/bin/ar -X64"
> # export OBJECT_MODE=64"
           ~~~~~~~~~~~~~~ " typo?

I did a check locally, the wrong OBJECT_MODE caused the assembler
error like

Assembler:
/tmp//ccZmd28O.s: line 1: 1252-192 Assembly mode is not specified.
        Set the OBJECT_MODE environment variable to 32 or 64 or
        use the -a32 or -a64 option.

Hope it's just a pasted typo, isn't responsible for this error.

> # export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
> -Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
> 
> This is my configure line:
> 
> # /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
> --disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
> --with-cloog=no --with-ppl=no --disable-libstdcxx-pch
> --enable-__cxa_atexit --disable-werror --enable-bootstrap
> 

With David's help, I built gcc trunk on aix7.2 successfully before
with the configuration command like:

$GCC_SRC/configure --enable-languages=c,c++,fortran --disable-werror --with-gmp=/opt/freeware/ --with-libiconv-prefix=/opt/freeware/ --disable-libstdcxx-pch --with-included-gettext --with-cpu=power9 --prefix=$GCC_INSTALL --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-bootstrap

I referred to the information here https://gcc.gnu.org/wiki/CompileFarm 
"Building GCC on AIX"

Also installed the required components pointed out here:
  https://gcc.gnu.org/install/prerequisites.html

via the website/repo aix-toolbox 
  https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha

Sorry that I didn't have the access to that machine any more, can't provide more
information by checking the history.

> And this is the end of make where it dies:
> 
> [ -f stage_final ] || echo stage3 > stage_final
> make[1]: Entering directory '/usr/src/gcc-build'
> make[2]: Entering directory '/usr/src/gcc-build'
> make[3]: Entering directory '/usr/src/gcc-build'
> rm -f stage_current
> make[3]: Leaving directory '/usr/src/gcc-build'
> make[2]: Leaving directory '/usr/src/gcc-build'
> make[2]: Entering directory '/usr/src/gcc-build'
> Configuring stage 1 in ./intl
> configure: loading cache ./config.cache
> checking for powerpc-ibm-aix7.2.4.0-gcc... gcc
> checking whether the C compiler works... no
> configure: error: in `/usr/src/gcc-build/intl':
> configure: error: C compiler cannot create executables

It would be good to see what's the specific error.

BR,
Kewen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-19  6:43           ` Jonathan Wakely
@ 2020-08-19  7:18             ` Kewen.Lin
  0 siblings, 0 replies; 12+ messages in thread
From: Kewen.Lin @ 2020-08-19  7:18 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Randal T. Rioux, gcc-help

Hi Jonathan,

>>
>> Still looking for help from anyone brave enough to venture in this hole.
>> I just really want to figure out why compiling GCC 64-bit for AIX is so
>> difficult.
> 
> Like it says, see config.log for more details.
> 
> The problem is probably those environment variables you're defining.
> 
> Building GCC on AIX 7.2 is possible with the following config
> (providing valid paths for gmp and libiconv):
> 
> PATH=/opt/freeware/bin:$PATH
> .../src/configure --disable-werror --enable-languages=c,c++
> --with-gmp=... --with-libiconv-prefix=... --disable-libstdcxx-pch
> --with-included-gettext
> make SHELL=/bin/bash CONFIG_SHELL=/bin/bash
> 
> The SHELL and CONFIG_SHELL variables aren't required, they just speed things up.
> 

In my limited experience, CONFIG_SHELL looks required (or becomes required?).
Without it I encountered the configuration error like:

gcc-base/libstdc++-v3/configure[22664]: syntax error at line 47774 : `;' unexpected
gcc-base/libstdc++-v3/configure[22664]: syntax error at line 17 : `)' unexpected

which bothered me for a while before.

BR,
Kewen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-19  7:04           ` Kewen.Lin
@ 2020-08-19 14:37             ` David Edelsohn
  2020-08-19 17:36               ` Randal T. Rioux
  0 siblings, 1 reply; 12+ messages in thread
From: David Edelsohn @ 2020-08-19 14:37 UTC (permalink / raw)
  To: Kewen.Lin, Randal T. Rioux; +Cc: gcc-help

On Wed, Aug 19, 2020 at 3:04 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi Randal,
>
> on 2020/8/19 上午6:38, Randal T. Rioux wrote:
> > On 8/17/20 3:28 PM, Randal T. Rioux wrote:
> >> On 8/17/20 12:15 PM, Jonathan Wakely wrote:
> >>> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>>
> >>>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
> >>>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>>>>
> >>>>>> System: IBM POWER 740 (POWER7 CPU)
> >>>>>> OS Level: 7200-04-02-2016
> >>>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
> >>>>>>
> >>>>>> Please let me know if I need to include anything else. Hopefully I've
> >>>>>> provided enough information to aid in my request here.
> >>>>>>
> >>>>>> Environment Variables:
> >>>>>>
> >>>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
> >>>>>> export CXXFLAGS=$CFLAGS
> >>>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
> >>>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >>>>>> -Wl,-bmaxdata:0x80000000"
> >>>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
> >>>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> >>>>>>
> >>>>>> configure output: https://pastebin.com/FinvPRPU
> >>>>>> config.log: https://pastebin.com/4Y30z9tU
> >>>>>> config.status: https://pastebin.com/C7ZC9uzB
> >>>>>>
> >>>>>> configure seems to work fine, although the config.log seems to show it
> >>>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
> >>>>>> wrong).
> >>>>>
> >>>>> You are reading it wrong.
> >>>>
> >>>> Okay then.
> >>>>
> >>>>>> Running make works for a little bit, then dies around:
> >>>>>>
> >>>>>> (snip)
> >>>>>> mkdir -p -- common/.deps
> >>>>>> mkdir -p -- analyzer/.deps
> >>>>>> config.status: executing default commands
> >>>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >>>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >>>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >>>>>> gmake: *** [Makefile:1002: all] Error 2
> >>>>>
> >>>>> You've snipped the actual error so we can't see what failed.
> >>>>
> >>>> What specifically would help you (or anyone else) to diagnose this?
> >>>
> >>> Showing the error.
> >>>
> >>> Something failed, and then make kept printing some more lines and then
> >>> exited. You've only shown the exiting part, not the error that
> >>> preceded it.
> >>
> >> I see - running parallel make added output past the failure point.
> >>
> >> This is the part where it conks out:
> >>
> >> (snip)
> >> gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
> >> -L/opt/freeware/lib
> >> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >> -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
> >> server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
> >> collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
> >> compilation terminated.
> >> gmake[3]: *** [Makefile:110: full-stamp] Error 1
> >> gmake[3]: Leaving directory
> >> '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
> >> gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
> >> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >> gmake: *** [Makefile:1002: all] Error 2
> >>
> >> Could it be an ld or binutils issue?
> >
> > Quick update.
> >
> > Uninstalling GNU binutils helped. But I hit a different wall.
> >
> > These are my current environment variables (which work for compiling
> > other software like Apache HTTPD):
> >
> > # export CONFIG_SHELL=/opt/freeware/bin/bash
> > # export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> > # export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
> > -I/opt/freeware/include"
> > # export CXXFLAGS=$CFLAGS
> > # export RM="/usr/bin/rm -f"
> > # export AR="/usr/bin/ar -X64"
> > # export OBJECT_MODE=64"
>            ~~~~~~~~~~~~~~ " typo?
>
> I did a check locally, the wrong OBJECT_MODE caused the assembler
> error like
>
> Assembler:
> /tmp//ccZmd28O.s: line 1: 1252-192 Assembly mode is not specified.
>         Set the OBJECT_MODE environment variable to 32 or 64 or
>         use the -a32 or -a64 option.
>
> Hope it's just a pasted typo, isn't responsible for this error.
>
> > # export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
> > -Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
> > -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
> >
> > This is my configure line:
> >
> > # /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
> > --disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
> > --with-cloog=no --with-ppl=no --disable-libstdcxx-pch
> > --enable-__cxa_atexit --disable-werror --enable-bootstrap
> >
>
> With David's help, I built gcc trunk on aix7.2 successfully before
> with the configuration command like:
>
> $GCC_SRC/configure --enable-languages=c,c++,fortran --disable-werror --with-gmp=/opt/freeware/ --with-libiconv-prefix=/opt/freeware/ --disable-libstdcxx-pch --with-included-gettext --with-cpu=power9 --prefix=$GCC_INSTALL --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-bootstrap
>
> I referred to the information here https://gcc.gnu.org/wiki/CompileFarm
> "Building GCC on AIX"
>
> Also installed the required components pointed out here:
>   https://gcc.gnu.org/install/prerequisites.html
>
> via the website/repo aix-toolbox
>   https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha
>
> Sorry that I didn't have the access to that machine any more, can't provide more
> information by checking the history.

Why are you setting any environment variables?  All of the environment
variables are wrong.  you cannot build a 64 bit version of GCC on AIX
in that manner.

Thanks David

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-19 14:37             ` David Edelsohn
@ 2020-08-19 17:36               ` Randal T. Rioux
  2020-08-19 17:42                 ` David Edelsohn
  0 siblings, 1 reply; 12+ messages in thread
From: Randal T. Rioux @ 2020-08-19 17:36 UTC (permalink / raw)
  To: David Edelsohn, Kewen.Lin; +Cc: gcc-help

On 8/19/20 10:37 AM, David Edelsohn wrote:
> On Wed, Aug 19, 2020 at 3:04 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>
>> Hi Randal,
>>
>> on 2020/8/19 上午6:38, Randal T. Rioux wrote:
>>> On 8/17/20 3:28 PM, Randal T. Rioux wrote:
>>>> On 8/17/20 12:15 PM, Jonathan Wakely wrote:
>>>>> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>>>
>>>>>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
>>>>>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
>>>>>>>>
>>>>>>>> System: IBM POWER 740 (POWER7 CPU)
>>>>>>>> OS Level: 7200-04-02-2016
>>>>>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
>>>>>>>>
>>>>>>>> Please let me know if I need to include anything else. Hopefully I've
>>>>>>>> provided enough information to aid in my request here.
>>>>>>>>
>>>>>>>> Environment Variables:
>>>>>>>>
>>>>>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
>>>>>>>> export CXXFLAGS=$CFLAGS
>>>>>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
>>>>>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>>>>>>>> -Wl,-bmaxdata:0x80000000"
>>>>>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
>>>>>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>>>>>>>
>>>>>>>> configure output: https://pastebin.com/FinvPRPU
>>>>>>>> config.log: https://pastebin.com/4Y30z9tU
>>>>>>>> config.status: https://pastebin.com/C7ZC9uzB
>>>>>>>>
>>>>>>>> configure seems to work fine, although the config.log seems to show it
>>>>>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
>>>>>>>> wrong).
>>>>>>>
>>>>>>> You are reading it wrong.
>>>>>>
>>>>>> Okay then.
>>>>>>
>>>>>>>> Running make works for a little bit, then dies around:
>>>>>>>>
>>>>>>>> (snip)
>>>>>>>> mkdir -p -- common/.deps
>>>>>>>> mkdir -p -- analyzer/.deps
>>>>>>>> config.status: executing default commands
>>>>>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>>>>>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>>>>>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>>>>>>>> gmake: *** [Makefile:1002: all] Error 2
>>>>>>>
>>>>>>> You've snipped the actual error so we can't see what failed.
>>>>>>
>>>>>> What specifically would help you (or anyone else) to diagnose this?
>>>>>
>>>>> Showing the error.
>>>>>
>>>>> Something failed, and then make kept printing some more lines and then
>>>>> exited. You've only shown the exiting part, not the error that
>>>>> preceded it.
>>>>
>>>> I see - running parallel make added output past the failure point.
>>>>
>>>> This is the part where it conks out:
>>>>
>>>> (snip)
>>>> gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
>>>> -L/opt/freeware/lib
>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
>>>> -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
>>>> server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
>>>> collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
>>>> compilation terminated.
>>>> gmake[3]: *** [Makefile:110: full-stamp] Error 1
>>>> gmake[3]: Leaving directory
>>>> '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
>>>> gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
>>>> gmake: *** [Makefile:1002: all] Error 2
>>>>
>>>> Could it be an ld or binutils issue?
>>>
>>> Quick update.
>>>
>>> Uninstalling GNU binutils helped. But I hit a different wall.
>>>
>>> These are my current environment variables (which work for compiling
>>> other software like Apache HTTPD):
>>>
>>> # export CONFIG_SHELL=/opt/freeware/bin/bash
>>> # export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
>>> # export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
>>> -I/opt/freeware/include"
>>> # export CXXFLAGS=$CFLAGS
>>> # export RM="/usr/bin/rm -f"
>>> # export AR="/usr/bin/ar -X64"
>>> # export OBJECT_MODE=64"
>>            ~~~~~~~~~~~~~~ " typo?
>>
>> I did a check locally, the wrong OBJECT_MODE caused the assembler
>> error like
>>
>> Assembler:
>> /tmp//ccZmd28O.s: line 1: 1252-192 Assembly mode is not specified.
>>         Set the OBJECT_MODE environment variable to 32 or 64 or
>>         use the -a32 or -a64 option.
>>
>> Hope it's just a pasted typo, isn't responsible for this error.
>>
>>> # export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
>>> -Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
>>>
>>> This is my configure line:
>>>
>>> # /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
>>> --disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
>>> --with-cloog=no --with-ppl=no --disable-libstdcxx-pch
>>> --enable-__cxa_atexit --disable-werror --enable-bootstrap
>>>
>>
>> With David's help, I built gcc trunk on aix7.2 successfully before
>> with the configuration command like:
>>
>> $GCC_SRC/configure --enable-languages=c,c++,fortran --disable-werror --with-gmp=/opt/freeware/ --with-libiconv-prefix=/opt/freeware/ --disable-libstdcxx-pch --with-included-gettext --with-cpu=power9 --prefix=$GCC_INSTALL --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-bootstrap
>>
>> I referred to the information here https://gcc.gnu.org/wiki/CompileFarm
>> "Building GCC on AIX"
>>
>> Also installed the required components pointed out here:
>>   https://gcc.gnu.org/install/prerequisites.html
>>
>> via the website/repo aix-toolbox
>>   https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha
>>
>> Sorry that I didn't have the access to that machine any more, can't provide more
>> information by checking the history.
> 
> Why are you setting any environment variables?  All of the environment
> variables are wrong.  you cannot build a 64 bit version of GCC on AIX
> in that manner.

That's the answer I was hoping not to get :-)

I can compile it fine as a 32 bit app. For example, this is my configure:

/usr/src/gcc-10.2.0/configure --enable-languages=c,c++ --disable-werror
--disable-libstdcxx-pch --with-cpu=power7 --disable-bootstrap --without-isl

My interest was to create a pure 64-bit environment, and I spent a lot
of hours trying!

Is there a way to build 64 bit GCC on AIX?

Thanks to all for the responses!

Randal



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 10.2 on AIX 7.2
  2020-08-19 17:36               ` Randal T. Rioux
@ 2020-08-19 17:42                 ` David Edelsohn
  0 siblings, 0 replies; 12+ messages in thread
From: David Edelsohn @ 2020-08-19 17:42 UTC (permalink / raw)
  To: Randal T. Rioux; +Cc: Kewen.Lin, gcc-help

On Wed, Aug 19, 2020 at 1:36 PM Randal T. Rioux <randal@procyonlabs.com> wrote:
>
> On 8/19/20 10:37 AM, David Edelsohn wrote:
> > On Wed, Aug 19, 2020 at 3:04 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
> >>
> >> Hi Randal,
> >>
> >> on 2020/8/19 上午6:38, Randal T. Rioux wrote:
> >>> On 8/17/20 3:28 PM, Randal T. Rioux wrote:
> >>>> On 8/17/20 12:15 PM, Jonathan Wakely wrote:
> >>>>> On Mon, 17 Aug 2020 at 17:12, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>>>>
> >>>>>> On 8/17/20 6:28 AM, Jonathan Wakely wrote:
> >>>>>>> On Mon, 17 Aug 2020 at 07:04, Randal T. Rioux <randal@procyonlabs.com> wrote:
> >>>>>>>>
> >>>>>>>> System: IBM POWER 740 (POWER7 CPU)
> >>>>>>>> OS Level: 7200-04-02-2016
> >>>>>>>> Bootstrap Compiler: GCC 8.3.0 from AIX Toolbox (IBM yum repo)
> >>>>>>>>
> >>>>>>>> Please let me know if I need to include anything else. Hopefully I've
> >>>>>>>> provided enough information to aid in my request here.
> >>>>>>>>
> >>>>>>>> Environment Variables:
> >>>>>>>>
> >>>>>>>> export CFLAGS="-mcpu=power7 -pipe -O2 -I/opt/freeware/include"
> >>>>>>>> export CXXFLAGS=$CFLAGS
> >>>>>>>> export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib
> >>>>>>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >>>>>>>> -Wl,-bmaxdata:0x80000000"
> >>>>>>>> export CONFIG_SHELL=/opt/freeware/bin/bash
> >>>>>>>> export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> >>>>>>>>
> >>>>>>>> configure output: https://pastebin.com/FinvPRPU
> >>>>>>>> config.log: https://pastebin.com/4Y30z9tU
> >>>>>>>> config.status: https://pastebin.com/C7ZC9uzB
> >>>>>>>>
> >>>>>>>> configure seems to work fine, although the config.log seems to show it
> >>>>>>>> ignores my flags to only enable c/c++ compilers (I could be reading this
> >>>>>>>> wrong).
> >>>>>>>
> >>>>>>> You are reading it wrong.
> >>>>>>
> >>>>>> Okay then.
> >>>>>>
> >>>>>>>> Running make works for a little bit, then dies around:
> >>>>>>>>
> >>>>>>>> (snip)
> >>>>>>>> mkdir -p -- common/.deps
> >>>>>>>> mkdir -p -- analyzer/.deps
> >>>>>>>> config.status: executing default commands
> >>>>>>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >>>>>>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >>>>>>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >>>>>>>> gmake: *** [Makefile:1002: all] Error 2
> >>>>>>>
> >>>>>>> You've snipped the actual error so we can't see what failed.
> >>>>>>
> >>>>>> What specifically would help you (or anyone else) to diagnose this?
> >>>>>
> >>>>> Showing the error.
> >>>>>
> >>>>> Something failed, and then make kept printing some more lines and then
> >>>>> exited. You've only shown the exiting part, not the error that
> >>>>> preceded it.
> >>>>
> >>>> I see - running parallel make added output past the failure point.
> >>>>
> >>>> This is the part where it conks out:
> >>>>
> >>>> (snip)
> >>>> gcc -mcpu=power7 -pipe -O2 -I/opt/freeware/include -L/opt/freeware/lib64
> >>>> -L/opt/freeware/lib
> >>>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
> >>>> -Wl,-bmaxdata:0x80000000 -o fixincl fixincl.o fixtests.o fixfixes.o
> >>>> server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
> >>>> collect2: fatal error: ../libiberty/libiberty.a: not a COFF file
> >>>> compilation terminated.
> >>>> gmake[3]: *** [Makefile:110: full-stamp] Error 1
> >>>> gmake[3]: Leaving directory
> >>>> '/usr/src/gcc-build/build-powerpc-ibm-aix7.2.4.0/fixincludes'
> >>>> gmake[2]: *** [Makefile:2880: all-build-fixincludes] Error 2
> >>>> gmake[2]: Leaving directory '/usr/src/gcc-build'
> >>>> gmake[1]: *** [Makefile:20799: stage1-bubble] Error 2
> >>>> gmake[1]: Leaving directory '/usr/src/gcc-build'
> >>>> gmake: *** [Makefile:1002: all] Error 2
> >>>>
> >>>> Could it be an ld or binutils issue?
> >>>
> >>> Quick update.
> >>>
> >>> Uninstalling GNU binutils helped. But I hit a different wall.
> >>>
> >>> These are my current environment variables (which work for compiling
> >>> other software like Apache HTTPD):
> >>>
> >>> # export CONFIG_SHELL=/opt/freeware/bin/bash
> >>> # export CONFIG_ENV_ARGS=/opt/freeware/bin/bash
> >>> # export CFLAGS="-maix64 -mcpu=power7 -D_LARGE_FILES -pipe -O2
> >>> -I/opt/freeware/include"
> >>> # export CXXFLAGS=$CFLAGS
> >>> # export RM="/usr/bin/rm -f"
> >>> # export AR="/usr/bin/ar -X64"
> >>> # export OBJECT_MODE=64"
> >>            ~~~~~~~~~~~~~~ " typo?
> >>
> >> I did a check locally, the wrong OBJECT_MODE caused the assembler
> >> error like
> >>
> >> Assembler:
> >> /tmp//ccZmd28O.s: line 1: 1252-192 Assembly mode is not specified.
> >>         Set the OBJECT_MODE environment variable to 32 or 64 or
> >>         use the -a32 or -a64 option.
> >>
> >> Hope it's just a pasted typo, isn't responsible for this error.
> >>
> >>> # export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -maix64
> >>> -Wl,-b64 -Wl,-brtl -Wl,-bbigtoc
> >>> -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
> >>>
> >>> This is my configure line:
> >>>
> >>> # /usr/src/gcc-10.2.0/configure --with-isl=/usr/local --disable-multilib
> >>> --disable-nls --enable-languages=c,c++ --enable-decimal-float=dpd
> >>> --with-cloog=no --with-ppl=no --disable-libstdcxx-pch
> >>> --enable-__cxa_atexit --disable-werror --enable-bootstrap
> >>>
> >>
> >> With David's help, I built gcc trunk on aix7.2 successfully before
> >> with the configuration command like:
> >>
> >> $GCC_SRC/configure --enable-languages=c,c++,fortran --disable-werror --with-gmp=/opt/freeware/ --with-libiconv-prefix=/opt/freeware/ --disable-libstdcxx-pch --with-included-gettext --with-cpu=power9 --prefix=$GCC_INSTALL --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-bootstrap
> >>
> >> I referred to the information here https://gcc.gnu.org/wiki/CompileFarm
> >> "Building GCC on AIX"
> >>
> >> Also installed the required components pointed out here:
> >>   https://gcc.gnu.org/install/prerequisites.html
> >>
> >> via the website/repo aix-toolbox
> >>   https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha
> >>
> >> Sorry that I didn't have the access to that machine any more, can't provide more
> >> information by checking the history.
> >
> > Why are you setting any environment variables?  All of the environment
> > variables are wrong.  you cannot build a 64 bit version of GCC on AIX
> > in that manner.
>
> That's the answer I was hoping not to get :-)
>
> I can compile it fine as a 32 bit app. For example, this is my configure:
>
> /usr/src/gcc-10.2.0/configure --enable-languages=c,c++ --disable-werror
> --disable-libstdcxx-pch --with-cpu=power7 --disable-bootstrap --without-isl
>
> My interest was to create a pure 64-bit environment, and I spent a lot
> of hours trying!
>
> Is there a way to build 64 bit GCC on AIX?
>
> Thanks to all for the responses!

First, it would have been helpful and useful for you to state your
objective at the beginning.  Making unsupported changes to the build
procedure and then reporting errors is counterproductive.

Current development version of GCC has some patches to allow a 64 bit
build using --with-cpu=default64.  It functions but remains a work in
progress.

Thanks, David

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-08-19 17:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17  6:02 Compiling GCC 10.2 on AIX 7.2 Randal T. Rioux
2020-08-17 10:28 ` Jonathan Wakely
2020-08-17 16:12   ` Randal T. Rioux
2020-08-17 16:15     ` Jonathan Wakely
2020-08-17 19:28       ` Randal T. Rioux
2020-08-18 22:38         ` Randal T. Rioux
2020-08-19  6:43           ` Jonathan Wakely
2020-08-19  7:18             ` Kewen.Lin
2020-08-19  7:04           ` Kewen.Lin
2020-08-19 14:37             ` David Edelsohn
2020-08-19 17:36               ` Randal T. Rioux
2020-08-19 17:42                 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).