Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429766 - app-office/libreoffice-, XML file filter is broken
Summary: app-office/libreoffice-, XML file filter is broken
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
Depends on:
Reported: 2012-08-04 05:25 UTC by dE
Modified: 2013-04-26 19:34 UTC (History)
0 users

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

Sample document which opens bad in Gentoo's libreoffice. (Coca_Cola_pl_c_UK.docx,258.97 KB, application/
2012-08-04 11:13 UTC, dE
Screenshot of working document (doc_working.png,474.13 KB, image/png)
2012-08-05 14:47 UTC, Tomáš Chvátal (RETIRED)
app-office/libreoffice- fails in configure phase. (lo log,21.20 KB, application/octet-stream)
2012-12-08 02:51 UTC, dE

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2012-08-04 05:25:59 UTC
For some apparent reason, this problem is specific to the Gentoo ebuild.

Please check.

USE="branding cups dbus graphite gtk java jemalloc kde nsplugin opengl pdfimport svg vba webdav"

Reproducible: Always

emerge --info libreoffice
Portage 2.2.0_alpha110_p35 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.14.1-r3, 3.4.2-gentoo-r1 x86_64)
                         System Settings
System uname: Linux-3.4.2-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.1
Timestamp of tree: Sat, 21 Jul 2012 11:30:02 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo proaudio mozilla sardemff7 x11 sabayon kde sunrise my-tree
Installed sets: 
CFLAGS="-march=native -O2 -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -pipe"
EMERGE_DEFAULT_OPTS="--with-bdeps=n --complete-graph --binpkg-respect-use=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
PORTDIR_OVERLAY="/var/lib/layman/pro-audio /var/lib/layman/mozilla /var/lib/layman/sardemff7 /var/lib/layman/x11 /var/lib/layman/sabayon /var/lib/layman/kde /var/lib/layman/sunrise /home/de/dev-tree"
USE="X a52 a53 aac aalib acc acpi adns alsa amd64 amr atm audiofile branding bzip2 cdda cdr cli consolekit cracklib css cups custom-cflags custom-optimization dbus dbx declarative dga dirac dri dts dv dvd dvdr emboss encode enscript exif ffmpeg firefox flac fortran gdu gif gles glut gmp gsm gstreamer gzip iconv imlib ipc jpeg jpeg2k kde ladspa lame lcms libedit libnotify libsamplerate libwww lzma lzo mad matroska matrox mikmod mime minimal mmap mmx mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack networkmanager nntp nocd nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp optimization orc osc pam pango pdf phonon plasma png policykit posix ppds pppd qt3support qt4 quicktime raw readline schroedinger sharedmem shorten smp sndfile sockets socks5 speex spell sse sse2 sse3 sse4 sse4_1 ssse3 startup-notification strong-optimization svg symlink sysfs taglib tcpd theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vcd vhosts vorbis wavpack wmf wxwidgets x264 xcb xcomposite xine xinerama xml xorg xpm xv xvid xvmc zlib" 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" 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="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="evdev" 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_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" 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"

                        Package Settings

app-office/libreoffice- was built with the following:
USE="branding (consolekit) cups dbus graphite gtk java jemalloc kde (multilib) nsplugin opengl pdfimport (policykit) svg vba webdav (-aqua) -binfilter -binfilterdebug -eds -gnome -gstreamer -mysql -nlpsolver -odk -postgres -test -xmlsec"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-04 09:52:34 UTC
Please describe this problem in more detail.
Comment 2 dE 2012-08-04 11:12:49 UTC
This's also reproducible with

When opening a docx documents, libreoffice will first ask the file type (or what filter to use), when selecting the correct filter (Microsoft 2007 XML), the opened document is seen at a bad state, images are missing and layout is broken.

When opening xlsx documents, libreoffice states the document is corrupt.

I suspect the pptx filter to also be broken.

The official libreoffice binaries (same version) don't have these problems.

Considering this nature of this bug, this seems to be a big issue.
Comment 3 dE 2012-08-04 11:13:53 UTC
Created attachment 320266 [details]
Sample document which opens bad in Gentoo's libreoffice.
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-05 14:44:54 UTC
First please try to disable the jemalloc useflag and try again.
Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-05 14:47:20 UTC
Created attachment 320458 [details]
Screenshot of working document

FWIW here are my flags and it works fine:

