Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435998 - app-office/libreoffice-3.6.1.2 fails to build because of missing <typeindex> with sys-devel/gcc-4.5.4
Summary: app-office/libreoffice-3.6.1.2 fails to build because of missing <typeindex> ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
: 436110 437154 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-23 15:52 UTC by Coacher
Modified: 2012-11-08 19:02 UTC (History)
12 users (show)

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


Attachments
emerge --info (info,5.53 KB, text/plain)
2012-09-23 15:55 UTC, Coacher
Details
build.log.xz (build.log.xz,233.60 KB, text/plain)
2012-09-23 16:02 UTC, Coacher
Details
libreoffice's build_error.log (build_error.log,52.87 KB, text/plain)
2012-09-23 16:03 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2012-09-23 15:52:12 UTC
After update to boost-1.49 today revdep-rebuild showed that libreoffice need to be rebuild. However, compilation failed due to missing boost header. Logs attached below.

Reproducible: Always
Comment 1 Coacher 2012-09-23 15:55:27 UTC
Created attachment 324718 [details]
emerge --info
Comment 2 Coacher 2012-09-23 16:02:50 UTC
Created attachment 324722 [details]
build.log.xz
Comment 3 Coacher 2012-09-23 16:03:19 UTC
Created attachment 324724 [details]
libreoffice's build_error.log
Comment 4 Julian Ospald 2012-09-23 20:49:35 UTC
from the hash.hpp header it says:

#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
#include <typeindex>
#endif

typeindex seems only present in >=gcc:4.6
Comment 5 Coacher 2012-09-23 20:55:54 UTC
Boost guys can break compatibility with GCC 4.5 in a minor version bump?
I had no problems building libreoffice with GCC 4.5 prior to boost update.
Comment 6 Julian Ospald 2012-09-23 21:15:42 UTC
(In reply to comment #5)
> Boost guys can break compatibility with GCC 4.5 in a minor version bump?
> I had no problems building libreoffice with GCC 4.5 prior to boost update.

mh, but the header has not changed with between 1.48 and 1.49
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-09-23 21:32:45 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Boost guys can break compatibility with GCC 4.5 in a minor version bump?
> > I had no problems building libreoffice with GCC 4.5 prior to boost update.
> 
> mh, but the header has not changed with between 1.48 and 1.49

I don't see any relevant changes in boost.config either... doesn't libreoffice do something scary here?
Comment 8 Coacher 2012-09-23 21:48:28 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Boost guys can break compatibility with GCC 4.5 in a minor version bump?
> > > I had no problems building libreoffice with GCC 4.5 prior to boost update.
> > 
> > mh, but the header has not changed with between 1.48 and 1.49
> 
> I don't see any relevant changes in boost.config either... doesn't
> libreoffice do something scary here?

Most probably. libreoffice is not the only package I had to rebuild after boost update, but the only one with issues.
Comment 9 Brian Evans (RETIRED) gentoo-dev 2012-09-23 23:02:10 UTC
> from the hash.hpp header it says:
> 
> #if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
> #include <typeindex>
> #endif
> 
> typeindex seems only present in >=gcc:4.6

I can confirm that gcc references can be a factor.

Compiling with gcc-4.5.4.. failed the same way.
Compiling with gcc-4.6.3.. succeeded.

No other changes made.

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


Portage 2.1.11.9 (default/linux/amd64/10.0/desktop, gcc-4.5.4, glibc-2.15-r2, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.1
Timestamp of tree: Fri, 21 Sep 2012 22:20:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo Local-Ebuilds
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=barcelona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ ftp://mirrors.rit.edu/gentoo/ ftp://ftp.lug.udel.edu/pub/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j7"
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"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cddb cdparanoia cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif gpm gtk iconv ipv6 java jpeg lcms libnotify logrotate mad mmx mng modules mp2 mp3 mp4 mpeg mudflap multilib ncurses network nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pppd qt3support qt4 quicktime readline sdl session spell sse sse2 ssl startup-notification stream svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xml xscreensaver xv xvid xvmc yahoo zlib" ALSA_CARDS="hda-intel" 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 keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau" 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(In reply to comment #4)
Comment 10 Coacher 2012-09-23 23:17:52 UTC
(In reply to comment #9)
> > from the hash.hpp header it says:
> > 
> > #if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
> > #include <typeindex>
> > #endif
> > 
> > typeindex seems only present in >=gcc:4.6
> 
> I can confirm that gcc references can be a factor.
> 
> Compiling with gcc-4.5.4.. failed the same way.
> Compiling with gcc-4.6.3.. succeeded.
> 
> No other changes made.

Strange. I had successfull world rebuild recently with gcc-4.5.4 and libreoffice-3.6.1.2 had no problems. I'll try rebuilding libreoffice again against boost-1.48 and gcc-4.5.4 just to be sure.
Comment 11 Coacher 2012-09-23 23:49:34 UTC
(In reply to comment #9)
> > from the hash.hpp header it says:
> > 
> > #if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
> > #include <typeindex>
> > #endif
> > 
> > typeindex seems only present in >=gcc:4.6
> 
> I can confirm that gcc references can be a factor.
> 
> Compiling with gcc-4.5.4.. failed the same way.
> Compiling with gcc-4.6.3.. succeeded.
> 
> No other changes made.

True. Building against boost-1.48 fails with the same error as described above. It is not boost-related then.

There are already several posts about gcc-related nature of this issue and I am pretty sure libreoffice will compile with gcc:4.6, but somehow it was compiled in the first place with gcc:4.5 I don't want to switch to gcc:4.6 just because of libreoffice. Is there any other way to deal with this bug?
Comment 12 Elijah "Armageddon" El Lazkani (amd64 AT) 2012-09-24 00:33:00 UTC
(In reply to comment #11)
> (In reply to comment #9)
> > > from the hash.hpp header it says:
> > > 
> > > #if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
> > > #include <typeindex>
> > > #endif
> > > 
> > > typeindex seems only present in >=gcc:4.6
> > 
> > I can confirm that gcc references can be a factor.
> > 
> > Compiling with gcc-4.5.4.. failed the same way.
> > Compiling with gcc-4.6.3.. succeeded.
> > 
> > No other changes made.
> 
> True. Building against boost-1.48 fails with the same error as described
> above. It is not boost-related then.
> 
> There are already several posts about gcc-related nature of this issue and I
> am pretty sure libreoffice will compile with gcc:4.6, but somehow it was
> compiled in the first place with gcc:4.5 I don't want to switch to gcc:4.6
> just because of libreoffice. Is there any other way to deal with this bug?

It is boost related. Somehow boost 1.49 changed something, not exactly sure what. But I checked because I had the same problem. Boost 1.48 with gcc 4.5.4 used to work fine, after update of boost, boost 1.49 and 1.48 failed. The problem gets fixed with gcc-4.6.3.
Comment 13 Coacher 2012-09-24 00:43:51 UTC
(In reply to comment #12)
> It is boost related. Somehow boost 1.49 changed something, not exactly sure
> what. But I checked because I had the same problem. Boost 1.48 with gcc
> 4.5.4 used to work fine, after update of boost, boost 1.49 and 1.48 failed.
> The problem gets fixed with gcc-4.6.3.

Thanks for the clarification.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-09-24 07:42:30 UTC
1. Do you have more than one boost version installed?
2. Please try 'grep -R HDR_TYPEINDEX' on the libreoffice workdir or sources. I doubt it will find anything but worth a try.
Comment 15 Tomáš Chvátal (RETIRED) gentoo-dev 2012-09-24 07:45:38 UTC
We used to have weird hack in the ebuild which i removed:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-3.6.1.2.ebuild?r1=1.3&r2=1.4

Because I was unable to trigger it on my machines OR on suse builds.

Question here then stands, why is our boost different.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-09-24 08:23:38 UTC
(In reply to comment #15)
> We used to have weird hack in the ebuild which i removed:
> 
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-office/
> libreoffice/libreoffice-3.6.1.2.ebuild?r1=1.3&r2=1.4
> 
> Because I was unable to trigger it on my machines OR on suse builds.
> 
> Question here then stands, why is our boost different.

Well, the most important difference, I think, is that we allow multiple boost versions to be installed while other distros quickly get rid of older ones, I think.

I think this may be a conflict of two boost versions used in the same time. Either through a bug in the build system (which somehow gets more than one version into includes, not sure why 1.49 triggers that; maybe it's too big number :P) or due to our eselect.

In theory, a 'newer' header may actually include older boost/config.hpp and thus not have the necessary #define. Not sure if that's actually the case.
Comment 17 Coacher 2012-09-24 14:07:19 UTC
(In reply to comment #14)
> 1. Do you have more than one boost version installed?
> 2. Please try 'grep -R HDR_TYPEINDEX' on the libreoffice workdir or sources.
> I doubt it will find anything but worth a try.

No results.
Comment 18 Coacher 2012-09-24 14:23:32 UTC
(In reply to comment #15)
> We used to have weird hack in the ebuild which i removed:
> 
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-office/
> libreoffice/libreoffice-3.6.1.2.ebuild?r1=1.3&r2=1.4
> 
> Because I was unable to trigger it on my machines OR on suse builds.
> 
> Question here then stands, why is our boost different.

This is what missing since the time I built libreoffice last time.
Comment 19 Tomáš Chvátal (RETIRED) gentoo-dev 2012-09-24 16:49:18 UTC
*** Bug 436110 has been marked as a duplicate of this bug. ***
Comment 20 Coacher 2012-10-01 04:54:24 UTC
Just succesfully built libreoffice-3.6.2.2 with gcc-4.5.4 and boost-1.49-r1 and without any additional tricks. Can anybody confirm this?
Comment 21 Trevor Bowen 2012-10-03 18:00:18 UTC
@Coacher, I still cannot build app-office/libreoffice-3.6.2.2 with sys-devel/gcc-4.5.4 and dev-libs/boost-1.49.0-r1, even after resyncing this morning.

error:

...

In file included from /usr/include/boost/functional/hash.hpp:6:0,
                 from /usr/include/boost/unordered/unordered_map.hpp:21,
                 from /usr/include/boost/unordered_map.hpp:16,
                 from /var/tmp/portage/app-office/libreoffice-3.6.2.2/work/libreoffice-core-3.6.2.2/l10ntools/source/help/HelpCompiler.hxx:33,
                 from /var/tmp/portage/app-office/libreoffice-3.6.2.2/work/libreoffice-core-3.6.2.2/l10ntools/source/help/HelpCompiler.cxx:30:
/usr/include/boost/functional/hash/hash.hpp:28:21: fatal error: typeindex: No such file or directory
compilation terminated.
make[2]: *** [/var/tmp/portage/app-office/libreoffice-3.6.2.2/work/libreoffice-core-3.6.2.2/workdir/unxlngx6.pro/CxxObject/l10ntools/source/help/HelpCompiler.o] Error 1
Comment 22 Coacher 2012-10-03 18:15:08 UTC
The steps I did:
0. I had libreoffice-3.6.1.2 built against boost-1.48
1. Update to boost-1.49-r1, removed 1.48, libreoffice-3.6.1.2 now fails to build
2. Install back boost-1.48 and switch to it via eselect, libreoffice still fails to build
3. Remove boost-1.48 and after a few days got a libreoffice-3.6.2.2 which was successfully built against boost-1.49

Also I've installed all updates that were available prior to libreoffice-3.6.2.2 appearance in tree.

As a workaround you can create /etc/portage/env/app-office/libreoffice file with the following contents:

CXXFLAGS="${CXXFLAGS} -DBOOST_NO_0X_HDR_TYPEINDEX"
CPPFLAGS="${CXXFLAGS}"

This should be sufficient to build it and worked for me.
Comment 23 Tomáš Chvátal (RETIRED) gentoo-dev 2012-10-04 14:38:32 UTC
*** Bug 437154 has been marked as a duplicate of this bug. ***
Comment 24 Tomáš Chvátal (RETIRED) gentoo-dev 2012-10-05 07:03:15 UTC
Okey guys, from what I have checked it seems like it is bug in boost, so we should fix that in boost rather than per package.

@dev-zero: any ideas/suggestions from your side?
Comment 25 Rafał Mużyło 2012-10-06 23:24:13 UTC
Any chance this could be a gcc bug (in that it's aborting too early with system headers) ?

boost/config/stdlib/libstdcpp3.hpp has the following section:

#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
#  define BOOST_NO_0X_HDR_TYPEINDEX
#endif

If I put this into a separate header, drop it into ${WORKIDIR}/i10ntools/source/help and '#include' it right above <boost/unordered_map.hpp> in i10ntools/source/help/HelpCompiler.hxx, compilation passes, but if instead boost/config/stdlib/libstdcpp3.hpp is explicitly included in the same place (it doesn't seem to have any include guards), compilation fails.
Comment 26 Sergey Bobrov 2012-11-01 07:32:43 UTC
boost was updated to boost-1.49.0-r2 but libreoffice still fails to build without workaround with /etc/portage/env/app-office/libreoffice file with content
CXXFLAGS="${CXXFLAGS} -DBOOST_NO_0X_HDR_TYPEINDEX"
CPPFLAGS="${CXXFLAGS}"
Comment 27 Tomáš Chvátal (RETIRED) gentoo-dev 2012-11-01 07:42:33 UTC
Yes boost was updated for unslotting, but not patched for this particular problem.
Comment 28 Arfrever Frehtes Taifersar Arahesis 2012-11-01 07:51:12 UTC
(In reply to comment #15)
> We used to have weird hack in the ebuild which i removed:
> 
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-office/
> libreoffice/libreoffice-3.6.1.2.ebuild?r1=1.3&r2=1.4
> 
> Because I was unable to trigger it on my machines OR on suse builds.
> 
> Question here then stands, why is our boost different.

Boost in Gentoo does not diverge from upstream. There are only patches for build system and support for Python. No patches for any headers.

Maybe other distributions are heavily patching Boost, and LibreOffice incorrectly relies on it?
Comment 29 Tomáš Chvátal (RETIRED) gentoo-dev 2012-11-01 08:03:51 UTC
The issue is caused by boost because it enables typeindex features when it should not.

It should be properly set up by boost/config/stdlib/libstdcpp3.hpp that should be included by all headers.

Didn't have time to bother with this more.
Comment 30 Arfrever Frehtes Taifersar Arahesis 2012-11-01 08:36:06 UTC
(In reply to comment #29)

You could ask Boost upstream to implement some changes in upcoming Boost 1.52.
(There is not much time. Boost 1.52.0_beta1 has been announced on 2012-10-09.)
Comment 31 Tomáš Chvátal (RETIRED) gentoo-dev 2012-11-04 10:45:52 UTC
I put requirement over new gcc into live ebuild, and for older I added the define back so I don't have to mess with our lovely gentoo boost.
Comment 32 Coacher 2012-11-08 19:02:00 UTC
@Tomáš Chvátal, @Arfrever Frehtes Taifersar Arahesis
I would like to contact with upstream so they could fix this issue. Maybe you could give me some advices what should be mentioned in bug report aside from already known things:
- boost enables typeindex feature when it should not, namely with gcc-4.5.4
- fix should be done in boost/config/stdlib/libstdcpp3.hpp
- this bug affects libreoffice-3.6 and only way to build it with recent boost
  (1.48, 1.49) and gcc-4.5 is to manually add -DBOOST_NO_0X_HDR_TYPEINDEX to
  CXXFLAGS

Thanks.