public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-20  8:53 Matt_Conway
  2001-06-20  9:47 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Matt_Conway @ 2001-06-20  8:53 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On 06/20/2001 11:06:48 AM David Edelsohn wrote:
> 
>       I do not configure with --enable-threads=pthreads.  What is in
> your libstdc++.a?  Are you somehow finding GNU ld and GNU ar during
> configuration?

I have the GNUPro tools for AIX at the front of my path, as can be seen by 
the type commands below.  Is this wrong to do while configuring?  I 
thought I needed to do that (along with the --with-gnu-as 
--with-as=/opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/as) to get 
gcc to build on AIX.

Do I need to specify any --enable-threads to get the compiler to work with 
threaded code, or is this the default with AIX?  If I don't specify 
pthreads in this way, will the compiler work with code I have that uses 
pthreads?

What flags do you use to configure gcc for a bootstrap build?  I can 
reconfigure/rebuild with those flags and see if my problem goes away.

Matt

[/u/conwaym]-> ar -t /opt/gcc-3.0/lib/libstdc++.a
libstdc++.so.3

[/u/conwaym]-> type as 
as is /opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/as

[/u/conwaym]-> type ar
ar is /opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/ar

[/u/conwaym]-> type ld
ld is /usr/bin/ld

[/u/conwaym]-> as -v
GNU assembler version 2.9-aix43-000718 (powerpc-ibm-aix4.3.3.0) using BFD 
version 2.9-aix43-000718

[/u/conwaym]-> ar -V
GNU ar 2.9-aix43-000718


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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-20  8:53 Problem with '-static' in 3.0 release on AIX Matt_Conway
@ 2001-06-20  9:47 ` David Edelsohn
  2001-06-21  9:05   ` Albert Chin-A-Young
  0 siblings, 1 reply; 25+ messages in thread
From: David Edelsohn @ 2001-06-20  9:47 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

Matt> I have the GNUPro tools for AIX at the front of my path, as can be seen by 
Matt> the type commands below.  Is this wrong to do while configuring?  I 
Matt> thought I needed to do that (along with the --with-gnu-as 
Matt> --with-as=/opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/as) to get 
Matt> gcc to build on AIX.
Matt> y
Matt> Do I need to specify any --enable-threads to get the compiler to work with 
Matt> threaded code, or is this the default with AIX?  If I don't specify 
Matt> pthreads in this way, will the compiler work with code I have that uses 
Matt> pthreads?

Matt> What flags do you use to configure gcc for a bootstrap build?  I can 
Matt> reconfigure/rebuild with those flags and see if my problem goes away.

	Personally, I strongly recommend against using the GNUPro
toolchain or the FSF releases of GAS and GLD to configure and build GCC
3.0.  The GNUPro linker for AIX still has some significant
incompatibilities, partially because the semantics used by the AIX linker
are not well documented.  I also recently have found problems with the
line number debugging information that GAS assembles.

	GCC will configure and build powerpc, power, pthread, and 64-bit
multilibs by default, as well as use shared libraries.  Compile and link
the application with "-pthread" option (not the old -mthreads option).

	I configure and build the compiler with the AIX assembler, linker,
archiver, etc.  Configuring with the GNU assembler causes the
configuration process to find GAS extensions and use them, creating a
dependency on only using that assembler.

	I explicitly create a link from .../build/gcc/as to the GNU
Assembler when I build libstdc++-v3.  I do not use "make bootstrap".  GCC
will use "as" in the -Bxxx/ directory if it finds an executable.

	I only use GAS to compile libstdc++-v3 because those are the only
files with symbol names that cause problems for AIX as.  In fact the only
problem is a few files in libstdc++-v3/src.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-20  9:47 ` David Edelsohn
@ 2001-06-21  9:05   ` Albert Chin-A-Young
  2001-06-22  8:25     ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Albert Chin-A-Young @ 2001-06-21  9:05 UTC (permalink / raw)
  To: gcc

On Wed, Jun 20, 2001 at 12:47:30PM -0400, David Edelsohn wrote:
> 	Personally, I strongly recommend against using the GNUPro
> toolchain or the FSF releases of GAS and GLD to configure and build GCC
> 3.0.  The GNUPro linker for AIX still has some significant
> incompatibilities, partially because the semantics used by the AIX linker
> are not well documented.  I also recently have found problems with the
> line number debugging information that GAS assembles.
> 
> 	GCC will configure and build powerpc, power, pthread, and 64-bit
> multilibs by default, as well as use shared libraries.  Compile and link
> the application with "-pthread" option (not the old -mthreads option).
> 
> 	I configure and build the compiler with the AIX assembler, linker,
> archiver, etc.  Configuring with the GNU assembler causes the
> configuration process to find GAS extensions and use them, creating a
> dependency on only using that assembler.
> 
> 	I explicitly create a link from .../build/gcc/as to the GNU
> Assembler when I build libstdc++-v3.  I do not use "make bootstrap".  GCC
> will use "as" in the -Bxxx/ directory if it finds an executable.
> 
> 	I only use GAS to compile libstdc++-v3 because those are the only
> files with symbol names that cause problems for AIX as.  In fact the only
> problem is a few files in libstdc++-v3/src.

What version of binutils do you use? 2.11.2 doesn't build "out of the
box" on 4.3.2.

-- 
albert chin (china@thewrittenword.com)

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-21  9:05   ` Albert Chin-A-Young
@ 2001-06-22  8:25     ` David Edelsohn
  2001-06-22  8:37       ` Albert Chin-A-Young
  0 siblings, 1 reply; 25+ messages in thread
From: David Edelsohn @ 2001-06-22  8:25 UTC (permalink / raw)
  To: Albert Chin-A-Young; +Cc: gcc

>>>>> Albert Chin-A-Young writes:

Albert> What version of binutils do you use? 2.11.2 doesn't build "out of the
Albert> box" on 4.3.2.

	What failed for you?  I just configured and built binutils-2.11.2
"out of the box" on AIX 4.3.3.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-22  8:25     ` David Edelsohn
@ 2001-06-22  8:37       ` Albert Chin-A-Young
  2001-06-22 10:09         ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Albert Chin-A-Young @ 2001-06-22  8:37 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On Fri, Jun 22, 2001 at 11:24:58AM -0400, David Edelsohn wrote:
> >>>>> Albert Chin-A-Young writes:
> 
> Albert> What version of binutils do you use? 2.11.2 doesn't build "out of the
> Albert> box" on 4.3.2.
> 
> 	What failed for you?  I just configured and built binutils-2.11.2
> "out of the box" on AIX 4.3.3.

$ CC=xlc ./configure
...
$ gmake
..
gmake[3]: Entering directory `/opt/build/binutils-2.11.2/bfd'
/bin/sh ./libtool --mode=compile xlc -DHAVE_CONFIG_H -I. -I. -I.
-D_GNU_SOURCE   -DAIX_CORE_DUMPX_CORE -DAIX_CORE   -I. -I.
-I./../include  -I./../intl -I../intl    -g -c rs6000-core.c
xlc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -DAIX_CORE_DUMPX_CORE
-DAIX_CORE -I. -I. -I./../include -I./../intl -I../intl -g -c
rs6000-core.c
"rs6000-core.c", line 441.15: 1506-022 (S) "c_impl" is not a member of
"struct core_dumpx".
gmake[3]: *** [rs6000-core.lo] Error 1

According to /usr/include/sys/core.h, struct core_dumpx has no member
c_impl on AIX 4.3.2. We have v4.3.2.10 of bos.adt.include.

-- 
albert chin (china@thewrittenword.com)

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-22  8:37       ` Albert Chin-A-Young
@ 2001-06-22 10:09         ` David Edelsohn
  2001-06-22 10:45           ` Albert Chin-A-Young
  0 siblings, 1 reply; 25+ messages in thread
From: David Edelsohn @ 2001-06-22 10:09 UTC (permalink / raw)
  To: Albert Chin-A-Young; +Cc: gcc

>>>>> Albert Chin-A-Young writes:

Albert> According to /usr/include/sys/core.h, struct core_dumpx has no member
Albert> c_impl on AIX 4.3.2. We have v4.3.2.10 of bos.adt.include.

	The two changes between AIX 4.3.2 and AIX 4.3.3 are __ld_info32
and c_impl.  rs6000-core.c already checks for __ld_info32.

	Try changing the guard for the definition of CNEW_IMPL:

-#ifdef AIX_CORE_DUMPX_CORE
+#if defined (AIX_CORE_DUMPX_CORE) && defined (__ld_info32)

	If this works, I will submit this patch for backward compatibility
to the binutils sources.

Thanks, David

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-22 10:09         ` David Edelsohn
@ 2001-06-22 10:45           ` Albert Chin-A-Young
  2001-06-22 10:53             ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Albert Chin-A-Young @ 2001-06-22 10:45 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On Fri, Jun 22, 2001 at 01:09:15PM -0400, David Edelsohn wrote:
> >>>>> Albert Chin-A-Young writes:
> 
> Albert> According to /usr/include/sys/core.h, struct core_dumpx has no member
> Albert> c_impl on AIX 4.3.2. We have v4.3.2.10 of bos.adt.include.
> 
> 	The two changes between AIX 4.3.2 and AIX 4.3.3 are __ld_info32
> and c_impl.  rs6000-core.c already checks for __ld_info32.
> 
> 	Try changing the guard for the definition of CNEW_IMPL:
> 
> -#ifdef AIX_CORE_DUMPX_CORE
> +#if defined (AIX_CORE_DUMPX_CORE) && defined (__ld_info32)
> 
> 	If this works, I will submit this patch for backward compatibility
> to the binutils sources.

It doesn't work. <sys/ldr.h> gets included while bfd/rs6000-core.c is
being built. It has:

#ifdef __LDINFO_PTRACE32__
#ifdef __64BIT__

/* Use 'struct __ld_info32' when calling ptrace to debug a 32-bit
process. */
struct __ld_info32 {
        __I_FIELDS(__I_INT32,__I_PTR32, __I_EMPTY)
};

#else
#define __ld_info32 ld_info
#endif

#endif /* __LDINFO_PTRACE32__ */

and bfd/rs6000-core.c has:

#include <sys/user.h>
#define __LDINFO_PTRACE32__     /* for __ld_info32 */
#define __LDINFO_PTRACE64__     /* for __ld_info64 */
#include <sys/ldr.h>
#include <sys/core.h>
#include <sys/systemcfg.h>

So, __ld_info32 is defined on AIX 4.3.2 by bfd/rs6000-core.c.

How about an autoconf check to test for c_impl then modifying the
ifdef to #ifdef AIX_CORE_DUMPX_HAS_C_IMPL? This should be trivial for
me to do. I take it I only care about c_impl in struct core_dumpx and
not core_dump?

-- 
albert chin (china@thewrittenword.com)

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-22 10:45           ` Albert Chin-A-Young
@ 2001-06-22 10:53             ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-22 10:53 UTC (permalink / raw)
  To: Albert Chin-A-Young; +Cc: gcc

	I did not realize that AIX 4.3.2 already had defined __ld_info32.
AIX 4.3.2 ldr.h uses it, but core.h does not -- although it should in the
definition of CTABSIZE.

	If you want to write an autoconf test for bfd, go ahead.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-26 12:11 Matt_Conway
  0 siblings, 0 replies; 25+ messages in thread
From: Matt_Conway @ 2001-06-26 12:11 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

Ok, well, thanks for your help - I guess I'll just have to wait for 
someone to produce a binary distribution.

Matt

On 06/26/2001 02:08:02 PM David Edelsohn wrote:
> 
> Matt> Ok, I got the newer version of the gnupro assembler that you sent, 
but got
> Matt> the same results when I tried it.
> 
>       I do not know what to suggest.  I had some flakiness with G++ EH

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-26 11:01 Matt_Conway
@ 2001-06-26 11:08 ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-26 11:08 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

Matt> Ok, I got the newer version of the gnupro assembler that you sent, but got 
Matt> the same results when I tried it.

	I do not know what to suggest.  I had some flakiness with G++ EH
during the days preceding the GCC 3.0 release, but I rebuild everything
and scoured the shared library segment and then everything worked.  My
problem was not crashes, but numerous EH regressions where the stack
walker was not finding a valid exception handler.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-26 11:03 Matt_Conway
  0 siblings, 0 replies; 25+ messages in thread
From: Matt_Conway @ 2001-06-26 11:03 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gcc

On 06/26/2001 11:52:19 AM Andreas Schwab wrote:
 
> |> make CC="stage1/xgcc -Bstage1" CFLAGS="-O2 -g"
>                         ^^^^^^^^
> That should be "-Bstage1/".

If that was going to cause a failure, wouldn't it happen during the build 
of the compiler rather than when I try and use the compiler?  If not, then 
I guess I'll have to rebuild (*again* *sigh*) =)

Matt

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-26 11:01 Matt_Conway
  2001-06-26 11:08 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Matt_Conway @ 2001-06-26 11:01 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On 06/26/2001 12:45:13 PM David Edelsohn wrote:
> 
>       Also, the version of GNUPro Assembler that you are using is not
> the latest.  I will email you the latest build to see if that helps.

Ok, I got the newer version of the gnupro assembler that you sent, but got 
the same results when I tried it.  This is what I did:

ln -s /opt/gnupro/new-as gcc/as
make clean-target-libstdc++-v3
make all-target-libstdc++-v3
sudo bash
make install
/usr/sbin/slibclean


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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-26  8:32 Matt_Conway
  2001-06-26  8:52 ` Andreas Schwab
@ 2001-06-26  9:45 ` David Edelsohn
  1 sibling, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-26  9:45 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

Matt> The broken compiler was not even in the path while I was doing the latest 
Matt> compile (though a old version of gcc  2.95.2 was in the path, the build 
Matt> process used cc).  Do you think I need to do a slibclean (and possibly a 
Matt> reboot) before building the compiler?  Any other ideas?

	I think that you misunderstood me.  The compiler used while
rebuilding GCC is *IRRELEVANT*.  If you *EVER* ran an application with the
broken shared library created by the broken, original build of the
compiler, AIX has cached that broken shared library and you *MUST* run
slibclean.

	Also, the version of GNUPro Assembler that you are using is not
the latest.  I will email you the latest build to see if that helps.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-26  8:32 Matt_Conway
@ 2001-06-26  8:52 ` Andreas Schwab
  2001-06-26  9:45 ` David Edelsohn
  1 sibling, 0 replies; 25+ messages in thread
From: Andreas Schwab @ 2001-06-26  8:52 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

Matt_Conway@i2.com writes:

|> make CC="stage1/xgcc -Bstage1" CFLAGS="-O2 -g"
                        ^^^^^^^^

That should be "-Bstage1/".

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-26  8:32 Matt_Conway
  2001-06-26  8:52 ` Andreas Schwab
  2001-06-26  9:45 ` David Edelsohn
  0 siblings, 2 replies; 25+ messages in thread
From: Matt_Conway @ 2001-06-26  8:32 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On 06/25/2001 08:16:31 PM David Edelsohn wrote:
>
>       Did you ever install the broken build of the compiler?  Did you

Yes

> run any applications with the shared libraries that you built earlier?

I did run a few simple test apps I use to check the compiler is working.

> need to run the AIX /usr/sbin/slibclean command (which only can be run 
by
> root) to remove the stale copies of the library from the shared library
> segment.
> 
>       Try that and see if your problem still is present.

Didn't make a difference.
The broken compiler was not even in the path while I was doing the latest 
compile (though a old version of gcc  2.95.2 was in the path, the build 
process used cc).  Do you think I need to do a slibclean (and possibly a 
reboot) before building the compiler?  Any other ideas?

How do I tell what version of AIX as/ld I am using - maybe I have a 
version with a weird bug?
In case I fat fingered something - here is the seuqence of steps I used to 
do a manual bootstrap (copied from command line history)

[/disk1/tmp/gcc3/go2]-> type as
as is /usr/bin/as
[/disk1/tmp/gcc3/go2]-> type ld 
ld is /usr/bin/ld

export SHELL=/usr/local/bin/bash
export CONFIG_SHELL=/usr/local/bin/bash
md go2; cd go2
/disk1/tmp/gcc3/gcc-3.0/configure --prefix=/opt/gcc-3.0
make all-zlib all-libiberty
cd gcc
make LANGUAGES=c
make stage1
make CC="stage1/xgcc -Bstage1" CFLAGS="-O2 -g"
make stage2
make CC="stage2/xgcc -Bstage2/" CFLAGS="-O2 -g"
cd ..
make all-target-libiberty all-target-libf2c all-target-libobjc
ln -s /opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/as gcc/as
make SHELL=/usr/local/bin/bash CONFIG_SHELL=/usr/local/bin/bash 
all-target-libstdc++-v3
sudo bash
make install


Matt

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-25 16:46 Matt_Conway
@ 2001-06-25 17:16 ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-25 17:16 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

Matt> After performing a manual bootstrap like David suggested, my problems with 
Matt> "-static" went away.  Thanks to David for being so patient in explaining 
Matt> to me how to do a manual boostrap.

	Great.  Glad that the tedious process worked.  Hopefully we can
fix these build issues for gcc-3.0.1.

Matt> Unfortunately, I now I have another problem with gcc3.0 on AIX 4.3.3.  The 
Matt> following code compiles ok, but causes a SIGABRT when throwing the 
Matt> exception.  Anyone have any ideas?  Code similar to this was working on 
Matt> 3.0 branch snapshots up to a couple of weeks prior to release, so it must
Matt> be one of the more recent changes that is the culprit.

	I tried your exception handling example which is failing for you,
but it is working okay for me.

	Did you ever install the broken build of the compiler?  Did you
run any applications with the shared libraries that you built earlier?

	I think that you may be seeing another "feature" of AIX: caching
of shared libraries.  By default, AIX caches shared libraries in the
public shared library segment, unless the shared library file permissions
are set to not-readable by other (e.g., chmod o-r libgcc_s.a libstdc++.a).
If the permissions do not allow the shared library to be read by everyone,
the shared library is placed in the process private segment.

	What this means is that your application may be using a stale copy
of the shared library instead of the current file that you rebuilt.  You
need to run the AIX /usr/sbin/slibclean command (which only can be run by
root) to remove the stale copies of the library from the shared library
segment.

	Try that and see if your problem still is present.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-25 16:46 Matt_Conway
  2001-06-25 17:16 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Matt_Conway @ 2001-06-25 16:46 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

After performing a manual bootstrap like David suggested, my problems with 
"-static" went away.  Thanks to David for being so patient in explaining 
to me how to do a manual boostrap.
Unfortunately, I now I have another problem with gcc3.0 on AIX 4.3.3.  The 
following code compiles ok, but causes a SIGABRT when throwing the 
exception.  Anyone have any ideas?  Code similar to this was working on 
3.0 branch snapshots up to a couple of weeks prior to release, so it must 
be one of the more recent changes that is the culprit.

gcc-throw-bug.cpp:

int main()
{
        try
        {
                throw 0;
        }
        catch (...)
        {
        }
}

