public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Guy Moebs <guy.moebs@univ-nantes.fr>
To: gcc-help@gcc.gnu.org
Subject: [SOLVED] Re: build GCC 12.1 failure on namespace from /usr/include/stdlib.h
Date: Thu, 19 May 2022 17:06:10 +0200	[thread overview]
Message-ID: <e2f3fec6-5dc9-d507-723e-304ad6927d24@univ-nantes.fr> (raw)
In-Reply-To: <b10a8415-d7ac-212e-8248-be425d012123@univ-nantes.fr>

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=<path_to_install_dir> 
--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    <stdlib.h>
>  */
>
>
> 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


  reply	other threads:[~2022-05-19 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 12:04 Guy Moebs
2022-05-19 15:06 ` Guy Moebs [this message]
2022-05-26 16:54   ` [SOLVED] " Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2f3fec6-5dc9-d507-723e-304ad6927d24@univ-nantes.fr \
    --to=guy.moebs@univ-nantes.fr \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).