public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* build GCC 12.1 failure on namespace from /usr/include/stdlib.h
@ 2022-05-12 12:04 Guy Moebs
  2022-05-19 15:06 ` [SOLVED] " Guy Moebs
  0 siblings, 1 reply; 3+ messages in thread
From: Guy Moebs @ 2022-05-12 12:04 UTC (permalink / raw)
  To: gcc-help

Hello,

I compile and install most of previous gcc versions on our linux cluster 
(running centOS 7.9) these last years.

When building versions 11.3.0 and 12.1.0 I encounter an error and 
searching on the internet does not provide any answer. Here follows what 
I did for version 12.1.0

So, I get and expand the gcc 12.1.0 tarball, then :

$ cd gcc-12.1.0
./contrib/download_prerequisites
$ module load gcc/10.3.0
$ export CC=/trinity/shared/apps/cv-standard/gcc/10.3.0/bin/gcc
$ export CXX=/trinity/shared/apps/cv-standard/gcc/10.3.0/bin/g++
$ mkdir ../gcc-12.1.0_build
$ cd ../gcc-12.1.0_build
$ ../gcc-12.1.0/configure --disable-multilib --enable-threads=posix 
--enable-languages=c,c++,fortran,go > ./GM_configure_01.log 2>&1


Everything seems to be fine in the configure step. Next, I launch the build.

$ make > GM_build.log 2>&1



What I get at the end of the file GM_build_01.log is

...

/trinity/shared/apps/cv-standard/gcc/10.3.0/bin/gcc -DHAVE_CONFIG_H   
-I. -I../../gcc-12.1.0/isl -I../../gcc-12.1.0/isl/include -Iinclude/ 
-I/scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/gmp/../../gcc-12.1.0/gmp 
-I/scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/./gmp   -g -MT 
schedule_cmp.o -MD -MP -MF $depbase.Tpo -c -o schedule_cmp.o 
../../gcc-12.1.0/isl/schedule_cmp.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool  --tag=CC   --mode=link 
/trinity/shared/apps/cv-standard/gcc/10.3.0/bin/gcc  -g 
-static-libstdc++ -static-libgcc  -o isl_schedule_cmp schedule_cmp.o 
libisl.la /scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/./gmp/libgmp.la
libtool: link: /trinity/shared/apps/cv-standard/gcc/10.3.0/bin/gcc -g 
-static-libstdc++ -static-libgcc -o isl_schedule_cmp schedule_cmp.o  
./.libs/libisl.a 
/scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/./gmp/.libs/libgmp.a
/trinity/shared/apps/cv-standard/gcc/10.3.0/bin/g++ -std=c++11 
-DHAVE_CONFIG_H   -I. -I../../gcc-12.1.0/isl 
-I../../gcc-12.1.0/isl/include -Iinclude/ 
-I/scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/gmp/../../gcc-12.1.0/gmp 
-I/scratch/CCIPL/moebs-g/SOFT/GNU/gcc-12.1.0_build/./gmp 
-UCOMPILE_ERROR   -g -MT isl_test_cpp-isl_test_cpp.o -MD -MP -MF 
.deps/isl_test_cpp-isl_test_cpp.Tpo -c -o isl_test_cpp-isl_test_cpp.o 
`test -f 'isl_test_cpp.cc' || echo '../../gcc-12.1.0/isl/'`isl_test_cpp.cc
In include file 
from/scratch/trinity/shared/apps/cv-standard/gcc/10.3.0/include/c++/10.3.0/cstdlib:75,
                  from 
/scratch/trinity/shared/apps/cv-standard/gcc/10.3.0/include/c++/10.3.0/ext/string_conversions.h:41,
                  frpm 
/scratch/trinity/shared/apps/cv-standard/gcc/10.3.0/include/c++/10.3.0/bits/basic_string.h:6545,
                  from 
/scratch/trinity/shared/apps/cv-standard/gcc/10.3.0/include/c++/10.3.0/string:55,
                  from ../../gcc-12.1.0/isl/isl_test_cpp.cc:9:
/usr/include/stdlib.h:95:1: error: « __BEGIN_NAMESPACE_STD » does not 
name a type
    95 | __BEGIN_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:101:5: error: « div_t » does not name a type
   101 |   } div_t;
       |     ^~~~~
/usr/include/stdlib.h:112:1: error: « __END_NAMESPACE_STD » does not 
name a type
   112 | __END_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:121:5: error: « lldiv_t » does not name a type;
   121 |   } lldiv_t;
       |     ^~~~~~~
       |     ldiv_t
/usr/include/stdlib.h:123:1: error: « __END_NAMESPACE_C99 » does not 
name a type
   123 | __END_NAMESPACE_C99
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:142:1: error: « __BEGIN_NAMESPACE_STD » does not 
name a type
   142 | __BEGIN_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:152:1: error: « __END_NAMESPACE_STD » does not 
name a type
   152 | __END_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:159:1: error: « __END_NAMESPACE_C99 » does not 
name a type
   159 | __END_NAMESPACE_C99
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:167:1: error: « __END_NAMESPACE_STD » does not 
name a type
   167 | __END_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:178:1: error: « __END_NAMESPACE_C99 » does not 
name a type
   178 | __END_NAMESPACE_C99
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:190:1: error: « __END_NAMESPACE_STD » does not 
name a type
   190 | __END_NAMESPACE_STD
       | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:217:1: error: « __END_NAMESPACE_C99 » does not 
name a type
   217 | __END_NAMESPACE_C99
       | ^~~~~~~~~~~~~~~~~~~



and in the stdlib.h file I have :

$ head /usr/include/stdlib.h
/* Copyright (C) 1991-2007, 2009-2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.

...


/*
  *    ISO C99 Standard: 7.20 General utilities    <stdlib.h>
  */


I've never seen this before with previous versions of gcc.

Thank you for your help.

Regards,

    Guy.




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

end of thread, other threads:[~2022-05-26 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 12:04 build GCC 12.1 failure on namespace from /usr/include/stdlib.h Guy Moebs
2022-05-19 15:06 ` [SOLVED] " Guy Moebs
2022-05-26 16:54   ` Jonathan Wakely

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