Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot emerge world
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Thu Jun 20, 2024 11:11 pm    Post subject: [SOLVED] Cannot emerge world Reply with quote

Here is the output from emerge world. It appears to be a problem emerging qtdeclarative for Qt6.

Any hints on obtaining a clean emerge world will be gratefully received.

[SOLVED] Thanks to fedeliallalinea for pointing out the internal compiler error (ICE) failure emerging qtdeclarative is usually hardware failure. This bug report confirms that my CPU (AMD 2950X, Zen version 1) has a bug which causes that gcc error. Strangely (to me), Clang compiles this package successfully. I plan to use Clang for all ICE failures (hoping that will not be many) and gcc for everything else. Thanks to logrusx and sam_ for continual debugging help. [/SOLVED]


Last edited by cfgauss on Tue Jul 09, 2024 12:37 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31257
Location: here

PostPosted: Fri Jun 21, 2024 4:32 am    Post subject: Reply with quote

Code:
internal compiler error: Segmentation fault

Usually this error is related to a hardware issue.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sat Jun 22, 2024 6:30 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Code:
internal compiler error: Segmentation fault

Usually this error is related to a hardware issue.

I used smartctl to test my NVMEs (no hard disk), memtest86+ to test my memory, and s-tui to test my CPU and the hardware passes these tests.

How would I go about checking for software problems?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Sat Jun 22, 2024 7:50 pm    Post subject: Reply with quote

Please post the full command you're running. You should always do that. Include --verbose so we can see what's scheduled for merge. Also post your emerge --info although I already suspect you're running unstable.

Best Regards,
Georgi
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sat Jun 22, 2024 8:42 pm    Post subject: Reply with quote

logrusx wrote:
Please post the full command you're running. You should always do that. Include --verbose so we can see what's scheduled for merge. Also post your emerge --info although I already suspect you're running unstable.

Code:
emerge -uDN --verbose-conflicts --keep-going --with-bdeps=y @world 2>&1 | tee /tmp/emerge-world

Here is what's scheduled to emerge.
This dies on emerging =dev-qt/qtdeclarative-6.7.2::gentoo
Here is emerge --info =dev-qt/qtdeclarative-6.7.2::gentoo.
Here is emerge -pqv =dev-qt/qtdeclarative-6.7.2::gentoo
Here is the build log.


Last edited by cfgauss on Sun Jun 23, 2024 1:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sat Jun 22, 2024 9:01 pm    Post subject: Reply with quote

cfgauss wrote:
fedeliallalinea wrote:
Code:
internal compiler error: Segmentation fault

Usually this error is related to a hardware issue.

I used smartctl to test my NVMEs (no hard disk), memtest86+ to test my memory, and s-tui to test my CPU and the hardware passes these tests.

How would I go about checking for software problems?
Elsewhere there have been comments that if it fails in the same way every time, it is probably a software issue. So one method would be to try building it multiple times and see if if fails in a consistent manner.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sat Jun 22, 2024 9:16 pm    Post subject: Reply with quote

pjp wrote:
cfgauss wrote:
fedeliallalinea wrote:
Code:
internal compiler error: Segmentation fault

Usually this error is related to a hardware issue.

I used smartctl to test my NVMEs (no hard disk), memtest86+ to test my memory, and s-tui to test my CPU and the hardware passes these tests.

How would I go about checking for software problems?
Elsewhere there have been comments that if it fails in the same way every time, it is probably a software issue. So one method would be to try building it multiple times and see if if fails in a consistent manner.

