Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

www-client/ungoogled-chromium crashes if compiled with libcxx #2

Closed
perfect7gentleman opened this issue Sep 20, 2019 · 14 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed wontfix This will not be worked on

Comments

@perfect7gentleman
Copy link
Contributor

~ $ chromium
Aborted
~ $ emerge --info ungoogled-chromium
Portage 2.3.76 (python 3.7.4-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.2.0, glibc-2.30-r1, 5.3.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.3.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    15830192 total,  11655192 free
KiB Swap:   13720572 total,  12434056 free
Head commit of repository palemoon: bb5b3c68173ef43e2dad19c29ff982ff2bf784c4

Head commit of repository gnome: 8e70712c5f69e4270a77c83c0d0ba8a92af93615

Head commit of repository gentoo: 2dc5ae9c4d9efcc91facc6203a4f49065e270189

Head commit of repository mozilla: 579dc2f7b864d9192d0e1b8a7ee6733c7a9ac992

Head commit of repository qt: 73e9c00613ce01c85c006a452a7a2fba9c2ba6a7

Head commit of repository kde: c7a57aceba38d693ba436f561897ef78cfd6dd7c

Head commit of repository pg_overlay: feed90e56c9f9b349504d40a542bf80a136362e8

sh bash 5.0_p11
ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16
ccache version 3.7.4 [disabled]
app-shells/bash:          5.0_p11::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.7.4-r1::gentoo
dev-util/ccache:          3.7.4::gentoo
dev-util/cmake:           3.15.3::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r1::gentoo
Repositories:

palemoon
    location: /usr/portage/overlay/palemoon
    sync-type: git
    sync-uri: https://github.com/deu/palemoon-overlay.git
    masters: gentoo
    priority: -1
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

gnome
    location: /usr/portage/proj/gnome
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/gnome.git
    masters: gentoo
    priority: 3
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: 5
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay
    sync-git-clone-extra-opts: --depth 1 --single-branch --branch master

mozilla
    location: /usr/portage/proj/mozilla
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/mozilla.git
    masters: gentoo
    priority: 7
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

qt
    location: /usr/portage/proj/qt
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo
    priority: 9
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

kde
    location: /usr/portage/proj/kde
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo
    priority: 11
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

pg_overlay
    location: /usr/portage/overlay/pg_overlay
    sync-type: git
    sync-uri: https://github.com/perfect7gentleman/pg_overlay.git
    masters: gentoo
    priority: 13
    eclass-overrides: gnome mozilla gentoo qt kde pg_overlay

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -ftree-vectorize -flto=9 -fuse-linker-plugin -s"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -ftree-vectorize -flto=9 -fuse-linker-plugin -s"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -ftree-vectorize -flto=9 -fuse-linker-plugin -s"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -ftree-vectorize -flto=9 -fuse-linker-plugin -s"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/lib/systemd /usr/lib/systemd"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--sort-common -Wl,--strip-debug -flto=9 -fuse-linker-plugin"
LINGUAS="en en_US ru ru_RU"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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 alsa amd64 bash-completion bzip2 cairo cli cups custom-cflags cxx dbus dri elogind ffmpeg flac fontconfig gdbm gif gmp iconv icu introspection jpeg kde lcms libtirpc lzma lzo mmap mtp ncurses nls nptl opengl openmp orc pam pch pcre png pulseaudio readline seccomp split-usr ssl svg symlink threads tiff truetype udev unicode vaapi wavpack webp xattr xcb xft xmpp zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en_US ru ru_RU" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby26" 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, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

www-client/ungoogled-chromium-77.0.3865.90_p1::pg_overlay was built with the following:
USE="cups custom-cflags jumbo-build libcxx lld new-tcmalloc optimize-thinlto optimize-webui pdf proprietary-codecs pulseaudio system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libvpx system-openh264 system-openjpeg tcmalloc thinlto vaapi -cfi -closure-compile -convert-dict -gnome -gold -kerberos (-selinux) -suid -widevine" L10N="ru -am -ar -bg -bn -ca -cs -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" PYTHON_TARGETS="python2_7 python3_7 -python3_5 -python3_6"
CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -flto=thin -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
CXXFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -flto=thin -stdlib=libc++ -stdlib=libc++ -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--strip-debug -Wl,--thinlto-jobs=9 -flto=thin -fuse-ld=lld -stdlib=libc++ -Wl,-lc++abi -Wl,-lgcc_s -Wl,-plugin-opt,-import-instr-limit=30 -Wl,--thinlto-jobs=9"
@perfect7gentleman perfect7gentleman added the bug Something isn't working label Sep 20, 2019
@perfect7gentleman
Copy link
Contributor Author

it's copy from your overlay

@PF4Public
Copy link
Owner

You're using custom-cflags, try building without.

@PF4Public
Copy link
Owner

I assume, this solves the issue

@PF4Public PF4Public added wontfix This will not be worked on and removed bug Something isn't working labels Sep 23, 2019
@perfect7gentleman
Copy link
Contributor Author

USE="-custom-cflags" won't help

@PF4Public PF4Public added help wanted Extra attention is needed question Further information is requested and removed wontfix This will not be worked on labels Sep 24, 2019
@PF4Public
Copy link
Owner

PF4Public commented Sep 24, 2019

Then, if you want me to help you, please provide more information. Aborted is not enough.

I've inspected your USE flags once more and I see that you're trying to build with libcxx, new-tcmalloc and tcmalloc. There is a problem with libcxx, but I wonder how could you build it successfully. Try disabling libcxx and new-tcmalloc.

BTW: what is the point in copying into your overlay?

@PF4Public PF4Public reopened this Sep 24, 2019
@perfect7gentleman
Copy link
Contributor Author

perfect7gentleman commented Sep 25, 2019

USE="-custom-cflags -libcxx -new-tcmalloc" helped. thanx.

BTW: what is the point in copying into your overlay?

Really, there is no any sensible reason.
But now I'll enable your repo.

@PF4Public
Copy link
Owner

I have actually tried building with libcxx and new-tcmalloc, but it failed with re2 library being not build with libcxx… How did you manage to build it? Did you do anything special?

@perfect7gentleman
Copy link
Contributor Author

I build all deps and related packages with -stdlib=libc++

@PF4Public
Copy link
Owner

Do you do this by default in your system, or specifically for ungoogled-chromium?

@perfect7gentleman
Copy link
Contributor Author

It's default for most packages built with Clang

~ $ cat /etc/portage/env/clang_compiler 
CC="clang"
CXX="clang++"
COMMON_FLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fno-plt -fno-stack-protector -flto=thin"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS} -stdlib=libc++"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--strip-debug -Wl,--thinlto-jobs=9 -flto=thin -fuse-ld=lld"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

@perfect7gentleman
Copy link
Contributor Author

before it was possible to build working UGC with USE="custom-cflags libcxx new-tcmalloc"

@PF4Public
Copy link
Owner

Then I would suggest building it again with libcxx and new-tcmalloc and enable symbols in gn args. Run chromium with gdb and show backtrace to see, what is failing. Unfortunately I cannot promise that I will do this in an immediate future due to the lack of time at present, but if you eager, you may try, but don't enable custom-flags, as it could potentially spoil the result. It could probably give us a clue on what is wrong or what else do we need to patch to make it work.

I will edit and reopen this bug for anyone, who also is trying to build it this way. If you don't mind.

@PF4Public PF4Public reopened this Sep 26, 2019
@PF4Public PF4Public changed the title www-client/ungoogled-chromium-77.0.3865.90_p1: Aborted www-client/ungoogled-chromium crashes if compiled with libcxx Sep 26, 2019
@PF4Public PF4Public added bug Something isn't working and removed question Further information is requested labels Sep 26, 2019
PF4Public added a commit that referenced this issue Dec 2, 2019
Package-Manager: Portage-2.3.79, Repoman-2.3.16
@PF4Public
Copy link
Owner

libcxx doesn't seem to be used much, so I drop it from ebuild.
One could make this locally if desired.

@PF4Public PF4Public added the wontfix This will not be worked on label Dec 2, 2019
@perfect7gentleman
Copy link
Contributor Author

perfect7gentleman commented Feb 8, 2020

www-client/ungoogled-chromium-80.0.3987.87_p1::pf4public was built with the following:
USE="clang convert-dict cups custom-cflags optimize-thinlto optimize-webui pdf proprietary-codecs pulseaudio system-ffmpeg system-harfbuzz system-icu system-jsoncpp system-libevent system-libvpx system-openh264 system-openjpeg tcmalloc thinlto vaapi -cfi -closure-compile -enable-driver -gnome -gnome-keyring -hangouts -kerberos (-selinux) -suid -widevine" L10N="ru -am -ar -bg -bn -ca -cs -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" PYTHON_TARGETS="python2_7 python3_8 -python3_6 -python3_7"
CFLAGS="-march=native -mtune=native -O3 -pipe -flto=thin -fomit-frame-pointer -fno-plt -fno-stack-protector -fno-unwind-tables -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
CXXFLAGS="-march=native -mtune=native -O3 -pipe -flto=thin -fomit-frame-pointer -fno-plt -fno-stack-protector -fno-unwind-tables -stdlib=libc++ -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--strip-debug -Wl,--discard-all -Wl,--thinlto-jobs=9 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -s -march=native -mtune=native -O3 -pipe -flto=thin -fomit-frame-pointer -fno-plt -fno-stack-protector -fno-unwind-tables -stdlib=libc++ -Wl,-plugin-opt,-import-instr-limit=30 -Wl,--thinlto-jobs=9"

It works finally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants