From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-tls.univ-nantes.fr (smtptls1-lmb.cpub.univ-nantes.fr [193.52.103.110]) by sourceware.org (Postfix) with ESMTPS id 9C9D93836428 for ; Thu, 19 May 2022 15:06:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C9D93836428 Received: from localhost (localhost [127.0.0.1]) by smtp-tls.univ-nantes.fr (Postfix) with ESMTP id 05F8926FDB for ; Thu, 19 May 2022 17:06:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smtptls1-lmb.cpub.univ-nantes.fr Received: from smtp-tls.univ-nantes.fr ([127.0.0.1]) by localhost (smtptls1-lmb.cpub.univ-nantes.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vVwFZ34ImSfN for ; Thu, 19 May 2022 17:06:10 +0200 (CEST) Received: from [127.0.0.1] (unknown [172.16.13.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-tls.univ-nantes.fr (Postfix) with ESMTPSA id CC3D626FD5 for ; Thu, 19 May 2022 17:06:10 +0200 (CEST) Message-ID: Date: Thu, 19 May 2022 17:06:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: [SOLVED] Re: build GCC 12.1 failure on namespace from /usr/include/stdlib.h Content-Language: fr To: gcc-help@gcc.gnu.org References: From: Guy Moebs In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2022 15:06:15 -0000 Hello, I have solved my problem and managed to compile gcc 11.3.0 and 12.1.0 completely. In the output of the configure command I read : configure: WARNING: using in-tree isl, disabling version check So I add it to my configure command which is now ../gcc-12.1.0/configure --prefix= --disable-multilib --enable-threads=posix --enable-languages=c,c++,fortran,go --disable-isl-version-check and everything works fine. Regards,    Guy. Le 12/05/2022 à 14:04, Guy Moebs via Gcc-help a écrit : > 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    >  */ > > > I've never seen this before with previous versions of gcc. > > Thank you for your help. > > Regards, > >    Guy. > > > -- Ingénieur de Recherche CNRS Laboratoire de Planétologie et Géosciences UMR 6112, bât. 4, bur. 106 CNRS - Nantes Université - Université Angers - Université Le Mans guy.moebs@univ-nantes.fr --- 02 51 12 59 40