emerge world fails consistently with
Code:
* One or more packages are either masked or have missing dependencies:
 *
 *   ~dev-qt/qtbase-6.7.1:6[network,widgets] pulled in by:
 *     (dev-qt/qttools-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[sql,sqlite] pulled in by:
 *     (dev-qt/qttools-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[xml,zstd] pulled in by:
 *     (dev-qt/qttools-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[dbus,xml] pulled in by:
 *     (dev-qt/qttools-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[opengl] pulled in by:
 *     (dev-qt/qttools-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[-accessibility,gui,network,opengl,sql,ssl,vulkan,widgets] pulled in by:
 *     (dev-qt/qtdeclarative-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtsvg-6.7.1:6 pulled in by:
 *     (dev-qt/qtdeclarative-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qttranslations-6.7.2:6 pulled in by:
 *     (dev-qt/qtbase-6.7.2:6/6.7.2::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[gui,icu,network,xml] pulled in by:
 *     (dev-qt/qt5compat-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtshadertools-6.7.1:6 pulled in by:
 *     (dev-qt/qt5compat-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6 pulled in by:
 *     (dev-qt/qtspeech-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[-accessibility,gui,opengl,vulkan,widgets] pulled in by:
 *     (dev-qt/qtwebengine-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[concurrent] pulled in by:
 *     (dev-qt/qtwebchannel-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[gui,network,opengl,vulkan,widgets] pulled in by:
 *     (dev-qt/qtmultimedia-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[X,concurrent,-eglfs] pulled in by:
 *     (dev-qt/qtmultimedia-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[concurrent,gui,opengl,vulkan,widgets] pulled in by:
 *     (dev-qt/qtquick3d-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtshadertools-6.7.1:6 pulled in by:
 *     (dev-qt/qtquick3d-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6 pulled in by:
 *     (dev-qt/qtquicktimeline-6.7.1:6/6.7.1::gentoo, installed)
 *
 *   ~dev-qt/qtbase-6.7.1:6[dbus] pulled in by:
 *     (dev-qt/qtsensors-6.7.1:6/6.7.1::gentoo, installed)
 *
 * The resume list contains packages that are either masked or have
 * unsatisfied dependencies. Please restart/continue the operation
 * manually, or use --skipfirst to skip the first package in the list and
 * any other packages that may be masked or have missing dependencies.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sat Jun 22, 2024 9:20 pm    Post subject: Reply with quote

Is the segmentation fault the same?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sat Jun 22, 2024 9:39 pm    Post subject: Reply with quote

pjp wrote:
Is the segmentation fault the same?

Code:
# emerge -uDN --verbose-conflicts --keep-going --with-bdeps=y @world 2>&1 | tee /tmp/emerge-world

# grep -i segmentation /tmp/emerge-world
/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:877:21: internal compiler error: Segmentation fault
/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:1275:75: internal compiler error: Segmentation fault
/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:877:21: internal compiler error: Segmentation fault
/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:1275:75: internal compiler error: Segmentation fault
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1949

PostPosted: Sat Jun 22, 2024 11:15 pm    Post subject: Reply with quote

We need to see the full stacktrace from the ICE for each occurrence if you can please.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sat Jun 22, 2024 11:20 pm    Post subject: Reply with quote

sam_ wrote:
We need to see the full stacktrace from the ICE for each occurrence if you can please.

I'm not sure how to provide this exactly nor where to find it. E.g. what is "ICE"?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1949

PostPosted: Sat Jun 22, 2024 11:40 pm    Post subject: Reply with quote

Ah, sorry, ICE = internal compiler error.

I need the, say, 20 lines after 'internal compiler error: Segmentation fault'.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sun Jun 23, 2024 12:33 am    Post subject: Reply with quote

sam_ wrote:
Ah, sorry, ICE = internal compiler error.
I need the, say, 20 lines after 'internal compiler error: Segmentation fault'.

Code:
$ grep -in segmentation emerge-world
1236:/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:877:21: internal compiler error: Segmentation fault
1308:/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:1275:75: internal compiler error: Segmentation fault
1459:/var/tmp/portage/dev-qt/qtdeclarative-6.7.2/work/qtdeclarative-everywhere-src-6.7.2/src/qmldom/qqmldomitem_p.h:1275:75: internal compiler error: Segmentation fault

$ grep -in "Please submit a full bug report" emerge-world
1261:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1296:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1325:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1362:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1403:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1476:Please submit a full bug report, with preprocessed source (by using -freport-bug).
1516:Please submit a full bug report, with preprocessed source (by using -freport-bug).

$ head -n 1261 emerge-world | tail -n  26 > error1
$ head -n 1325 emerge-world | tail -n 18 > error2
$ head -n 1476 emerge-world | tail -n 18 > error3

Here is error1.
Here is error2.
Here is error3.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Sun Jun 23, 2024 4:03 am    Post subject: Reply with quote

sam_ wrote:
We need to see the full stacktrace from the ICE for each occurrence if you can please.


The link in the first post (under "Here") provides the full build log.

Best Regards,
Georgi
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1956
Location: 127.0.0.1

PostPosted: Sun Jun 23, 2024 8:30 am    Post subject: Reply with quote

Please update your emerge --info link above : Page not found.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Sun Jun 23, 2024 1:45 pm    Post subject: Reply with quote

netfab wrote:
Please update your emerge --info link above : Page not found.

The link above has been corrected.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Mon Jun 24, 2024 2:53 am    Post subject: Reply with quote

sam_ wrote:
I need the, say, 20 lines after 'internal compiler error: Segmentation fault'.

If segmentation faults occur in the compiling of, say, the C++ code of qtdeclarative does that indicate a problem with the compiler or the code of qtdeclarative? I'm uncertain of the meaning of "internal compiler error."
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Mon Jun 24, 2024 5:45 am    Post subject: Reply with quote

cfgauss wrote:
sam_ wrote:
I need the, say, 20 lines after 'internal compiler error: Segmentation fault'.

If segmentation faults occur in the compiling of, say, the C++ code of qtdeclarative does that indicate a problem with the compiler or the code of qtdeclarative? I'm uncertain of the meaning of "internal compiler error."


It is the compiler. Have you enabled lto or some other optimization?

Best Regards,
Georgi
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22619

PostPosted: Mon Jun 24, 2024 11:35 am    Post subject: Reply with quote

A program with no bugs, running on hardware that works as documented, will never crash, no matter how ill-formed its inputs may be. C++ compilers are tested extensively, and while they doubtless have bugs (as any large program does), it should be exceedingly rare that a released C++ compiler can be crashed by bad inputs, especially when those inputs are themselves released source that many people have built successfully. Therefore, when dealing with released source code as input, it is generally very safe to assume that a compiler crash indicates either that the hardware did not behave as documented or that the compiler was itself mis-compiled, such that the program you are running is not what the released source code was intended to create. As logrusx's question suggests, Link Time Optimization is a somewhat common way to get a malfunctioning binary from a given source code release, whether due to bugs in the LTO code or bugs in the compiler that are only exposed under the heightened optimization of LTO.
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Mon Jun 24, 2024 2:23 pm    Post subject: Reply with quote

logrusx wrote:
It is the compiler. Have you enabled lto or some other optimization?

Code:
$ grep -m1 "model name" /proc/cpuinfo
model name      : AMD Ryzen Threadripper 2950X 16-Core Processor

$ cat /etc/portage/make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
ACCEPT_LICENSE="*"
ACCEPT_KEYWORDS="~amd64"
ALSA_CARDS="hda-intel usb-audio"
APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi"
BINPKG_FORMAT="gpkg"
# The CCACHE settings from
# https://forums.gentoo.org/viewtopic-t-1009530-postdays-0-postorder-asc-start-50.html
CCACHE_SIZE="100G"
CCACHE_COMPRESS="true"
CCACHE_SLOPPINESS="file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches,pch_defines"
CCACHE_DIR="/gentoo/ccache"
CCACHE_BASEDIR="${PORTAGE_TMPDIR}/portage"
COMMON_FLAGS="-O2 -pipe -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
#CFLAGS="-march=znver2 -O2 -pipe"
#CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3"
#CXXFLAGS="${CFLAGS}"
EMERGE_DEFAULT_OPTS="--autounmask=n -j33 --changed-deps-report=n"
#FEATURES="-userfetch ccache"
# ccache interferes with rclone and maybe others
FEATURES="-userfetch"
#GRUB_PLATFORMS="pc emu"
GRUB_PLATFORMS="efi-64"
INPUT_DEVICES="keyboard mouse evdev"
L10N="en-US"
LINGUAS="en_US"
MAKEOPTS="-j32 -l33"
PERL_FEATURES="ithreads quadmath"
PHP_TARGETS="php7-1 php7-2"
PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib64/pkgconfig"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_SYSTEM="save echo"
PORTAGE_NICENESS=19
PORTDIR="/usr/portage"
RUBY_TARGETS="ruby30 ruby31"
SANE_BACKENDS="hp"
USE="gtk -gnome arts apache2 imap alsa cups foomaticdb ppds qt \
     dvd also cdr kdeenablefinal bitmap-fonts truetype-fonts oss \
     type1-fonts nptl nptlonly tk quicktime X odbc opengl \
     nsplugin emacs ssse3 dbus policykit lm_sensors truetype \
     corefonts type3 pulseaudio -semantic-desktop php xvmc nvidia \
     vdpau xinerama udisks bluetooth mtp crypt symlink acl zsh-completion \
     elogind -consolekit"

VIDEO_CARDS="nvidia nv vesa fbdev vga"

#CAMERAS="canon"

# Set PORTDIR for backward compatibility with various tools:
#   gentoo-bashcomp - bug #478444
#   euse - bug #474574
#   euses and ufed - bug #478318

#sync-uri = rsync://rsync3.us.gentoo.org/gentoo-portage

GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo \
    http://gentoo-mirror.flux.utah.edu/ \
    http://gentoo.osuosl.org/"

Do you see any errors in make.conf for my CPU?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Mon Jun 24, 2024 2:30 pm    Post subject: Reply with quote

cfgauss wrote:

Do you see any errors in make.conf for my CPU?


LTO/PGO is not related to any CPU. Those are done by the compiler/linker.

p.s. I already checked your make.conf for an lto/pgo use flag, although it should not be there.

Best Regards,
Georgi
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Mon Jun 24, 2024 4:08 pm    Post subject: Reply with quote

It appears that my problem occurs with compiling QT6 packages which, I assume, are pulled in by KDE6. I'm "happy" to revert to KDE5 just to get a working graphic system again.

Is there documentation on how to revert to an earlier version of KDE?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Mon Jun 24, 2024 5:39 pm    Post subject: Reply with quote

I would speculate the problem is in your compiler, because you're running testing and it's something like p202406something, which is very recent, but I can't prove it. I'm also not sure if it's OK to downgrade it.

Best Regards,
Georgi
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 723
Location: USA

PostPosted: Mon Jun 24, 2024 6:30 pm    Post subject: Reply with quote

logrusx wrote:
I would speculate the problem is in your compiler, because you're running testing and it's something like p202406something, which is very recent, but I can't prove it. I'm also not sure if it's OK to downgrade it.

Code:
# ls /usr/portage/sys-devel/gcc/|grep gcc-14.
gcc-14.1.1_p20240518.ebuild
gcc-14.1.1_p20240615.ebuild
gcc-14.1.1_p20240622.ebuild
gcc-14.1.9999.ebuild

Would it be "safe" (or useful) to emerge the first two and then try emerging world? I assume they would go in the same slot as the third, my current compiler.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2402

PostPosted: Tue Jun 25, 2024 6:23 am    Post subject: Reply with quote

cfgauss wrote:
logrusx wrote:
I would speculate the problem is in your compiler, because you're running testing and it's something like p202406something, which is very recent, but I can't prove it. I'm also not sure if it's OK to downgrade it.

Code:
# ls /usr/portage/sys-devel/gcc/|grep gcc-14.
gcc-14.1.1_p20240518.ebuild
gcc-14.1.1_p20240615.ebuild
gcc-14.1.1_p20240622.ebuild
gcc-14.1.9999.ebuild

Would it be "safe" (or useful) to emerge the first two and then try emerging world? I assume they would go in the same slot as the third, my current compiler.


I don't know. What I can tell you for sure is you should not downgrade glibc. If I were you I would quit running testing. If you're up for that idea, there are a few threads on how to downgrade to stable without breaking your system. You can also open a new one as this usually is specific for the specific user.

The general rule for downgrading is to remove ~amd64 from your make.conf and see what are the packages that are scheduled for downgrade. Put some versioned entries in package.accpet_keywords for the packages that should not be downgraded and wait for those to get stable versions. They should be in the form of <=caregory/package/version so that you're sure portage won't try to build anything lower then the currently installed version. One such package is glibc but I think there were others too.

Best Regards,
Georgi
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
Goto page 1, 2  Next
Page 1 of 2

 
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