[ebuild   R   *] app-office/libreoffice-3.6.9999  USE="branding cups dbus graphite gstreamer gtk java kde opengl svg webdav xmlsec (-aqua) -binfilter -binfilterdebug -eds -gnome -jemalloc -mysql -odk -postgres -test -vba" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer -pdfimport -scripting-beanshell -scripting-javascript -wiki-publisher" 0 kB

The jemalloc is results in way faster office, but the problem was they tend to get bit unstable, so that would be my first bet.
Comment 6 dE 2012-08-07 03:03:05 UTC
What about xmlsec?
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-07 07:27:40 UTC
(In reply to comment #6)
> What about xmlsec?

Whats with it? It uses internal version because it is basically library rewrite.
Comment 8 dE 2012-08-07 08:55:09 UTC
I'm trying to build app-office/libreoffice-3.6.9999, in the mean time -- 

Cloning into bare repository '/usr/portage/distfiles/egit-src/libreoffice/help'...
remote: Counting objects: 119238, done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

trying with
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-07 09:01:03 UTC
I suppose anongit.fdo has its hickups again...
Comment 10 dE 2012-08-07 11:42:01 UTC
Building without jemalloc gives the same result.
Comment 11 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-08 13:29:23 UTC
(In reply to comment #10)
> Building without jemalloc gives the same result.

Anyway i added now :-P
Comment 12 dE 2012-08-09 04:35:13 UTC
Then this's going to take a long time to verify.
Comment 13 dE 2012-08-10 07:27:50 UTC
Also files cant be saved as .*x formats. It says "write error, the file could not be written"
Comment 14 dE 2012-09-01 07:49:13 UTC
Bug persists with

Maybe this's cause of GCCs graphite.
Comment 15 Tomáš Chvátal (RETIRED) gentoo-dev 2012-09-01 09:30:42 UTC
(In reply to comment #14)
> Bug persists with
> Maybe this's cause of GCCs graphite.

Dunno, but I have graphlite enabled myself and everything works fine. Viz the screenshot above.
Comment 16 dE 2012-09-01 12:14:19 UTC
Yes, it's cause of Graphite.
Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2012-09-01 12:19:21 UTC
(In reply to comment #16)
> Yes, it's cause of Graphite.

Okey could you report it upstream to freedesktop bugzie with all relevant informations?
Comment 18 dE 2012-09-05 02:04:56 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Yes, it's cause of Graphite.
> Okey could you report it upstream to freedesktop bugzie with all relevant
> informations?

I soon will.
Comment 19 dE 2012-12-04 12:43:43 UTC
Can anyone else reproduce this bug (with graphite)?

I suggest stripping out the flags.
Comment 20 Jason Lamb 2012-12-05 18:28:45 UTC
After enabling the graphite CFLAGs, -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity, and then re-emerging gcc-4.7.2, glibc-2.16.0, binutils-2.23.1 and gcc-4.7.2 again, I re-emerged the current libreoffice-l10n- and libreoffice- to test this.

I then tried to open Coca_Cola_pl_c_UK.docx in Libreoffice Writer, and it wouldn't open at all. First gave the message that the file was corrupted and Libreoffice could try to repair the file. Clicking on yes, then displayed the error message that the file could not be opened.
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2012-12-07 13:23:26 UTC
Well honestly graphite flags can break a ton of stuff.

I bet breaker is the fgraphite-identity so you can pick and report the issue to graphite devs because you are probably the first guys actually trying graphite that much :-)
Comment 22 dE 2012-12-07 15:13:59 UTC

BTW, apart from Libreoffice and VBox, no other package gave problems.
Comment 23 dE 2012-12-08 02:51:46 UTC
Created attachment 331786 [details]
app-office/libreoffice- fails in configure phase.

Should I file a new bug for this?

I've media-libs/glu installed, 9.0.0.
Comment 24 dE 2012-12-08 05:19:12 UTC
Removing fgraphite-identity does not work.
Comment 25 dE 2012-12-08 05:45:57 UTC
On second thought -- yes, the problem is with -fgraphite-identity (I was running a previous instance of LO, so the new binary/library didn't load up).

So this flag has to be stripped.
Comment 26 Tomáš Chvátal (RETIRED) gentoo-dev 2013-04-26 19:34:31 UTC
I don't want to strip out those cflags as they show up potential bugs in compiler.

So if you want to use it and shoot into leg you are free to do so (given you report bugs on gcc side [as 99% of grapite stuff is compiler issue]), otherwise you as user should stop using it globally.

Closing as INVALID as the bug is user configuration issue between gcc/cflags.