(gdb) b main
Breakpoint 1 at 0x10000354: file gcc-throw-bug.cpp, line 6.
(gdb) run
Starting program: /u/conwaym/src/cpptest/./gcc-throw-bug 

Breakpoint 1, main () at gcc-throw-bug.cpp:6
6                       throw 0;
(gdb) n

Program received signal SIGABRT, Aborted.
0xd0175128 in raise ()
(gdb) bt
#0  0xd0175128 in raise ()
#1  0xd016e864 in abort ()
#2  0xd07a28ec in _ZN10__cxxabiv111__terminateEPFvvE (handler=0)
    at /disk1/tmp/gcc3/gcc-3.0/libstdc++-v3/libsupc++/eh_terminate.cc:47
#3  0xd07a2974 in _ZSt9terminatev ()
    at /disk1/tmp/gcc3/gcc-3.0/libstdc++-v3/libsupc++/eh_terminate.cc:57
#4  0xd07a3d6c in __cxa_throw (obj=0x0, tinfo=0xffffffff, dest=0xffffffff)
    at /disk1/tmp/gcc3/gcc-3.0/libstdc++-v3/libsupc++/eh_throw.cc:77
#5  0x10000378 in main () at gcc-throw-bug.cpp:6
#6  0x100001dc in __start ()

Matt

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-21 13:56 ` Alexandre Oliva
@ 2001-06-21 14:01   ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-21 14:01 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Matt_Conway, gcc

>>>>> Alexandre Oliva writes:

Alexandre> What's wrong with a plain `make bootstrap'?

	Because part of libstdc++ reqiures the GNU Assembler.  However the
GNU Assembler support for AIX (performed by a company which shall remain
nameless) has bugs which still are in the process of being fixed.  Those
bugs make it better to avoid the GNU Assembler except when needed.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-21 11:47 Matt_Conway
  2001-06-21 11:50 ` David Edelsohn
@ 2001-06-21 13:56 ` Alexandre Oliva
  2001-06-21 14:01   ` David Edelsohn
  1 sibling, 1 reply; 25+ messages in thread
From: Alexandre Oliva @ 2001-06-21 13:56 UTC (permalink / raw)
  To: Matt_Conway; +Cc: David Edelsohn, gcc

On Jun 21, 2001, Matt_Conway@i2.com wrote:

> I ran "make" (default target) and it failed with:

> cc -c  -DIN_GCC    -g   -DHAVE_CONFIG_H    -I. -Icp -I../../gcc-3.0/gcc 
> -I../../gcc-3.0/gcc/cp -I../../gcc-3.0/gcc/config 
> -I../../gcc-3.0/gcc/../include ../../gcc-3.0/gcc/cp/decl.c -o cp/decl.o
> "../../gcc-3.0/gcc/cp/decl.c", line 528.3: 1506-025 (S) Operand must be a 
> modifiable lvalue.

Yep, only the C front-end is supposed to be compilable with non-GCC
compilers, which is why the installation manual says you should use
make bootstrap.

> Could you please tell me the rest of the make steps for a manual 
> bootstrap?

What's wrong with a plain `make bootstrap'?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-21 11:47 Matt_Conway
@ 2001-06-21 11:50 ` David Edelsohn
  2001-06-21 13:56 ` Alexandre Oliva
  1 sibling, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-21 11:50 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

>> 3) cd gcc
>> 4) explicit bootstrap (make

Matt> I ran "make" (default target) and it failed with:

	Sorry, that first step should have been

"make LANGUAGES=c"

Only the "C" language can be built by vendor compilers.  Other languages
assume GCC extensions.

David

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-21 11:47 Matt_Conway
  2001-06-21 11:50 ` David Edelsohn
  2001-06-21 13:56 ` Alexandre Oliva
  0 siblings, 2 replies; 25+ messages in thread
From: Matt_Conway @ 2001-06-21 11:47 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On 06/21/2001 12:51:52 PM David Edelsohn wrote:
>
> 1) Configure at top level

