public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/26297]  New: boostrap fails with invalid cast cast on AIX
@ 2006-02-15  8:14 multix at gmail dot com
  2006-02-15  8:24 ` [Bug bootstrap/26297] " multix at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: multix at gmail dot com @ 2006-02-15  8:14 UTC (permalink / raw)
  To: gcc-bugs

/usr/local/build/gcc/xgcc -shared-libgcc -B/usr/local/build/gcc/ -nostdinc++
-L/
usr/local/build/powerpc-ibm-aix4.2.1.0/soft-float/libstdc++-v3/src
-L/usr/local/
build/powerpc-ibm-aix4.2.1.0/soft-float/libstdc++-v3/src/.libs
-B/usr/local/gcc3
45/powerpc-ibm-aix4.2.1.0/bin/ -B/usr/local/gcc345/powerpc-ibm-aix4.2.1.0/lib/
-
isystem /usr/local/gcc345/powerpc-ibm-aix4.2.1.0/include -isystem
/usr/local/gcc
345/powerpc-ibm-aix4.2.1.0/sys-include -msoft-float
-I/usr/local/build/powerpc-i
bm-aix4.2.1.0/soft-float/libstdc++-v3/include/powerpc-ibm-aix4.2.1.0
-I/usr/loca
l/build/powerpc-ibm-aix4.2.1.0/soft-float/libstdc++-v3/include
-I/home/multix/gc
c-3.4.5/libstdc++-v3/libsupc++ -O2 -O -g -O2 -msoft-float
-fno-implicit-template
s -Wall -W -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffuncti
on-sections -fdata-sections -c c++locale.cc   -DPIC -o .libs/c++locale.o
c++locale.cc:1: warning: -ffunction-sections may affect debugging on some
target
s
c++locale.cc: In function `void std::__convert_to_v(const char*, _Tv&,
std::_Ios
_Iostate&, int* const&) [with _Tv = float]':
c++locale.cc:61: error: invalid conversion from `const char*' to `char*'
c++locale.cc:61: error:   initializing argument 1 of `float strtof(char*,
char**)'
make[7]: *** [c++locale.lo] Error 1
make[7]: Leaving directory
`/usr/local/build/powerpc-ibm-aix4.2.1.0/soft-float/libstdc++-v3/src'


-- 
           Summary: boostrap fails with invalid cast cast on AIX
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: multix at gmail dot com
 GCC build triplet: powerpc-ibm-aix4.2.1.0
  GCC host triplet: powerpc-ibm-aix4.2.1.0
