public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
       [not found] <bug-45482-4@http.gcc.gnu.org/bugzilla/>
@ 2011-12-08 19:50 ` gseanmcg at gmail dot com
  2011-12-09  9:05 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 13+ messages in thread
From: gseanmcg at gmail dot com @ 2011-12-08 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Sean McGovern <gseanmcg at gmail dot com> 2011-12-08 19:49:41 UTC ---
If this bug has been resolved, please go ahead and close it.


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
       [not found] <bug-45482-4@http.gcc.gnu.org/bugzilla/>
  2011-12-08 19:50 ` [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc' gseanmcg at gmail dot com
@ 2011-12-09  9:05 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-09  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #14 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-09 09:04:17 UTC ---
Fixed.


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (9 preceding siblings ...)
  2010-09-08 16:00 ` mikpe at it dot uu dot se
@ 2010-09-08 16:11 ` sfilippone at uniroma2 dot it
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-08 16:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from sfilippone at uniroma2 dot it  2010-09-08 16:11 -------
(In reply to comment #11)
> (In reply to comment #10)
> 
> How did you configure those prebuilt gmp/mpfr/mpc libraries installed under
> your home directory?  In particular, did you configure them all with
> --disable-shared?  If not, then you have to be extremely careful to avoid
> unintended mismatches, and in some cases incorrectly duplicated state.
> 
> I know for a fact that prebuilt gmp/mpfr/mpc installed in a private location
> works fine on powerpc64-linux when all are configured with --disable-shared.
> 
Indeed, they were shared. 
The thing that caught me is that I have built GCC hundreds of times on
i686/x86_64 with shared, private dir  gmp/mpfr/mpc without a problem, so I went
ahead and did the same on this machine; I normally bootstrap on my two main 
machines the 4.6 trunk every other day. 

Of course I am not claiming I didn't do anything wrong, just that it was not
obvious from the various docs, including platform notes, that it was safer to
use disable-shared or build from the GCC source tree. Anyway, my problem is
fixed, and I know a bit more than yesterday; thanks everybody. 


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (8 preceding siblings ...)
  2010-09-08 15:35 ` sfilippone at uniroma2 dot it
@ 2010-09-08 16:00 ` mikpe at it dot uu dot se
  2010-09-08 16:11 ` sfilippone at uniroma2 dot it
  10 siblings, 0 replies; 13+ messages in thread
From: mikpe at it dot uu dot se @ 2010-09-08 16:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mikpe at it dot uu dot se  2010-09-08 16:00 -------
(In reply to comment #10)
> (In reply to comment #9)
> > 
> I have found a cure. 
> 
> The original configuration had GMP, MPFR and MPC built and installed under the
> user home directory (there were neither mpfr nor mpc system-wide, and gmp was a
> bit old); somehow this is the root cause of the problem, despite --with-gmp and
> friends. 
> 
> Building the three packages from source in the GCC source tree gets the
> bootstrap process beyond the previous stopping point (currently in middle of
> stage 3). 
> 
> Maybe this should be added to the platform-specific notes? 

How did you configure those prebuilt gmp/mpfr/mpc libraries installed under
your home directory?  In particular, did you configure them all with
--disable-shared?  If not, then you have to be extremely careful to avoid
unintended mismatches, and in some cases incorrectly duplicated state.

I know for a fact that prebuilt gmp/mpfr/mpc installed in a private location
works fine on powerpc64-linux when all are configured with --disable-shared.


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (7 preceding siblings ...)
  2010-09-07  7:20 ` sfilippone at uniroma2 dot it
@ 2010-09-08 15:35 ` sfilippone at uniroma2 dot it
  2010-09-08 16:00 ` mikpe at it dot uu dot se
  2010-09-08 16:11 ` sfilippone at uniroma2 dot it
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-08 15:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from sfilippone at uniroma2 dot it  2010-09-08 15:35 -------
(In reply to comment #9)
> 
I have found a cure. 

The original configuration had GMP, MPFR and MPC built and installed under the
user home directory (there were neither mpfr nor mpc system-wide, and gmp was a
bit old); somehow this is the root cause of the problem, despite --with-gmp and
friends. 

Building the three packages from source in the GCC source tree gets the
bootstrap process beyond the previous stopping point (currently in middle of
stage 3). 

Maybe this should be added to the platform-specific notes? 


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (6 preceding siblings ...)
  2010-09-02 17:32 ` salvatore dot filippone at uniroma2 dot it
@ 2010-09-07  7:20 ` sfilippone at uniroma2 dot it
  2010-09-08 15:35 ` sfilippone at uniroma2 dot it
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-07  7:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from sfilippone at uniroma2 dot it  2010-09-07 07:20 -------
(In reply to comment #8)
> Created an attachment (id=21673)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21673&action=view) [edit]
> 
Modifying the conftest source gives the following:

[snfilip@josquin libiberty]$ sh cmd.sh 
[snfilip@josquin libiberty]$ ./conftest 
Failing index 97  a 
Reason: islower 2  ISLOWER 0  toupper A TOUPPER a

So the ISLOWER macro is (apparently) giving the wrong result. 

---------------------------------------
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c)                (('a' <= (c) && (c) <= 'i')               ||
('j' <= (c) && (c) <= 'r')                   || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i)) {
      fprintf(stderr,"Failing index %d  %c \n",i,i);
      fprintf(stderr,"Reason: islower %d  ISLOWER %d  toupper %c TOUPPER %c
\n",
              islower(i),  ISLOWER (i),
              toupper (i) , TOUPPER (i));
      return 2;
    }
  return 0;
}


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (5 preceding siblings ...)
  2010-09-02 17:16 ` rwild at gcc dot gnu dot org
@ 2010-09-02 17:32 ` salvatore dot filippone at uniroma2 dot it
  2010-09-07  7:20 ` sfilippone at uniroma2 dot it
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: salvatore dot filippone at uniroma2 dot it @ 2010-09-02 17:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from salvatore dot filippone at uniroma2 dot it  2010-09-02 17:31 -------
Subject: Re:  Bootstrap fails on PPC error:
 conflicting types for 'malloc'

Il giorno gio, 02/09/2010 alle 17.15 +0000, rwild at gcc dot gnu dot org
ha scritto:
> 
> ------- Comment #6 from rwild at gcc dot gnu dot org  2010-09-02 17:15 -------
> Please do the following:
> 
> m
Indeed. 
[snfilip@josquin libiberty]$ ./conftest; echo $?
2

> 
> ./conftest; echo $?
> 
> According to the log in comment #4 this outputs 2 in your setup.  It should
> output 0.  Can you find out why?  You might want to replace '-o conftest' with
> -E to see preprocessed output, maybe some bogus header somewhere.
> 
Output attached. I have no more time to look at it now, will get back
tomorrow morning (my time) 
Thanks 

> Thanks.
> 
> 


------- Comment #8 from salvatore dot filippone at uniroma2 dot it  2010-09-02 17:31 -------
Created an attachment (id=21673)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21673&action=view)


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (4 preceding siblings ...)
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
@ 2010-09-02 17:16 ` rwild at gcc dot gnu dot org
  2010-09-02 17:32 ` salvatore dot filippone at uniroma2 dot it
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: rwild at gcc dot gnu dot org @ 2010-09-02 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rwild at gcc dot gnu dot org  2010-09-02 17:15 -------
Please do the following:

make stage2-start
cd libiberty

cat >conftest.c <<\EOF
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define _FILE_OFFSET_BITS 64
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c)                (('a' <= (c) && (c) <= 'i')               ||
('j' <= (c) && (c) <= 'r')                   || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      return 2;
  return 0;
}
EOF

/home/snfilip/GNUBUILD/obj-4.6.0/./prev-gcc/xgcc
-B/home/snfilip/GNUBUILD/obj-4.6.0/./prev-gcc/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/bin/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/bin/
-B/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/lib/ -isystem
/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/include -isystem
/home/snfilip/GNUBUILD/gnu460/powerpc64-unknown-linux-gnu/sys-include    -o
conftest -g -O2 -gtoggle    conftest.c

./conftest; echo $?

According to the log in comment #4 this outputs 2 in your setup.  It should
output 0.  Can you find out why?  You might want to replace '-o conftest' with
-E to see preprocessed output, maybe some bogus header somewhere.

Thanks.


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (3 preceding siblings ...)
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
@ 2010-09-01 13:45 ` sfilippone at uniroma2 dot it
  2010-09-02 17:16 ` rwild at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-01 13:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sfilippone at uniroma2 dot it  2010-09-01 13:45 -------
Created an attachment (id=21646)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21646&action=view)
stage 2 libiberty/config.h


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
  2010-09-01 13:44 ` [Bug bootstrap/45482] " sfilippone at uniroma2 dot it
  2010-09-01 13:44 ` sfilippone at uniroma2 dot it
@ 2010-09-01 13:45 ` sfilippone at uniroma2 dot it
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-01 13:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from sfilippone at uniroma2 dot it  2010-09-01 13:44 -------
Created an attachment (id=21644)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21644&action=view)
stage 1 libiberty/config.h


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
                   ` (2 preceding siblings ...)
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
@ 2010-09-01 13:45 ` sfilippone at uniroma2 dot it
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-01 13:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sfilippone at uniroma2 dot it  2010-09-01 13:45 -------
Created an attachment (id=21645)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21645&action=view)
stage 2 libiberty/config.log


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
@ 2010-09-01 13:44 ` sfilippone at uniroma2 dot it
  2010-09-01 13:44 ` sfilippone at uniroma2 dot it
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-01 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sfilippone at uniroma2 dot it  2010-09-01 13:44 -------
Created an attachment (id=21642)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21642&action=view)
Main config.log


-- 


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


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

* [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'
  2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
  2010-09-01 13:44 ` [Bug bootstrap/45482] " sfilippone at uniroma2 dot it
@ 2010-09-01 13:44 ` sfilippone at uniroma2 dot it
  2010-09-01 13:45 ` sfilippone at uniroma2 dot it
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2010-09-01 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sfilippone at uniroma2 dot it  2010-09-01 13:44 -------
Created an attachment (id=21643)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21643&action=view)
stage 1 libiberty/config.log


-- 


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


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

end of thread, other threads:[~2011-12-09  9:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45482-4@http.gcc.gnu.org/bugzilla/>
2011-12-08 19:50 ` [Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc' gseanmcg at gmail dot com
2011-12-09  9:05 ` rguenth at gcc dot gnu.org
2010-09-01 13:43 [Bug bootstrap/45482] New: " sfilippone at uniroma2 dot it
2010-09-01 13:44 ` [Bug bootstrap/45482] " sfilippone at uniroma2 dot it
2010-09-01 13:44 ` sfilippone at uniroma2 dot it
2010-09-01 13:45 ` sfilippone at uniroma2 dot it
2010-09-01 13:45 ` sfilippone at uniroma2 dot it
2010-09-01 13:45 ` sfilippone at uniroma2 dot it
2010-09-02 17:16 ` rwild at gcc dot gnu dot org
2010-09-02 17:32 ` salvatore dot filippone at uniroma2 dot it
2010-09-07  7:20 ` sfilippone at uniroma2 dot it
2010-09-08 15:35 ` sfilippone at uniroma2 dot it
2010-09-08 16:00 ` mikpe at it dot uu dot se
2010-09-08 16:11 ` sfilippone at uniroma2 dot it

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