public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/104566] New: Internal compiler error while building from source
@ 2022-02-16 13:11 xanderlenstra at gmail dot com
  2022-02-16 23:25 ` [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04 pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: xanderlenstra at gmail dot com @ 2022-02-16 13:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104566

            Bug ID: 104566
           Summary: Internal compiler error while building from source
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xanderlenstra at gmail dot com
  Target Milestone: ---

Created attachment 52453
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52453&action=edit
Full terminal output as far as I can scroll back

I was trying to get a compiler with support for c++20, but I'm working on a
university computer so I have no sudo rights. Easiest solution seemed to build
g++10 or newer from source, so I did exactly that, following the tutorial on
https://gcc.gnu.org/install/
I've downloaded it from this mirror:
http://mirror.koddos.net/gcc/releases/gcc-11.2.0/ which is marked as an
official mirror on this page: https://gcc.gnu.org/mirrors.html
Due to space concerns, I only installed the c++ component
('--enable-languages=c++') and did the lean bootstrap ('make bootstrap-lean'),
otherwise I have not deviated from the default commands recommended to be run.
I did have to restart the bootstrap once, as the variable `CPLUS_INCLUDE_PATH`
was already set to a different value, resulting in the crash described in
#61427. I `unset` the variable, and ran the same command again. This time, the
terminal showed the following error:
```
cc1: internal compiler error: in fail_formatted, at selftest.c:63
0x24d14f5 selftest::fail_formatted(selftest::location const&, char const*, ...)
        ../../gcc-11.2.0/gcc/selftest.c:63
0x24d15e4 selftest::assert_streq(selftest::location const&, char const*, char
const*, char const*, char const*)
        ../../gcc-11.2.0/gcc/selftest.c:92
0x24e86d3 test_add_location_if_nearby
        ../../gcc-11.2.0/gcc/diagnostic-show-locus.c:4124
0x2514db1 selftest::for_each_line_table_case(void (*)(selftest::line_table_case
const&))
        ../../gcc-11.2.0/gcc/input.c:3573
0x24ef897 selftest::diagnostic_show_locus_c_tests()
        ../../gcc-11.2.0/gcc/diagnostic-show-locus.c:5266
0x23fb40c selftest::run_tests()
        ../../gcc-11.2.0/gcc/selftest-run-tests.c:98
0x12e8ad5 toplev::run_self_tests()
        ../../gcc-11.2.0/gcc/toplev.c:2265
```

To reiterate, the exact command I ran was `make bootstrap-lean`, while inside
the objdir

The entire output as far as my terminal still shows it, is included as an
attachment. My $HOME on this pc is `/vol/s1935534`.

Running `gcc -v` gave the following output:

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
```

I have googled for this error, but the only other bug even mentioning the
`fail_formatted` function is #81101, which appears unrelated to building gcc
from source.

If any additional information is required,

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

* [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04
  2022-02-16 13:11 [Bug driver/104566] New: Internal compiler error while building from source xanderlenstra at gmail dot com
@ 2022-02-16 23:25 ` pinskia at gcc dot gnu.org
  2022-02-17 13:08 ` xanderlenstra at gmail dot com
  2022-02-18  1:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-16 23:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104566

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Internal compiler error in  |Internal compiler error in
                   |fail_formatted while        |fail_formatted while
                   |building gcc from source    |building gcc from source
                   |                            |while building GCC 11.2.0
                   |                            |with ubuntu's
                   |                            |7.5.0-3ubuntu1~18.04
            Version|11.2.0                      |7.5.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm,
Makefile:4779: recipe for target 'all-stage1-gcc' failed


Since this is stage 1 that is failing, the bug is related to the pre-installed
compiler and not really GCC 11 issue.

Also can you provide the output of "env"? Maybe there is a locale set which is
causing this failure.

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

* [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04
  2022-02-16 13:11 [Bug driver/104566] New: Internal compiler error while building from source xanderlenstra at gmail dot com
  2022-02-16 23:25 ` [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04 pinskia at gcc dot gnu.org
@ 2022-02-17 13:08 ` xanderlenstra at gmail dot com
  2022-02-18  1:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: xanderlenstra at gmail dot com @ 2022-02-17 13:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104566

--- Comment #2 from Xander L <xanderlenstra at gmail dot com> ---
Hey,
After trying the same thing on a different workstation it did work. I'm not
sure if it was just that workstation or some temporary error. Should I close
this as 'fixed' or 'worksforme' or leave this open? I don't think I changed
that would explain this change in behaviour, I'm still on the same user account
& same everything, just different hardware.

Anyway, the output of `env` is the following:

```
CLUTTER_IM_MODULE=xim
CONDA_SHLVL=1
NVM_DIR=/vol/home/s1935534/.nvm
LD_LIBRARY_PATH=:/vol/home/s1935534/usr/lib
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
CONDA_EXE=/vol/home/s1935534/anaconda3/bin/conda
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_MENU_PREFIX=gnome-
LANG=en_US.UTF-8
DISPLAY=:0
GNOME_SHELL_SESSION_MODE=ubuntu
C_INCLUDE_PATH=:/vol/home/s1935534/usr/include
EDITOR=nano
COLORTERM=truecolor
NVM_CD_FLAGS=
USERNAME=s1935534
CONDA_PREFIX=/vol/home/s1935534/anaconda3
XDG_VTNR=2
SSH_AUTH_SOCK=/run/user/1224490/keyring/ssh
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
S_COLORS=auto
_CE_M=
XDG_SESSION_ID=1036
USER=s1935534
DESKTOP_SESSION=ubuntu
QT4_IM_MODULE=xim
TEXTDOMAINDIR=/usr/share/locale/
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/907d52d2_ba31_4cee_a5f7_4e96391158fd
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
PWD=/vol/home/s1935534
HOME=/vol/home/s1935534
CONDA_PYTHON_EXE=/vol/home/s1935534/anaconda3/bin/python
TEXTDOMAIN=im-config
SSH_AGENT_PID=1182
QT_ACCESSIBILITY=1
XDG_SESSION_TYPE=x11
KRB5CCNAME=FILE:/tmp/krb5cc_1224490
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
_CE_CONDA=
XDG_SESSION_DESKTOP=ubuntu
GJS_DEBUG_OUTPUT=stderr
CONDA_PROMPT_MODIFIER=(base) 
GTK_MODULES=gail:atk-bridge
WINDOWPATH=2
TERM=xterm-256color
SHELL=/bin/bash
VTE_VERSION=5202
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
IM_CONFIG_PHASE=2
NVM_BIN=/vol/home/s1935534/.nvm/versions/node/v14.11.0/bin
XDG_CURRENT_DESKTOP=ubuntu:GNOME
GPG_AGENT_INFO=/run/user/1224490/gnupg/S.gpg-agent:0:1
GNOME_TERMINAL_SERVICE=:1.81
XDG_SEAT=seat0
SHLVL=1
LANGUAGE=en_US:
GDMSESSION=ubuntu
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=s1935534
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1224490/bus
XDG_RUNTIME_DIR=/run/user/1224490
XAUTHORITY=/run/user/1224490/gdm/Xauthority
CPLUS_INCLUDE_PATH=:/vol/home/s1935534/usr/include
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
PATH=/vol/home/s1935534/.nvm/versions/node/v14.11.0/bin:/vol/home/s1935534/anaconda3/bin:/vol/home/s1935534/anaconda3/condabin:/vol/share/software/Xilinx/14.7/ISE_DS:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/vol/home/s1935534/usr/bin:/vol/home/s1935534/Documents/Programms/kotlin-native-linux-x86_64-1.5.30
CONDA_DEFAULT_ENV=base
NVM_INC=/vol/home/s1935534/.nvm/versions/node/v14.11.0/include/node
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
SESSION_MANAGER=local/u0030322.vuw.leidenuniv.nl:@/tmp/.ICE-unix/1091,unix/u0030322.vuw.leidenuniv.nl:/tmp/.ICE-unix/1091
LESSOPEN=| /usr/bin/lesspipe %s
GTK_IM_MODULE=ibus
LC_TIME=en_GB.utf8
_=/usr/bin/env
```

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

* [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04
  2022-02-16 13:11 [Bug driver/104566] New: Internal compiler error while building from source xanderlenstra at gmail dot com
  2022-02-16 23:25 ` [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04 pinskia at gcc dot gnu.org
  2022-02-17 13:08 ` xanderlenstra at gmail dot com
@ 2022-02-18  1:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-18  1:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104566

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Closing as works for me as you said it worked on another machine just fine.

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

end of thread, other threads:[~2022-02-18  1:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 13:11 [Bug driver/104566] New: Internal compiler error while building from source xanderlenstra at gmail dot com
2022-02-16 23:25 ` [Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04 pinskia at gcc dot gnu.org
2022-02-17 13:08 ` xanderlenstra at gmail dot com
2022-02-18  1:07 ` pinskia at gcc dot gnu.org

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