Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc seems to crash when trying to compile qtgui on riscv
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Slashhhh
n00b
n00b


Joined: 07 Nov 2023
Posts: 25

PostPosted: Fri Apr 19, 2024 12:46 pm    Post subject: gcc seems to crash when trying to compile qtgui on riscv Reply with quote

I'm on a risc v board, and gcc seems to crash with `unrecognizable insn` when I try to compile qtgui

Build log: https://gist.github.com/XerneraC/1d5cbb3c9a444e89e4bfcac44508755f

note:
Code:

riscv64-unknown-linux-gnu-g++ -c -mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series --param l1-cache-size=32 --param l2-cache-size=2048 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DMD4C_USE_UTF8 -DENABLE_PIXMAN_DRAWHELPERS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/gui -I. -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/3rdparty/md4c -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/3rdparty/VulkanMemoryAllocator -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/include -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/include/QtGui -I../../include -I../../include/QtGui -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/include/QtGui/5.15.13 -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/include/QtGui/5.15.13/QtGui -I../../include/QtGui/5.15.13 -I../../include/QtGui/5.15.13/QtGui -I.tracegen -I/usr/include/qt5/QtCore/5.15.13 -I/usr/include/qt5/QtCore/5.15.13/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I.moc -I/usr/include/libpng16 -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/mkspecs/linux-g++ -o .obj/qshaderformat.o /var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/gui/util/qshaderformat.cpp
/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/gui/util/qgridlayoutengine.cpp: In member function ‘void QGridLayoutRowData::calculateGeometries(int, int, qreal, qreal*, qreal*, qreal*, const QGridLayoutBox&, const QGridLayoutRowInfo&, bool)’:
/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/gui/util/qgridlayoutengine.cpp:447:1: error: unrecognizable insn:
  447 | }
      | ^
(insn 681 680 682 97 (set (reg:DI 793)
        (if_then_else:DI (gt:DF (reg/v:DF 537 [ targetSize ])
                (reg:DF 146 [ _16 ]))
            (reg:DI 794)
            (reg:DI 795))) -1
     (nil))
during RTL pass: vregs
/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/src/gui/util/qgridlayoutengine.cpp:447:1: internal compiler error: in extract_insn, at recog.cc:2791
0x11c820d internal_error(char const*, ...)
   ???:0
0x2bffbb fancy_abort(char const*, int, char const*)
   ???:0
0x2be56d _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
   ???:0
0x2be58f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   ???:0
0x845e3b extract_insn(rtx_insn*)
   ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.


A bit higher up I also noticed a bunch of other things that could be errors, similar to this:
Code:

Checking for Support for Intel Control-flow Enforcement Technology...
+ cd /var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13_build/config.tests/intelcet && /var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13_build/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" QMAKE_AR=riscv64-unknown-linux-gnu-ar QMAKE_CC=riscv64-unknown-linux-gnu-gcc QMAKE_LINK_C=riscv64-unknown-linux-gnu-gcc QMAKE_LINK_C_SHLIB=riscv64-unknown-linux-gnu-gcc QMAKE_CXX=riscv64-unknown-linux-gnu-g++ QMAKE_LINK=riscv64-unknown-linux-gnu-g++ QMAKE_LINK_SHLIB=riscv64-unknown-linux-gnu-g++ QMAKE_OBJCOPY=riscv64-unknown-linux-gnu-objcopy QMAKE_RANLIB= QMAKE_STRIP=riscv64-unknown-linux-gnu-strip 'QMAKE_CFLAGS=-mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series --param l1-cache-size=32 --param l2-cache-size=2048 -O2' QMAKE_CFLAGS_RELEASE= QMAKE_CFLAGS_DEBUG= 'QMAKE_CXXFLAGS=-mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series --param l1-cache-size=32 --param l2-cache-size=2048 -O2' QMAKE_CXXFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= 'QMAKE_LFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--undefined-version' QMAKE_LFLAGS_RELEASE= QMAKE_LFLAGS_DEBUG= /var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13_build/config.tests/intelcet
+ cd /var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13_build/config.tests/intelcet && MAKEFLAGS= /usr/bin/gmake
> riscv64-unknown-linux-gnu-g++ -c -mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series --param l1-cache-size=32 --param l2-cache-size=2048 -O2 -w -fPIC  -I. -I/var/tmp/portage/dev-qt/qtgui-5.15.13/work/qtbase-everywhere-src-5.15.13/mkspecs/linux-g++ -o main.o main.cpp
> main.cpp:7:8: error: #error Intel CET not available
>     7 |     #  error Intel CET not available
>       |        ^~~~~
> gmake: *** [Makefile:184: main.o] Error 1
test config.qtbase.tests.intelcet FAILED

But as the compile went on afterwards, I assume this is not an issue?


Last edited by Slashhhh on Wed Apr 24, 2024 2:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21662

PostPosted: Fri Apr 19, 2024 2:43 pm    Post subject: Re: gcc seems to crash when trying to compile qtgui on riscv Reply with quote

Slashhhh wrote:
Code:
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
The output states this is a reportable bug. We may be able to help you prepare a better bug report, but this will need a bug report. Can you trim down the input to produce a minimal test case for this crash?
Slashhhh wrote:
A bit higher up I also noticed a bunch of other things that could be errors, similar to this:
Code:
Checking for Support for Intel Control-flow Enforcement Technology...
> main.cpp:7:8: error: #error Intel CET not available
>     7 |     #  error Intel CET not available
>       |        ^~~~~
> gmake: *** [Makefile:184: main.o] Error 1
But as the compile went on afterwards, I assume this is not an issue?
You are using make -j4, so fatal errors may not be immediately fatal. It looks wrong to me that a test for an Intel feature was even attempted on a clearly non-Intel-compatible platform. However, I am not familiar with this package, so it might be able to recover from that.
Back to top
View user's profile Send private message
Slashhhh
n00b
n00b


Joined: 07 Nov 2023
Posts: 25

PostPosted: Wed Apr 24, 2024 2:19 pm    Post subject: Reply with quote

Upgraded from gcc13 to the experimental gcc14 and the issue is gone.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum