[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2011-12-09 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45482

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #14 from Richard Guenther  2011-12-09 
09:04:17 UTC ---
Fixed.


[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2011-12-08 Thread gseanmcg at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45482

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


[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-08 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-08 Thread mikpe at it dot uu dot se


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-08 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-07 Thread sfilippone at uniroma2 dot it


--- 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:

[snfi...@josquin libiberty]$ sh cmd.sh 
[snfi...@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 
#include 
#include 
#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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-02 Thread salvatore dot filippone at uniroma2 dot it


--- 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 +, 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. 
[snfi...@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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-02 Thread rwild at gcc dot gnu dot org


--- 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 
#include 
#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 -gtoggleconftest.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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-01 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-01 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-01 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-01 Thread sfilippone at uniroma2 dot it


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



[Bug bootstrap/45482] Bootstrap fails on PPC error: conflicting types for 'malloc'

2010-09-01 Thread sfilippone at uniroma2 dot it


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