First I removed GNUPro from my path, then I did:
md go; cd go; ../gcc/configure --prefix=/opt/gcc-3.0
Which succeeded

> 2) make all-zlib all-libiberty

This also succeeded

> 3) cd gcc
> 4) explicit bootstrap (make

I ran "make" (default target) and it failed with:

cc -c  -DIN_GCC    -g   -DHAVE_CONFIG_H    -I. -Icp -I../../gcc-3.0/gcc 
-I../../gcc-3.0/gcc/cp -I../../gcc-3.0/gcc/config 
-I../../gcc-3.0/gcc/../include ../../gcc-3.0/gcc/cp/decl.c -o cp/decl.o
"../../gcc-3.0/gcc/cp/decl.c", line 528.3: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 584.5: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 599.5: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 621.3: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 634.3: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 4294.7: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 4296.7: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 6405.3: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 9932.7: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 9935.7: 1506-025 (S) Operand must be a 
modifiable lvalue.
"../../gcc-3.0/gcc/cp/decl.c", line 13472.3: 1506-025 (S) Operand must be 
a modifiable lvalue.
gmake: *** [cp/decl.o] Error 1


> ; make stage1;
>    make CC="stage1/xgcc -Bstage1" CFLAGS="-O2 -g"; etc.

Sometimes I hate those three little letters - etc =) 
Could you please tell me the rest of the make steps for a manual 
bootstrap?  Its probably a lot easier for you to cut and paste them, than 
it is for me to trace through gcc/Makefile.

Thanks,

Matt

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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-21  8:34 Matt_Conway
@ 2001-06-21  9:52 ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-21  9:52 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

>>>>> Matt Conway writes:

Matt> Seeing as how a pause is needed between making the compiler and libstdc++ 
Matt> (for symlinking as), what makefile targets do you use to make _just_ the 
Matt> compiler (and other needed libs I assume) and then libstdc++ ?  I'll let 
Matt> you know how it goes once I rebuild.

	I do the following steps:

1) Configure at top level
2) make all-zlib all-libiberty
3) cd gcc
4) explicit bootstrap (make; make stage1;
   make CC="stage1/xgcc -Bstage1" CFLAGS="-O2 -g"; etc.
5) make all-target-libiberty all-target-libf2c all-target-libobjc
6) ln -s GNU-Assembler gcc/as
7) make all-target-libstdc++-v3

	Depending on whether your system is 64-bits, you either need to
configure with --disable-aix64 or fake out the 64-bit limits files in
libstdc++. 

David

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

* Re: Problem with '-static' in 3.0 release on AIX
@ 2001-06-21  8:34 Matt_Conway
  2001-06-21  9:52 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Matt_Conway @ 2001-06-21  8:34 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

On 06/20/2001 12:47:30 PM David Edelsohn wrote:

>       Personally, I strongly recommend against using the GNUPro
> toolchain or the FSF releases of GAS and GLD to configure and build GCC

Ok, I'll switch back to AIX's assembler - I thought one needed it for the 
entire compiler and not just libstdc++.

>       I explicitly create a link from .../build/gcc/as to the GNU
> Assembler when I build libstdc++-v3.  I do not use "make bootstrap". GCC
> will use "as" in the -Bxxx/ directory if it finds an executable.
> 

Seeing as how a pause is needed between making the compiler and libstdc++ 
(for symlinking as), what makefile targets do you use to make _just_ the 
compiler (and other needed libs I assume) and then libstdc++ ?  I'll let 
you know how it goes once I rebuild.

Matt


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

* Re: Problem with '-static' in 3.0 release on AIX
  2001-06-19  9:01 Matt_Conway
@ 2001-06-20  8:07 ` David Edelsohn
  0 siblings, 0 replies; 25+ messages in thread
From: David Edelsohn @ 2001-06-20  8:07 UTC (permalink / raw)
  To: Matt_Conway; +Cc: gcc

	I have absolutely *NO* idea why the errors like

ld: 0711-212 SEVERE ERROR: Symbol __quous, found in the global symbol 
table of archive 

are appearing for you.  I do not see them on my AIX 4.3.3 system.  I am
not even sure what the error means because libstdc++.a only should contain
the shared object libstc++.so.3.

	I do not configure with --enable-threads=pthreads.  What is in
your libstdc++.a?  Are you somehow finding GNU ld and GNU ar during
configuration? 

	The duplicate symbol warnings are expected.  The "alignment more
strict" warning is a bug in the GNU Assembler which will be fixed in the
updated GNUPro assembler available from IBM's website and should be
included in the next gas update coming out shortly (2.11.2?).

David

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

* Problem with '-static' in 3.0 release on AIX
@ 2001-06-19  9:01 Matt_Conway
  2001-06-20  8:07 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Matt_Conway @ 2001-06-19  9:01 UTC (permalink / raw)
  To: gcc

I get the following problem when linking a simple hello world app with gcc 
3.0 release on AIX 4.3.3.  The app works fine if I do not use the 
'-static' flag.  Do I need to do something else to link statically, or is 
this a bug?

I configured/installed using:

../gcc-3.0/configure
         --enable-threads=pthreads
         --prefix=/opt/gcc-3.0
         --with-gnu-as
 --with-as=/opt/gnupro/aix43-000718/H-powerpc-ibm-aix4.3.3.0/bin/as

[/u/conwaym/src/cpptest]-> g++ -static -o hello hello.cpp
ld: 0711-212 SEVERE ERROR: Symbol __quous, found in the global symbol 
table
        of archive 
/opt/gcc-3.0/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/../../../libstdc++.a, 
was not defined in archive member libstdc++.so.3.
ld: 0711-212 SEVERE ERROR: Symbol __mulh, found in the global symbol table
        of archive 
/opt/gcc-3.0/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/../../../libstdc++.a, 
was not defined in archive member libstdc++.so.3.
ld: 0711-224 WARNING: Duplicate symbol: 
std::_Format_cache<char>::_S_pword_ix
ld: 0711-224 WARNING: Duplicate symbol: std::numpunct<char>::id
ld: 0711-341 WARNING: Replaced XTY_CM symbol 
std::numpunct<char>::idrequires an
        alignment more strict than the alignment of the symbol that 
replaces it.
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
collect2: ld returned 12 exit status

hello.cpp:
#include <iostream>
using namespace std;

int main()
{
        cout << "Hello" << endl;
}

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

end of thread, other threads:[~2001-06-26 12:11 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-20  8:53 Problem with '-static' in 3.0 release on AIX Matt_Conway
2001-06-20  9:47 ` David Edelsohn
2001-06-21  9:05   ` Albert Chin-A-Young
2001-06-22  8:25     ` David Edelsohn
2001-06-22  8:37       ` Albert Chin-A-Young
2001-06-22 10:09         ` David Edelsohn
2001-06-22 10:45           ` Albert Chin-A-Young
2001-06-22 10:53             ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2001-06-26 12:11 Matt_Conway
2001-06-26 11:03 Matt_Conway
2001-06-26 11:01 Matt_Conway
2001-06-26 11:08 ` David Edelsohn
2001-06-26  8:32 Matt_Conway
2001-06-26  8:52 ` Andreas Schwab
2001-06-26  9:45 ` David Edelsohn
2001-06-25 16:46 Matt_Conway
2001-06-25 17:16 ` David Edelsohn
2001-06-21 11:47 Matt_Conway
2001-06-21 11:50 ` David Edelsohn
2001-06-21 13:56 ` Alexandre Oliva
2001-06-21 14:01   ` David Edelsohn
2001-06-21  8:34 Matt_Conway
2001-06-21  9:52 ` David Edelsohn
2001-06-19  9:01 Matt_Conway
2001-06-20  8:07 ` 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).