GCC target triplet: powerpc-ibm-aix4.2.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug bootstrap/26297] boostrap fails with invalid cast cast on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
@ 2006-02-15  8:24 ` multix at gmail dot com
  2006-02-15 10:42 ` [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls " rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: multix at gmail dot com @ 2006-02-15  8:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from multix at gmail dot com  2006-02-15 08:24 -------
configure flags recorded in config.status are:

# /home/multix/gcc-3.4.5/configure  --prefix=/usr/local/gcc345
--enable-threads=
aix --disable-nls --enable-languages=c,c++,objc
--with-gcc-version-trigger=/home
/multix/gcc-3.4.5/gcc/version.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
  2006-02-15  8:24 ` [Bug bootstrap/26297] " multix at gmail dot com
@ 2006-02-15 10:42 ` rguenth at gcc dot gnu dot org
  2006-02-15 11:04 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-15 10:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-02-15 10:42 -------
This looks more like a libstdc++ issue, maybe not even AIX specific.  I'm
trying to reproduce on i686-linux.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|bootstrap                   |libstdc++
            Summary|boostrap fails with invalid |boostrap fails with invalid
                   |cast cast on AIX            |cast compiling libstdc++
                   |                            |with --disable-nls on AIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
  2006-02-15  8:24 ` [Bug bootstrap/26297] " multix at gmail dot com
  2006-02-15 10:42 ` [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls " rguenth at gcc dot gnu dot org
@ 2006-02-15 11:04 ` rguenth at gcc dot gnu dot org
  2006-02-15 11:10 ` pcarlini at suse dot de
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-15 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-02-15 11:04 -------
Cannot reproduce on i686-linux with 3.4 branch as of r110789


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (2 preceding siblings ...)
  2006-02-15 11:04 ` rguenth at gcc dot gnu dot org
@ 2006-02-15 11:10 ` pcarlini at suse dot de
  2006-02-15 17:04 ` multix at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2006-02-15 11:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2006-02-15 11:10 -------
(In reply to comment #0)

> c++locale.cc:61: error: invalid conversion from `const char*' to `char*'
> c++locale.cc:61: error:   initializing argument 1 of `float strtof(char*,

A few comments: first, I seriously doubt --disable-nls is relevant, because the
error happens in the above line, where I cannot see the involvment of nls. That
said, you gonna need --enable-clocale=generic, on linux, to enable that code,
which is part of the generic locale model (used by default on AIX). Last but
not least, I don't think on linux - and many other targets for that matter -
the first parameter of strtof is of type char* (vs const char*) ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (3 preceding siblings ...)
  2006-02-15 11:10 ` pcarlini at suse dot de
@ 2006-02-15 17:04 ` multix at gmail dot com
  2006-02-17 19:55 ` pcarlini at suse dot de
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: multix at gmail dot com @ 2006-02-15 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from multix at gmail dot com  2006-02-15 17:04 -------
this bug appears to still exist in gcc 4.0.2
(compiled on the same box)

/usr/local/build/buildgcc402/gcc/xgcc -shared-libgcc
-B/usr/local/build/buildgcc402/gcc/ -nostdinc++
-L/usr/local/build/buildgcc402/powerpc-ibm-aix4.2.1.0/libstdc++-v3/src
-L/usr/local/build/buildgcc402/powerpc-ibm-aix4.2.1.0/libstdc++-v3/src/.libs
-B/usr/local/gcc402/powerpc-ibm-aix4.2.1.0/bin/
-B/usr/local/gcc402/powerpc-ibm-aix4.2.1.0/lib/ -isystem
/usr/local/gcc402/powerpc-ibm-aix4.2.1.0/include -isystem
/usr/local/gcc402/powerpc-ibm-aix4.2.1.0/sys-include
-I/usr/local/build/buildgcc402/powerpc-ibm-aix4.2.1.0/libstdc++-v3/include/powerpc-ibm-aix4.2.1.0
-I/usr/local/build/buildgcc402/powerpc-ibm-aix4.2.1.0/libstdc++-v3/include
-I/usr/local/build/gcc-4.0.2/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c
c++locale.cc   -DPIC -o .libs/c++locale.o
c++locale.cc:1: warning: -ffunction-sections may affect debugging on some
targets
c++locale.cc: In function 'void std::__convert_to_v(const char*, _Tv&,
std::_Ios_Iostate&, int* const&) [with _Tv = float]':
c++locale.cc:61: error: invalid conversion from 'const char*' to 'char*'
c++locale.cc:61: error:   initializing argument 1 of 'float strtof(char*,
char**)'
make[4]: *** [c++locale.lo] Error 1
make[4]: Leaving directory
`/usr/local/build/buildgcc402/powerpc-ibm-aix4.2.1.0/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1


-- 

multix at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.4.5                       |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (4 preceding siblings ...)
  2006-02-15 17:04 ` multix at gmail dot com
@ 2006-02-17 19:55 ` pcarlini at suse dot de
  2006-02-17 20:05 ` dje at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2006-02-17 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pcarlini at suse dot de  2006-02-17 19:55 -------
David, can you please have a look? Certainly we have succesful reports:

  http://gcc.gnu.org/buildstat.html

In the meanwhile, submitter should check that is following the target-specific
installation notes:

  http://gcc.gnu.org/install/specific.html#x-ibm-aix


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dje at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (5 preceding siblings ...)
  2006-02-17 19:55 ` pcarlini at suse dot de
@ 2006-02-17 20:05 ` dje at gcc dot gnu dot org
  2006-02-18 23:04 ` multix at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-02-17 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dje at gcc dot gnu dot org  2006-02-17 20:05 -------
AIX 4.2 probably cannot be supported by current versions of GCC.  If libstdc++
doesn't work on AIX 4.2, then it doesn't work.  I do not have access to any AIX
4.2 system and AIX 4.2 was removed from IBM support a long time ago.  libstdc++
probably relies on more modern Posix-conformant headers than were shipped with
AIX 4.2.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (6 preceding siblings ...)
  2006-02-17 20:05 ` dje at gcc dot gnu dot org
@ 2006-02-18 23:04 ` multix at gmail dot com
  2006-02-18 23:16 ` dje at gcc dot gnu dot org
  2006-02-21 17:00 ` multix at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: multix at gmail dot com @ 2006-02-18 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from multix at gmail dot com  2006-02-18 23:04 -------
this happens on 3.3.6 too, but I read 
http://gcc.gnu.org/ml/gcc/2003-10/msg00110.html

who was able to build 3.3.1 on an even older system. Differences are that he
disabled multilib and shared libraries. I don't see how that could affect me
though.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (7 preceding siblings ...)
  2006-02-18 23:04 ` multix at gmail dot com
@ 2006-02-18 23:16 ` dje at gcc dot gnu dot org
  2006-02-21 17:00 ` multix at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-02-18 23:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dje at gcc dot gnu dot org  2006-02-18 23:16 -------
libstdc++ configuration may have detected that the particular feature causing
problems was not present or the header may not have defined the function at
all, causing libstdc++ to provide its own implementation.

The usual problem is that a system claims it supports some feature, but does
not implement it correctly or does not declare the standard function correctly.
 Providing something wrong generally is worse than not providing it.  GCC does
have some functionality to go back and fix up headers, but GCC probably does
not know about this particular problem.

The problem appears to be that AIX 4.2 declares strtof() in
/usr/include/stdlib.h as

extern float    strtof(char *, char **);

instead of 

extern float    strtof(const char *, char **);

In other words, missing the "const".  You could manually fix the header during
the build process between building the compiler and building the libraries, by
changing the copy of the stdlib.h header in the gcc/include subdirectory of the
build.  GCC uses its copy of the header if present.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

* [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls on AIX
  2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
                   ` (8 preceding siblings ...)
  2006-02-18 23:16 ` dje at gcc dot gnu dot org
@ 2006-02-21 17:00 ` multix at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: multix at gmail dot com @ 2006-02-21 17:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from multix at gmail dot com  2006-02-21 17:00 -------
thanks. I fixed the header as you suggest and typed the same boostrap make
command again and left it running overninght. I found that gcc had completed
build and I installed.
Trying to compile a hello world program like
#include <iostream>

int main ()
{
        std::cout << "hello";
        return 0;
}


yields me
g++ hello.c 
ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&, char const*)
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::Init()
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::~Init()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status

I don't think this is now related to the bugs we are discussing here ? Since
the gcc 3.04 has known problems too (ld: 0711-317 ERROR: Undefined symbol:
std::string::_Rep::_S_max_size) I tried the program with 2.95 and it works.

I wonder know if your fix is safe and if it could be integrated in future
stable versions of 3.4x and 4.x and that there are other problems to solve
instead.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26297


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

end of thread, other threads:[~2006-02-21 17:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-15  8:14 [Bug bootstrap/26297] New: boostrap fails with invalid cast cast on AIX multix at gmail dot com
2006-02-15  8:24 ` [Bug bootstrap/26297] " multix at gmail dot com
2006-02-15 10:42 ` [Bug libstdc++/26297] boostrap fails with invalid cast compiling libstdc++ with --disable-nls " rguenth at gcc dot gnu dot org
2006-02-15 11:04 ` rguenth at gcc dot gnu dot org
2006-02-15 11:10 ` pcarlini at suse dot de
2006-02-15 17:04 ` multix at gmail dot com
2006-02-17 19:55 ` pcarlini at suse dot de
2006-02-17 20:05 ` dje at gcc dot gnu dot org
2006-02-18 23:04 ` multix at gmail dot com
2006-02-18 23:16 ` dje at gcc dot gnu dot org
2006-02-21 17:00 ` multix at gmail dot com

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