public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Issues compiling gcc 12.3.0
@ 2024-01-25 10:19 Damas Joao CHST
  2024-01-25 10:24 ` Jonathan Wakely
  2024-01-25 10:25 ` Jonathan Wakely
  0 siblings, 2 replies; 6+ messages in thread
From: Damas Joao CHST @ 2024-01-25 10:19 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 11786 bytes --]

Hi,

I am following a recipe I already had working for gcc 12.1.0 and trying to install 12.3.0 from source, and I am facing the following:

libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_facets.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/locale_facets.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_facets.o
libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_init.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/locale_init.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_init.o
../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications
   51 |   _M_get(size_t __sz) throw(std::bad_alloc)
      |                       ^~~~~
libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=localename.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/localename.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o localename.o
libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_float.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_float.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_float.o
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include   -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++   -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=math_stubs_long_double.lo  -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE  -c -o math_stubs_long_double.lo ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc
make[6]: *** [bitmap_allocator.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_long_double.o
../../../../../libstdc++-v3/src/c++98/ios_locale.cc:59:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<char>::operator void*() const’ does not match any template declaration
   59 |   template basic_ios<char>::operator void*() const;
      |            ^~~~~~~~~~~~~~~
In file included from /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:44,
                 from ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:29:
/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]’
  117 |       explicit operator bool() const
      |                ^~~~~~~~
../../../../../libstdc++-v3/src/c++98/ios_locale.cc:61:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<wchar_t>::operator void*() const’ does not match any template declaration
   61 |   template basic_ios<wchar_t>::operator void*() const;
      |            ^~~~~~~~~~~~~~~~~~
/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]’
  117 |       explicit operator bool() const
      |                ^~~~~~~~
make[6]: *** [ios_locale.lo] Error 1
make[6]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
make: *** [all] Error 2

I'm using CentOS 7.9 (old OS, I am aware) and the following setup:

configure \
      --prefix=<prefix-dir> \
      --disable-multilib

Has anyone faced anything similar or has any clues on how to fix it?

Thanks,
João

This message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited.

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

* Re: Issues compiling gcc 12.3.0
  2024-01-25 10:19 Issues compiling gcc 12.3.0 Damas Joao CHST
@ 2024-01-25 10:24 ` Jonathan Wakely
  2024-01-25 10:25 ` Jonathan Wakely
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-01-25 10:24 UTC (permalink / raw)
  To: Damas Joao CHST; +Cc: gcc-help

On Thu, 25 Jan 2024 at 10:21, Damas Joao CHST via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi,
>
> I am following a recipe I already had working for gcc 12.1.0 and trying to install 12.3.0 from source, and I am facing the following:

Your recipe is wrong.


> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_facets.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/locale_facets.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_facets.o
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_init.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/locale_init.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_init.o
> ../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications
>    51 |   _M_get(size_t __sz) throw(std::bad_alloc)
>       |                       ^~~~~

This file needs to be compiled with -std=gnu++98, so why are you using
-std=c++17 here?


> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=localename.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/localename.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o localename.o
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_float.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_float.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_float.o
> /bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include   -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++   -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=math_stubs_long_double.lo  -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE  -c -o math_stubs_long_double.lo ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc
> make[6]: *** [bitmap_allocator.lo] Error 1
> make[6]: *** Waiting for unfinished jobs....
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_long_double.o
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:59:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<char>::operator void*() const’ does not match any template declaration
>    59 |   template basic_ios<char>::operator void*() const;
>       |            ^~~~~~~~~~~~~~~
> In file included from /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:44,
>                  from ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:29:
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]’
>   117 |       explicit operator bool() const
>       |                ^~~~~~~~
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:61:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<wchar_t>::operator void*() const’ does not match any template declaration
>    61 |   template basic_ios<wchar_t>::operator void*() const;
>       |            ^~~~~~~~~~~~~~~~~~
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]’
>   117 |       explicit operator bool() const
>       |                ^~~~~~~~
> make[6]: *** [ios_locale.lo] Error 1
> make[6]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
> make[2]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make: *** [all] Error 2
>
> I'm using CentOS 7.9 (old OS, I am aware) and the following setup:
>
> configure \
>       --prefix=<prefix-dir> \
>       --disable-multilib
>
> Has anyone faced anything similar or has any clues on how to fix it?

