Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456138 - app-office/libreoffice compiles incorrectly with -fomit-frame-pointer in CXXFLAGS (for x86)
Summary: app-office/libreoffice compiles incorrectly with -fomit-frame-pointer in CXXF...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard: Fixed-in: 4.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 10:24 UTC by Alexander Prokofiev
Modified: 2013-03-06 21:25 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Prokofiev 2013-02-08 10:24:52 UTC
I've just tried to compile LibreOffice 4.0.0.2 and it crashes right after startup. Debugging shown that it is caused by callVirtualMethod in libgcc3_uno.so.

The reason is that this library must be compiled with -fno-omit-frame-pointer option, but gentoo flags are added _after_ default compile flags.

I think, this is not actually Gentoo bug, but for now it could be good to filter
-fomit-frame-pointer for libreoffice builds.


--------------------------------------------
emerge --info output:

Portage 2.1.11.50 (default/linux/x86/10.0, gcc-4.7.2, glibc-2.15-r2, 3.2.21-gentoo-duo64 i686)
=================================================================
System uname: Linux-3.2.21-gentoo-duo64-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9505_@_2.83GHz-with-gentoo-2.2
KiB Mem:     3953348 total,     45424 free
KiB Swap:    2160736 total,   2005784 free
Timestamp of tree: Thu, 07 Feb 2013 10:00:01 +0000
ld GNU ld (GNU Binutils) 2.22.90.20120727
app-shells/bash:          4.2_p39-r1
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.5.3-r1, 4.6.2, 4.7.2
sys-devel/gcc-config:     1.7
sys-devel/libtool:        2.4-r4
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-my
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA PUEL"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -pipe -O2 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=both"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /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"
CXXFLAGS="-march=core2 -pipe -O2 -fomit-frame-pointer -msse -msse2 -msse3 -mfpmath=both"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="        http://trumpetti.atm.tut.fi/gentoo/     http://mirror.etf.bg.ac.yu/gentoo       http://gentoo.oregonstate.edu/  http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--enable-new-dtags -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/my"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aigl alsa apng auto-hinter avahi bittorrent bluetooth bzip2 cairo chm cleartype cli consolekit cracklib crypt cups custom-cxxflags custom-optimization cxx dbus djvu dmx dri dri2 dvd encode exiv2 fbcon fontconfig fts3 gallium gdbm gif gimpprint gles1 gles2 glibc-compat20 glibc-omitfp gnutls gpm graphite gstreamer gtk2 gudev hal hashstyle hpn hwdb iceweasel iconv icu introspection ipv6 ithreads jpeg jpeg2k kde kdehiddenvisibility kdrive libkms llvm mad mm mmx modules moznocompose moznoirc moznomail moznopango moznoroaming mp3 mudflap ncurses network networkmanager nptl ogg opengl openmp pam pch pcre pdf pgo png policykit ppp pulseaudio qt3support qt4 raster rdesktop readline rtc sdl secure-delete semantic-desktop session sna spell sqlite sse sse2 ssl svg sysfs system-sqlite tcpd threads tiff truetype truetype-fonts tuxonice type1-fonts udev unicode unlock-notify utils uxa v4l v4l2 virtuoso vnc vorbis webkit win32codecs x264 x86 xcb xcomposite xinerama xorg xosd xv xvfb xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard ps2mouse serialmouse evdev synaptics mtrack" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="arm" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="ati i810 sis sis315 vesa mach64 intel nouveau i915 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 nebojsa 2013-02-08 20:56:04 UTC
I have to thank you for this report. I was trying for days to debug this, without success.
Libreoffice uses exceptions and I was able to dig out that an exception was thrown during removing of old temporary directory, during the start sequence, and that exception handling triggered segfault.
I can confirm that rebuilding without -fomit-frame-pointer fixes the problem.
Comment 2 Denis Dupeyron (RETIRED) gentoo-dev 2013-02-10 07:06:56 UTC
Apparently upstream knows about this [1].

So, building without -fomit-frame-pointer is a good temporary solution, but let's make sure we don't filter this flag globally in the ebuild as a workaround which would be silly. This would needlessly slow down libreoffice on those old x86 machines which are register starved. Fixing the gb_Library_add_cxxflags calls in the bridges/*.mk files is the right way to go.

Thanks Alexander for finally finding the root cause of bug #451778.

Denis.

[1] http://nabble.documentfoundation.org/gmake-CXXFLAGS-override-gb-Library-add-cxxflags-td4027995.html
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2013-03-06 21:25:21 UTC
4.0.1 in main tree so closing this as fixed.