public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Unsuccessful build of 3.1 on AIX 5.1
@ 2002-05-18 10:51 Walter Landry
  2002-05-18 15:25 ` David Edelsohn
  0 siblings, 1 reply; 9+ messages in thread
From: Walter Landry @ 2002-05-18 10:51 UTC (permalink / raw)
  To: gcc-help

Greetings,

I'm having some problems getting gcc 3.1 to install on my AIX 5.1
machine (uname -a gives AIX b80n01 1 5 00043C7F4C00).  It actually
compiles everything OK, I think.  The only errors I could find were
things like

  gmake[2]: [stage1-start] Error 1 (ignored)

There were no stage3 errors.  However, when I gmake install, at the
end of output I get

  gmake[2]: Entering directory `/rmount/work/ux450362/gcc-3.1_build/powerpc-ibm-aix5.0.0.0/libf2c/libU77'
  gmake[2]: *** No rule to make target `all'.  Stop.
  gmake[2]: Leaving directory `/rmount/work/ux450362/gcc-3.1_build/powerpc-ibm-aix5.0.0.0/libf2c/libU77'
  gmake[1]: *** [u77] Error 2
  gmake[1]: Leaving directory `/rmount/work/ux450362/gcc-3.1_build/powerpc-ibm-aix5.0.0.0/libf2c'
  gmake: *** [install-target-libf2c] Error 2

This doesn't really bother me, since the C++ stuff seems to install
fine.  I can create executables and run them, so I'm happy enough.
However, when I try to run MPI programs, there seem to be problems.
For example, with the simple program

  #include <iostream>
  #include "mpi.h"
  using namespace std;

  int main(int argc, char *argv[])
  {
    MPI_Init(&argc,&argv);
    cout << "Hello" << endl;
    MPI_Finalize();
    return 0;
  }

I compile it with the command 

  /work/ux450362/gcc-3.1_bin/bin/g++ simple.C -o simple -L/usr/lpp/ppe.poe/lib -I/usr/lpp/ppe.poe/include -lmpi

and then run it

  poe ./simple -procs 1 -hfile $HOME/host.list -resd no

I get the output

  ATTENTION: 0031-379  Pool setting ignored when hostfile used
  Hello
  ERROR: 0031-250  task 0: Segmentation fault

The ATTENTION line is, I think, of no concern.  The basic problem is
that the MPI_Finalize() command is segfaulting.  This doesn't happen
with the IBM compiler.  Investigating further, I find that a lot of
the MPI commands return garbage (i.e. the number of nodes is
-124234234 or something like that).  Does anyone know if gcc is
compatible with IBM's MPI implementation?

I've also tried using the -mpe option, but it complains that 

  collect2: /usr/lpp/ppe.poe/lib/crt0.o: cannot open as COFF file

That file doesn't exit.  Should it?

Thanks,
Walter Landry
wlandry@ucsd.edu

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-18 10:51 Unsuccessful build of 3.1 on AIX 5.1 Walter Landry
@ 2002-05-18 15:25 ` David Edelsohn
  2002-05-18 16:27   ` Walter Landry
  2002-05-20  0:17   ` Walter Landry
  0 siblings, 2 replies; 9+ messages in thread
From: David Edelsohn @ 2002-05-18 15:25 UTC (permalink / raw)
  To: Walter Landry; +Cc: gcc-help

	I am not sure why Fortran is not installing properly for you.

	As far as using GCC with MPI on AIX, it worked the last time I
tried.  You must use the GCC for AIX option "-mpe" to compile and link the
program because MPI requires additional header directories and library
directories located in /usr/lpp/ppe.poe .  I have not tried using G++ with
MPI. 

	MPI programs are linked with both libmpi.a and libvtd.a, and with
the special MPI crt0.o.  That is what the "-mpe" option does.  If
/usr/lpp/ppe.poe/crt0.o is not installed on your system then either you
have something wrong with your installation or a different version of MPI
than GCC was designed to work with.

	This is meant for AIX's MPI for SP2, not MPICH.

David

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-18 15:25 ` David Edelsohn
@ 2002-05-18 16:27   ` Walter Landry
  2002-05-20  0:17   ` Walter Landry
  1 sibling, 0 replies; 9+ messages in thread
From: Walter Landry @ 2002-05-18 16:27 UTC (permalink / raw)
  To: dje; +Cc: gcc-help

David Edelsohn <dje@watson.ibm.com> wrote:
> 	I am not sure why Fortran is not installing properly for you.
> 
> 	As far as using GCC with MPI on AIX, it worked the last time I
> tried.  You must use the GCC for AIX option "-mpe" to compile and link the
> program because MPI requires additional header directories and library
> directories located in /usr/lpp/ppe.poe .  I have not tried using G++ with
> MPI. 

gcc gives me the same error as g++ when using -mpe.

> 	MPI programs are linked with both libmpi.a and libvtd.a, and with
> the special MPI crt0.o.  That is what the "-mpe" option does.  If
> /usr/lpp/ppe.poe/crt0.o is not installed on your system then either you
> have something wrong with your installation or a different version of MPI
> than GCC was designed to work with.

Thanks.  My version of poe is, I think, Version 3, Release 2.  I'll
let the sysadmins know about the missing file.

> 	This is meant for AIX's MPI for SP2, not MPICH.

Yes, I know.  I sort of got it working with mpich that was compiled
with xlC, but there were wierd problems.  So now I'm back to IBM's
MPI.

Thanks a lot,
Walter Landry
wlandry@ucsd.edu

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-18 15:25 ` David Edelsohn
  2002-05-18 16:27   ` Walter Landry
@ 2002-05-20  0:17   ` Walter Landry
  2002-05-20  9:23     ` David Edelsohn
  2002-05-20  9:26     ` David Edelsohn
  1 sibling, 2 replies; 9+ messages in thread
From: Walter Landry @ 2002-05-20  0:17 UTC (permalink / raw)
  To: dje; +Cc: gcc-help

David Edelsohn <dje@watson.ibm.com> wrote:
> 	MPI programs are linked with both libmpi.a and libvtd.a, and with
> the special MPI crt0.o.  That is what the "-mpe" option does.  If
> /usr/lpp/ppe.poe/crt0.o is not installed on your system then either you
> have something wrong with your installation or a different version of MPI
> than GCC was designed to work with.

Actually, could you tell me what version of poe you're using?  The
mpcc script adds -binitfini:poe_remote_main to the arguments for the C
compiler, which sounds a lot like what the special crt0.o is supposed
to do.  Certainly, the programs run fine without this special crt0.o.
Is it possible that crt0.o has been removed from the more recent
versions of poe?

Thanks,
Walter Landry
wlandry@ucsd.edu

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-20  0:17   ` Walter Landry
@ 2002-05-20  9:23     ` David Edelsohn
  2002-05-20  9:26     ` David Edelsohn
  1 sibling, 0 replies; 9+ messages in thread
From: David Edelsohn @ 2002-05-20  9:23 UTC (permalink / raw)
  To: Walter Landry; +Cc: gcc-help

	The version installed on the system that I am comparing is

      |   PSSP    3.1.1.18-02/01/14(ptfset19)
      |   PE      2.2.0.19-02/01/14

David

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-20  0:17   ` Walter Landry
  2002-05-20  9:23     ` David Edelsohn
@ 2002-05-20  9:26     ` David Edelsohn
  2002-05-20 14:44       ` Walter Landry
  1 sibling, 1 reply; 9+ messages in thread
From: David Edelsohn @ 2002-05-20  9:26 UTC (permalink / raw)
  To: Walter Landry; +Cc: gcc-help

>>>>> Walter Landry writes:

Walter> The mpcc script adds -binitfini:poe_remote_main to the arguments for the C
Walter> compiler, which sounds a lot like what the special crt0.o is supposed
Walter> to do.  Certainly, the programs run fine without this special crt0.o.

	If your version of POE no longer needs crt0.o, you should be able
to edit the "specs" file on your GCC installation so that it adds
-binitfini:poe_remote_main to the link line and uses the normal system
crt0.o.  Supporting two different versions of POE in GCC will be
difficult.

David

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-20  9:26     ` David Edelsohn
@ 2002-05-20 14:44       ` Walter Landry
  2002-05-20 16:06         ` David Edelsohn
  0 siblings, 1 reply; 9+ messages in thread
From: Walter Landry @ 2002-05-20 14:44 UTC (permalink / raw)
  To: dje; +Cc: gcc-help

David Edelsohn <dje@watson.ibm.com> wrote:
> >>>>> Walter Landry writes:
> 
> Walter> The mpcc script adds -binitfini:poe_remote_main to the arguments for the C
> Walter> compiler, which sounds a lot like what the special crt0.o is supposed
> Walter> to do.  Certainly, the programs run fine without this special crt0.o.
> 
> 	If your version of POE no longer needs crt0.o, you should be able
> to edit the "specs" file on your GCC installation so that it adds
> -binitfini:poe_remote_main to the link line and uses the normal system
> crt0.o.  Supporting two different versions of POE in GCC will be
> difficult.

Aha!  That is exactly what I needed to do.  I made a specs file with

  *link:
  -bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect   %{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}   %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64} %{mpe:-binitfini:poe_remote_main}

  *startfile:
  %{!shared:   %{mpe:%{pg:/usr/lib/gcrt0.o}         %{!pg:%{p:/usr/lib/mcrt0.o}               %{!p:/usr/lib/crt0.o}}}   %{!mpe:     %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}     %{!maix64:       %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}       %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}

Now I can compile and link with -mpe and everything works fine.
Thanks a lot!

Walter Landry
wlandry@ucsd.edu

p.s. Fortran actually seems to work fine.  It is just that libf2c
isn't installed.

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-20 14:44       ` Walter Landry
@ 2002-05-20 16:06         ` David Edelsohn
  2002-05-20 23:21           ` Walter Landry
  0 siblings, 1 reply; 9+ messages in thread
From: David Edelsohn @ 2002-05-20 16:06 UTC (permalink / raw)
  To: Walter Landry; +Cc: gcc-help

	Glad to hear it works.

	Upon further investigation, PE 2.1 and PE 2.2 used an alternate
crt0.o file.  PE 2.3 and later uses -binitfini.  I guess that PE 2.2 is
old enough that GCC should just support PE 2.3 and above.  What are most
SP customers running?

Thanks, David

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

* Re: Unsuccessful build of 3.1 on AIX 5.1
  2002-05-20 16:06         ` David Edelsohn
@ 2002-05-20 23:21           ` Walter Landry
  0 siblings, 0 replies; 9+ messages in thread
From: Walter Landry @ 2002-05-20 23:21 UTC (permalink / raw)
  To: dje; +Cc: gcc-help

David Edelsohn <dje@watson.ibm.com> wrote:
> 	Glad to hear it works.
> 
> 	Upon further investigation, PE 2.1 and PE 2.2 used an alternate
> crt0.o file.  PE 2.3 and later uses -binitfini.  I guess that PE 2.2 is
> old enough that GCC should just support PE 2.3 and above.  What are most
> SP customers running?

I wouldn't know for sure, but at 

  http://www-1.ibm.com/servers/eserver/pseries/library/sp_books/pe.html

there is a list of documents for PE versions 2.3, 2.4, 3.1, and 3.2.
The 2.3 docs are dated 1996 and 1997, so maybe it is time to move to
the new scheme.  The changes are really quite minor.  It is just small
changes to the spec file.  It could probably even go in 3.1.1.  I just
don't know where the spec files are generated.

Walter

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

end of thread, other threads:[~2002-05-21  6:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-18 10:51 Unsuccessful build of 3.1 on AIX 5.1 Walter Landry
2002-05-18 15:25 ` David Edelsohn
2002-05-18 16:27   ` Walter Landry
2002-05-20  0:17   ` Walter Landry
2002-05-20  9:23     ` David Edelsohn
2002-05-20  9:26     ` David Edelsohn
2002-05-20 14:44       ` Walter Landry
2002-05-20 16:06         ` David Edelsohn
2002-05-20 23:21           ` Walter Landry

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).