Stop injecting -std=c++17 into the build flags.

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

* Re: Issues compiling gcc 12.3.0
  2024-01-25 10:19 Issues compiling gcc 12.3.0 Damas Joao CHST
  2024-01-25 10:24 ` Jonathan Wakely
@ 2024-01-25 10:25 ` Jonathan Wakely
  2024-01-25 13:42   ` Damas Joao CHST
  1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-01-25 10:25 UTC (permalink / raw)
  To: Damas Joao CHST; +Cc: gcc-help

On Thu, 25 Jan 2024 at 10:21, Damas Joao CHST via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi,
>
> I am following a recipe I already had working for gcc 12.1.0 and trying to install 12.3.0 from source, and I am facing the following:
>
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_facets.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/locale_facets.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_facets.o
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_init.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/locale_init.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_init.o
> ../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications
>    51 |   _M_get(size_t __sz) throw(std::bad_alloc)
>       |                       ^~~~~
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=localename.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/localename.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o localename.o
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_float.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_float.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_float.o
> /bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include   -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++   -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=math_stubs_long_double.lo  -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE  -c -o math_stubs_long_double.lo ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc
> make[6]: *** [bitmap_allocator.lo] Error 1
> make[6]: *** Waiting for unfinished jobs....
> libtool: compile:  /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_long_double.o
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:59:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<char>::operator void*() const’ does not match any template declaration
>    59 |   template basic_ios<char>::operator void*() const;
>       |            ^~~~~~~~~~~~~~~
> In file included from /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:44,
>                  from ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:29:
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]’
>   117 |       explicit operator bool() const
>       |                ^~~~~~~~
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:61:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<wchar_t>::operator void*() const’ does not match any template declaration
>    61 |   template basic_ios<wchar_t>::operator void*() const;
>       |            ^~~~~~~~~~~~~~~~~~
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]’
>   117 |       explicit operator bool() const
>       |                ^~~~~~~~
> make[6]: *** [ios_locale.lo] Error 1
> make[6]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
> make[2]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make: *** [all] Error 2
>
> I'm using CentOS 7.9 (old OS, I am aware) and the following setup:
>
> configure \
>       --prefix=<prefix-dir> \
>       --disable-multilib

Also, if you're running configure in the source tree, please stop doing that.

https://gcc.gnu.org/wiki/InstallingGCC has details and links explaining it.

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

* Re: Issues compiling gcc 12.3.0
  2024-01-25 10:25 ` Jonathan Wakely
@ 2024-01-25 13:42   ` Damas Joao CHST
  2024-01-25 13:53     ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Damas Joao CHST @ 2024-01-25 13:42 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 12678 bytes --]

Hi Johathan,

Thank you very much for your kind answer.

When building, I am doing it in a new directory, and calling configure and make from it, as recommended in the documentation.

The only flags I'm passing during configure is prefix and disable-multilib. The rest I am keeping as default. For make, I am passing no flags except -j.

João
________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Thursday, January 25, 2024 11:25
To: Damas Joao CHST <Joao.Damas@syngenta.com>
Cc: gcc-help@gcc.gnu.org <gcc-help@gcc.gnu.org>
Subject: Re: Issues compiling gcc 12.3.0

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Thu, 25 Jan 2024 at 10:21, Damas Joao CHST via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi,
>
> I am following a recipe I already had working for gcc 12.1.0 and trying to install 12.3.0 from source, and I am facing the following:
>
> libtool: compile: /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_facets.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/locale_facets.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_facets.o
> libtool: compile: /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=locale_init.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/locale_init.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o locale_init.o
> ../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications
> 51 | _M_get(size_t __sz) throw(std::bad_alloc)
> | ^~~~~
> libtool: compile: /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=localename.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -std=gnu++11 -fchar8_t -c ../../../../../libstdc++-v3/src/c++98/localename.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o localename.o
> libtool: compile: /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_float.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_float.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_float.o
> /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=compile /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c -o math_stubs_long_double.lo ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc
> make[6]: *** [bitmap_allocator.lo] Error 1
> make[6]: *** Waiting for unfinished jobs....
> libtool: compile: /tmp/tmp-gcc-12.3.0/source/build/./gcc/xgcc -shared-libgcc -B/tmp/tmp-gcc-12.3.0/source/build/./gcc -nostdinc++ -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/bin/ -B/progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/lib/ -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/include -isystem /progs/all/opensource/gcc/12.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/../libgcc -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/tmp/tmp-gcc-12.3.0/source/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=math_stubs_long_double.lo -g -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++98/math_stubs_long_double.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o math_stubs_long_double.o
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:59:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<char>::operator void*() const’ does not match any template declaration
> 59 | template basic_ios<char>::operator void*() const;
> | ^~~~~~~~~~~~~~~
> In file included from /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:44,
> from ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:29:
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]’
> 117 | explicit operator bool() const
> | ^~~~~~~~
> ../../../../../libstdc++-v3/src/c++98/ios_locale.cc:61:12: error: template-id ‘operator bool<>’ for ‘std::basic_ios<wchar_t>::operator void*() const’ does not match any template declaration
> 61 | template basic_ios<wchar_t>::operator void*() const;
> | ^~~~~~~~~~~~~~~~~~
> /tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_ios.h:117:16: note: candidate is: ‘std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]’
> 117 | explicit operator bool() const
> | ^~~~~~~~
> make[6]: *** [ios_locale.lo] Error 1
> make[6]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3/src'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build/x86_64-pc-linux-gnu/libstdc++-v3'
> make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
> make[2]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/tmp/tmp-gcc-12.3.0/source/build'
> make: *** [all] Error 2
>
> I'm using CentOS 7.9 (old OS, I am aware) and the following setup:
>
> configure \
> --prefix=<prefix-dir> \
> --disable-multilib

Also, if you're running configure in the source tree, please stop doing that.

https://gcc.gnu.org/wiki/InstallingGCC<https://gcc.gnu.org/wiki/InstallingGCC> has details and links explaining it.

This message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited.

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

* Re: Issues compiling gcc 12.3.0
  2024-01-25 13:42   ` Damas Joao CHST
@ 2024-01-25 13:53     ` Jonathan Wakely
  2024-01-25 15:09       ` Damas Joao CHST
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-01-25 13:53 UTC (permalink / raw)
  To: Damas Joao CHST; +Cc: gcc-help

On Thu, 25 Jan 2024 at 13:42, Damas Joao CHST <Joao.Damas@syngenta.com> wrote:
>
>
>
> Hi Johathan,
>
> Thank you very much for your kind answer.
>
> When building, I am doing it in a new directory, and calling configure and make from it, as recommended in the documentation.
>
> The only flags I'm passing during configure is prefix and disable-multilib. The rest I am keeping as default. For make, I am passing no flags except -j.

That -std=c++17 has to be coming from somewhere though.

Try 'env grep std=c' to see if you're setting it via the environment.

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

* Re: Issues compiling gcc 12.3.0
  2024-01-25 13:53     ` Jonathan Wakely
@ 2024-01-25 15:09       ` Damas Joao CHST
  0 siblings, 0 replies; 6+ messages in thread
From: Damas Joao CHST @ 2024-01-25 15:09 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

Yes, you are correct, it is a tainted environment with some CXXFLAGS that I need to figure out where they are coming from.

Thanks for the help!
João
________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Thursday, January 25, 2024 14:53
To: Damas Joao CHST <Joao.Damas@syngenta.com>
Cc: gcc-help@gcc.gnu.org <gcc-help@gcc.gnu.org>
Subject: Re: Issues compiling gcc 12.3.0

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Thu, 25 Jan 2024 at 13:42, Damas Joao CHST <Joao.Damas@syngenta.com> wrote:
>
>
>
> Hi Johathan,
>
> Thank you very much for your kind answer.
>
> When building, I am doing it in a new directory, and calling configure and make from it, as recommended in the documentation.
>
> The only flags I'm passing during configure is prefix and disable-multilib. The rest I am keeping as default. For make, I am passing no flags except -j.

That -std=c++17 has to be coming from somewhere though.

Try 'env grep std=c' to see if you're setting it via the environment.

This message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited.

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

end of thread, other threads:[~2024-01-25 15:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 10:19 Issues compiling gcc 12.3.0 Damas Joao CHST
2024-01-25 10:24 ` Jonathan Wakely
2024-01-25 10:25 ` Jonathan Wakely
2024-01-25 13:42   ` Damas Joao CHST
2024-01-25 13:53     ` Jonathan Wakely
2024-01-25 15:09       ` Damas Joao CHST

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