Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 454274

Summary: >=app-office/libreoffice-4.0.0.2: fails to build with dev-libs/boost-1.53.0_beta1
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Gentoo Office Team <office>
Status: RESOLVED FIXED    
Severity: normal CC: cJ-gentoo, dlan, polynomial-c, robink, tom, vityokster
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://tinderboxlogs.s3.amazonaws.com/tbamd64.excelsior.flameeyes.eu/app-office%3Alibreoffice-4.0.0.2%3A20130126-221405.html
Whiteboard: Fixed-in: 4.0.4
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 454100    
Attachments: build.log.xz
libreoffice-4.0.0.3-boost-1.43.patch
patch upstreamed earlier with 1 additional hunk for svgdata.cxx
emerge --info for libreoffice-4.0.0.3 built ok with gcc 4.7.2, boost 1.53.0 using patch upstreamed earlier with 1 additional hunk for svgdata.cxx
build.log.xz
Patch for libreoffice 4.0.1.2 with boost 1.53.0
build.log.xz

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-27 12:09:56 UTC
Portage 2.2.0_alpha149 (default/linux/amd64/10.0, gcc-4.7.2-asneeded, glibc-2.17, 3.5.4-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.5.4-hardened-r1-x86_64-AMD_Opteron-TM-_Processor_6272-with-gentoo-2.2
Timestamp of tree: Sun, 30 Dec 2012 00:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39-r1
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo tbamd64
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /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"
CXXFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
DISTDIR="/var/cache/portage/distfiles"
FCFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.hoobly.com/ http://gentoo.llarian.net/"
LANG="en_US.utf8"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
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="/tmp"
PORTDIR="/var/cache/tinderbox/tree"
PORTDIR_OVERLAY="/root/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex acl amd64 berkdb bzip2 cli cracklib crypt cups cxx doc dri emacs ffmpeg fortran gnutls gpm iconv icu intl introspection ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pax_kernel pcre pdf plasma pppd qt3support readline semantic-desktop session snmp sse sse2 sse3 sse4 ssl ssse3 tcmalloc tcpd udev unicode vhosts 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="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" 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 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mark Wright gentoo-dev 2013-02-09 15:20:13 UTC
I submitted my patch for Bug 456162 - app-office/libreoffice-3.4.6.3: fails to build with dev-libs/boost-1.53.0 upstream:

https://gerrit.libreoffice.org/2064
Comment 2 Mark Wright gentoo-dev 2013-02-11 01:38:20 UTC
Upstream merged my patch.  However the patch merged by upstream has not yet been tested to fix the build problem with libreoffice-4.0.0.3 with boost-1.53.0 - there is the possibility that the patch may be incomplete - it may need more hunks added if there was code changes between libreoffice-3.6.4.3 and 4.0.0.3 that need tweaks to build with boost-1.53.0.  I will test it when I can, which may take a while as it takes so long to build.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-02-13 13:11:34 UTC
Created attachment 338770 [details]
build.log.xz

Ich tried to build libreoffice-4.0.0.3 with that merged patch on top but the build still fails. See attached build.log.
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2013-02-15 13:41:16 UTC
/var/tmp/portage/app-office/libreoffice-4.0.0.3/work/libreoffice-4.0.0.3/vcl/source/gdi/svgdata.cxx:174:19: error: no matching function for call to ‘boost::shared_array<unsigned char>::shared_array(NULL)’
Comment 5 cJ 2013-02-15 18:42:11 UTC
Created attachment 339008 [details, diff]
libreoffice-4.0.0.3-boost-1.43.patch

Tentative patch for libreoffice, builds and runs, but not fully tested.
Comment 6 Mark Wright gentoo-dev 2013-02-16 11:29:54 UTC
Created attachment 339046 [details, diff]
patch upstreamed earlier with 1 additional hunk for svgdata.cxx

This is the patch I upstreamed earlier, with the addition of the hunk at the end for the compile error with svcdata.cxx
Tested to compile ok with these use flags:

argus ~ # fquery u app-office/libreoffice
USE flags for app-office/libreoffice-4.0.0.3
   +branding                                   : << no description >>
   +cups                                       : << no description >>
   +gtk                                        : << no description >>
   +vba                                        : << no description >>
   +webdav                                     : << no description >>
   aqua                                        : Include support for the Mac OS X Aqua (Carbon/Cocoa) GUI
 + bluetooth                                   : Enables Bluetooth Support
 + dbus                                        : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
   debug                                       : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
   eds                                         : Enables support for Evolution-Data-Server (EDS)
   elibc_FreeBSD                               : << no description >>
   gnome                                       : Adds GNOME support
   gstreamer                                   : Adds support for media-libs/gstreamer (Streaming media)
   gtk3                                        : Enable highly experimental gtk3 frontend
   java                                        : Adds support for Java
   jemalloc                                    : Use dev-libs/jemalloc for allocations
 + kde                                         : Adds support for KDE (K Desktop Environment)
   libreoffice_extensions_nlpsolver            : << no description >>
 + libreoffice_extensions_presenter-minimizer  : << no description >>
   libreoffice_extensions_scripting-beanshell  : << no description >>
   libreoffice_extensions_scripting-javascript : << no description >>
   libreoffice_extensions_wiki-publisher       : << no description >>
 + mysql                                       : Adds mySQL Database support
   odk                                         : Build the Office Development Kit
 + opengl                                      : Adds support for OpenGL (3D graphics)
   postgres                                    : Adds support for the postgresql database
 + python_single_target_python2_7              : << no description >>
   python_single_target_python3_3              : << no description >>
 + python_targets_python2_7                    : << no description >>
 + python_targets_python3_3                    : << no description >>
   telepathy                                   : Enable document colaboration features using telepathy communication framework.
 + test                                        : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore

argus ~ #
Comment 7 Mark Wright gentoo-dev 2013-02-16 12:34:34 UTC
Created attachment 339052 [details]
emerge --info for libreoffice-4.0.0.3 built ok with gcc 4.7.2, boost 1.53.0 using patch upstreamed earlier with 1 additional hunk for svgdata.cxx
Comment 8 Mark Wright gentoo-dev 2013-02-16 13:40:55 UTC
(In reply to comment #5)
> Created attachment 339008 [details, diff] [details, diff]
> libreoffice-4.0.0.3-boost-1.43.patch
> 
> Tentative patch for libreoffice, builds and runs, but not fully tested.

Thanks for testing this, and submitting the patch.

I applied my patch to portage, as that is the one I tested.

My patch is missing 3 hunks from the patch that cj provided.

(1) drawinglayer/source/primitive2d/textlayoutdevice.cxx

- the patch says the previous line was:

-            if(!rStdRefDevice())

but in my copy of the source I compiled it doesn't have the () on the end.

(2) editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx

Same (1) patch says the previous line was:

-    if ( !m_aStdRefDevice() )

but in my copy of the source I compiled it doesn't have the () on the end.

(3) slideshow/source/engine/animationnodes/animationnodefactory.cxx

This hunk applies ok. Just removing the parentheses from the previous
lines in the first 2 hunks would allow them to apply of course.

For all 3 hunks: Since they are already in a boolean context, the
existing code compiles fine with gcc 4.7.2.  However I wonder if
there is some other compiler version or CXXFLAGS or USE flags that
makes the changes necessary?  If there are, it would be neat if you
could please comment in the bug report, the compiler error messages
and compiler version would be very useful.
Comment 9 cJ 2013-02-17 01:44:01 UTC
Tested your latest patch with 
 use: -aqua bluetooth branding cups dbus -debug -eds -gnome gstreamer gtk gtk3 java -jemalloc -kde -mysql -odk opengl -postgres -telepathy vba webdav -test
 libreoffice_extensions: -nlpsolver presenter-minimizer -scripting-beanshell -scripting-javascript -wiki-publisher
 python_single_target: python2_7 -python3_3
 python_targets: python2_7 -python3_3
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-03-07 09:17:53 UTC
Created attachment 341222 [details]
build.log.xz

Stillfailing with libreoffice-4.0.1.2
Comment 11 Mark Wright gentoo-dev 2013-03-17 06:52:32 UTC
Created attachment 342322 [details, diff]
Patch for libreoffice 4.0.1.2 with boost 1.53.0

Compiled with gcc 4.7.2, boost 1.53.0.

It includes this hunk like cJ suggested earlier (thanks):

--- libreoffice-4.0.1.2-orig/editeng/source/editeng/eerdll.cxx	2013-02-28 01:02:37.000000000 +1100
+++ libreoffice-4.0.1.2/editeng/source/editeng/eerdll.cxx	2013-03-17 10:57:01.036699391 +1100
@@ -195,7 +195,7 @@
 
 OutputDevice* GlobalEditData::GetStdRefDevice()
 {
-    if ( !m_aStdRefDevice )
+    if ( !static_cast< bool >(m_aStdRefDevice) )
     {
         m_aStdRefDevice.reset(new VirtualDevice);
         m_aStdRefDevice->SetMapMode( MAP_TWIP );
Comment 12 Mark Wright gentoo-dev 2013-03-18 01:00:12 UTC
Committed patch for libreoffice 4.0.1.2 to build with boost 1.53.0.  I need to upstream it.
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2013-04-04 11:00:28 UTC
@Mark: did you submit this patch to gerrit?
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-04-05 07:31:31 UTC
Created attachment 344466 [details]
build.log.xz

Still failing with libreoffice-4.0.2.2
Comment 15 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-04-05 07:37:40 UTC
libreoffice-4.0.1.2-boost-1.53.0.patch still applies to libreoffice-4.0.2.2.

Out of curiosity... why don't you libreoffice guys just keep this patch in future libreoffice ebuilds until it fails to apply? As long as it applies cleanly chances are very high upstream didn't do anything to fix this problem, right?
Comment 16 Tomáš Chvátal (RETIRED) gentoo-dev 2013-04-05 09:03:29 UTC
I won't apply any patches except distro ones recursively for live ebuilds. The motivation is to get people upstream it.

We at libo accept almost all patches, so it is just sending them to gerrit.libreoffice.org, and I simply don't have the time/urge now as the 53 is quite masked and we even didn't try full master build there.
Comment 17 Mark Wright gentoo-dev 2013-04-07 10:35:36 UTC
(In reply to comment #13)
> @Mark: did you submit this patch to gerrit?

I just went to now, patch tells me "Reversed (or previously applied) patch detected!" so it appears that it is upstreamed now (by someone, thanks to whoever did it).

I also confirm that libreoffice-4.0.2.2 compiles fine and tests pass with libreoffice-4.0.1.2-boost-1.53.0.patch.
Comment 18 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-05-11 20:58:06 UTC
Still failing with libreoffice-4.0.3.3
4.0.1.2-boost-1.53.0.patch still works!

Guys this starts to become extremely annoying. You have a working patch and your only excuse is to wait for upstream who obviously is unable to apply the fix in a reasonable amount of time. 
All you have to do is keeping this patch until upstream finally fixed it. What's so hard about this?
Comment 19 Tomáš Chvátal (RETIRED) gentoo-dev 2013-05-12 08:20:21 UTC
(In reply to comment #18)
> Still failing with libreoffice-4.0.3.3
> 4.0.1.2-boost-1.53.0.patch still works!
> 
> Guys this starts to become extremely annoying. You have a working patch and
> your only excuse is to wait for upstream who obviously is unable to apply
> the fix in a reasonable amount of time. 
> All you have to do is keeping this patch until upstream finally fixed it.
> What's so hard about this?

I already said tht the patch needs to be submitted. Which nobody did. I don't give square fuck about boost thats being masked, when its unmasked I will do the work myself. But until then, DIY over gerrit.libreoffice.org. Also other chance for me testing the patch properly is using new boost in fedora/opensuse, but both distros yet not provide the new boost either.
Comment 20 Tomáš Chvátal (RETIRED) gentoo-dev 2013-05-12 09:42:07 UTC
Fixed in git and will be in 4.0.4 release.

This release will be published in a week after 2.6. If you want it in 4.0.3 the patch is just bit different against this one so feel free to add the patch line into the ebuild.

Also the 4.0.4 will be stabilisation candidate.