Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640622 - dev-qt/qtwidgets-5.9.3: make: *** [Makefile:1387: .uic/ui_qfiledialog.h] Segmentation fault
Summary: dev-qt/qtwidgets-5.9.3: make: *** [Makefile:1387: .uic/ui_qfiledialog.h] Segm...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-10 19:44 UTC by Jeffrey Lin
Modified: 2018-01-04 07:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (dev-qt:qtwidgets-5.9.3:20171210-193209.log,78.69 KB, text/plain)
2017-12-10 19:44 UTC, Jeffrey Lin
Details
build log after manually continuing (continuation.log,411.97 KB, text/plain)
2017-12-10 19:54 UTC, Jeffrey Lin
Details
build log with default CFLAGS (dev-qt:qtwidgets-5.9.3:20171210-200903.log,75.43 KB, text/plain)
2017-12-10 20:22 UTC, Jeffrey Lin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Lin 2017-12-10 19:44:28 UTC
Created attachment 509284 [details]
build log

dev-qt/qtwidgets-5.9.3 fails to build with error
make: *** [Makefile:1387: .uic/ui_qfiledialog.h] Segmentation fault

If we cd into dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/src/widgets and run:
`sudo -u portage uic dialogs/qfiledialog.ui -o .uic/ui_qfiledialog.h`
followed by
`ebuild /usr/portage/dev-qt/qtwidgets/qtwidgets-5.9.3.ebuild merge`
compilation dies here:

In file included from dialogs/qfiledialog.cpp:65:0:
.uic/ui_qfiledialog.h:54:10: fatal error: QtGui/QAction: No such file or directory
 #include <QtGui/QAction>
          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:67897: .obj/qfiledialog.o] Error 1
Comment 1 Jeffrey Lin 2017-12-10 19:54:25 UTC
Created attachment 509286 [details]
build log after manually continuing
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2017-12-10 19:56:52 UTC
Try with more "normal" CXXFLAGS please (and attach your emerge --info)
Comment 3 Jeffrey Lin 2017-12-10 20:22:42 UTC
Created attachment 509288 [details]
build log with default CFLAGS

$ emerge --info
Portage 2.3.17 (python 3.5.4-final-0, default/linux/amd64/17.0, gcc-7.2.0, glibc-2.26-r3, 4.14.3-gentoo x86_64)
=================================================================
System uname: Linux-4.14.3-gentoo-x86_64-Intel-R-_Core-TM-_i5-3210M_CPU_@_2.50GHz-with-gentoo-2.4.1
KiB Mem:     7860628 total,   1399416 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 09 Dec 2017 00:45:01 +0000
sh bash 4.4_p12
ld GNU gold (Gentoo 2.29.1 p3 2.29.1) 1.14
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r2::lto-overlay, 3.4.6-r2::lto-overlay, 3.5.4-r2::lto-overlay
dev-util/cmake:           3.10.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            7.2.0::gentoo
sys-devel/gcc-config:     1.9.0-r2::lto-overlay
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage
    priority: -1000

lto-overlay
    location: /var/lib/layman/lto-overlay
    sync-type: laymansync
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE freedist"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer /usr/bin/startx"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg cgroup clean-logs config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/pkg"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X acl adns alsa amd64 berkdb bzip2 cdr cli cracklib crypt cups custom-cflags custom-optimization cxx dbus dri dvd fortran gdbm glamor iconv ipv6 jemalloc modules multilib ncurses nptl opencl opengl openmp optimization pch pcre pgo qt5 readline seccomp session smp ssl tcmalloc tcpd threads unicode vaapi vulkan xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx f16c mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" SANE_BACKENDS="hpaio" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Michael Palimaka (kensington) gentoo-dev 2017-12-22 12:09:34 UTC
> perl /tmp/portage/dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/mkspecs/features/data/unix/findclasslist.pl < QtWidgets.version.in > QtWidgets.version
> /tmp/portage/dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/src/widgets/uic_wrapper.sh dialogs/qfiledialog.ui -o .uic/ui_qfiledialog.h
make: *** [Makefile:1387: .uic/ui_qfiledialog.h] Segmentation fault

Could you please check dmesg for exactly what's segfaulting, and ideally run that failing uic_wrapper in gdb and get a backtrace?
Comment 5 Cedric Sodhi 2017-12-22 15:58:59 UTC
(In reply to Michael Palimaka (kensington) from comment #4)
> Could you please check dmesg for exactly what's segfaulting, and ideally run
> that failing uic_wrapper in gdb and get a backtrace?

Since I was present when this was brought up on IRC I may give a (partial) answer to this question: It is a *bundled* binary of UIC (that is called from within the uic_wrapper script) that segfaults. Contrast that to Jeffrey's description of what happens when the *system* UIC (as in that sudo command) is used.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-12-23 00:29:27 UTC
I wonder if this is related to bug #639494 then.
Comment 7 Jeffrey Lin 2018-01-03 04:22:12 UTC
A bit of experimentation shows that the segmentation fault actually occurs after running the export statements in the uic_wrapper.sh. If the four lines before `exec` are removed, the packages merges correctly, with and without LTO enabled. However, uic_wrapper seems to be generated during the configure stage, and I couldn't find a trivial way to fix it other than manually removing these lines after running configure.

--- uic_wrapper.sh.orig 2017-12-25 16:27:51.028838827 -0500
+++ uic_wrapper.sh      2017-12-25 16:33:55.194968593 -0500
@@ -1,6 +1,2 @@
 #!/bin/sh
-LD_LIBRARY_PATH=/usr/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-export LD_LIBRARY_PATH
-QT_PLUGIN_PATH=/tmp/portage/dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}
-export QT_PLUGIN_PATH
 exec /tmp/portage/dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/bin/uic "$@"
Comment 8 Michael Palimaka (kensington) gentoo-dev 2018-01-03 10:16:15 UTC
Oh, so this failures only occurs with LTO?
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2018-01-04 00:34:58 UTC
(In reply to Jeffrey Lin from comment #7)

That doesn't make sense. /usr/lib64 is already in your library search path, and /tmp/portage/dev-qt/qtwidgets-5.9.3/work/qtbase-opensource-src-5.9.3/plugins doesn't even exist when I emerge qtwidgets...

Have you tried re-emerging qtcore?
Comment 10 Jeffrey Lin 2018-01-04 03:38:00 UTC
(In reply to Davide Pesavento from comment #9)
> Have you tried re-emerging qtcore?

Yes, I have re-emerged qtcore, built with and without LTO, and the same thing happens in either case. The problem occurs with and without LTO enabled.

Running `export LD_LIBRARY_PATH=/usr/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}` in my terminal seems to cause all subsequent programs run to segfault.
Comment 11 Davide Pesavento (RETIRED) gentoo-dev 2018-01-04 07:53:17 UTC
(In reply to Jeffrey Lin from comment #10)
> Running `export
> LD_LIBRARY_PATH=/usr/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}` in my
> terminal seems to cause all subsequent programs run to segfault.

There's something seriously wrong with your system, sorry.