Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 441836 - www-plugins/gnash-0.8.10_p20120903 - In file included from sound_definition.cpp:11: /usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:29:44: error: declaration does not declare anything
Summary: www-plugins/gnash-0.8.10_p20120903 - In file included from sound_definition.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords:
Depends on: PR48226
Blocks:
  Show dependency tree
 
Reported: 2012-11-05 08:28 UTC by dehua.yang
Modified: 2013-01-27 22:42 UTC (History)
0 users

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


Attachments
build.log (build.log,99.78 KB, text/plain)
2012-11-05 08:28 UTC, dehua.yang
Details
Workaround patch to be applied to dev-libs/boost to avoid the gcc bug. Not a real fix. (boost-altivec-workaround.patch,2.79 KB, patch)
2012-12-02 15:18 UTC, Marcus Comstedt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dehua.yang 2012-11-05 08:28:25 UTC
Created attachment 328422 [details]
build.log

I tried to emerge www-plgins/gnash-0.8.10_p20120903 in my G5 running ppc64, but failed with  

/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:29:44: error: declaration does not declare anything
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:32:50: error: template argument 1 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:33:17: error: 'element' in namespace 'boost::mpl' does not name a type
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:33:17: warning: 'typedef' was ignored in this declaration
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:37:34: error: 'vector' was not declared in this scope
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:37:40: error: template argument 1 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:38:53: error: 'element' was not declared in this scope
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:38:60: error: template argument 1 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:39:52: error: 'element' was not declared in this scope
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:39:59: error: template argument 1 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:40:21: error: template argument 1 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:40:21: error: template argument 2 is invalid
/usr/include/boost-1_49/boost/fusion/container/vector/detail/deref_impl.hpp:40:21: error: template argument 3 is invalid
In file included from /usr/include/boost-1_49/boost/fusion/container/vector/vector_iterator.hpp:12:0,......

I have boost-1.49-r2 installed.

emerge --info

Portage 2.1.11.31 (default/linux/powerpc/ppc64/10.0/64bit-userland, gcc-4.5.4, glibc-2.15-r3, 3.6.4-gentoo ppc64)
=================================================================
System uname: Linux-3.6.4-gentoo-ppc64-PPC970,_altivec_supported-with-gentoo-2.1
Timestamp of tree: Sun, 04 Nov 2012 23:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
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.9
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.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -mpowerpc64 -fno-strict-aliasing -fomit-frame-pointer -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-O2 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -mpowerpc64 -fno-strict-aliasing -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -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 -pipe"
GENTOO_MIRRORS="ftp://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.lecl.net/pub/gentoo/ ftp://212.219.56.132/sites/www.ibiblio.org/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://212.219.56.133/sites/www.ibiblio.org/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US zh_CN"
MAKEOPTS="-j9"
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="/mnt/disk01/tmp-portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acl aiglx alsa altivec asf aspell automount berkdb browserplugin bzip2 cairo cdr chardet cjk cli consolekit cpdflib cracklib crypt css cups curl cxx dba dbus device-mapper dri dts dvd dvdnav dvdr eds emerald encode esd exif extras faac faad2 fb ffmpeg flac fontconfig foomaticdb fortran gallium gd gd-external gdbm gdu gimpprint glitz gmp gnome gnome-keyring gnomecd gnutls gpm gstreamer gtk gtk2 hal ibm iconv imagemagick imlib ipv6 java jpeg jpeg2k kdrive kms lcms ldap mad mbox mng modules mp3 mpeg mpg mudflap mysql nas nautilus ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf pgo png policykit ppc64 ppds pppd python qt qt3support readline samba saslradeon sdl secure-delete session sip skins slang spell sql sqlite sqlite3 ssl svg tcpd theora threads tiff tordns truetype udev unicode v4l2 vcd vorbis wav webkit wma xanim xcb xcomposite xine xml xml2 xmms xulrunner xv xvid zlib" ALSA_CARDS="aoa" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US zh_CN" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="ati radeon fbdev" 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 Marcus Comstedt 2012-11-24 12:22:16 UTC
I confirm this issue.  It also happens on a 32-bit userland.

The problems seems to be triggered by having -maltivec in CXXFLAGS.  Line 29 of deref_impl.hpp looks like this:

                typedef typename Iterator::vector vector;

But when -maltivec is specified, it comes out of the preprocessor like this (verified with gcc -E):

                typedef typename Iterator::vector;

I don't know if this is a gcc bug or if the problem is with the headers, but I can get gcc to segfault by running "gcc -maltivec -E" on a file which contains just "vector vector", so it does smell a bit fishy in the gcc department...

(My gcc version is "Gentoo 4.5.4 p1.0 pie-0.4.7" by the way.)


Anyway, as a workaround to compile gnash, just remove -maltivec from CXXFLAGS. This needs to be done only for the directories libcore, libcore/parser, libcore/vm, gui, utilities, and extensions/dbus, which is where the boost vector class is used. -mabi=altivec should not be removed if present.  No changes to CFLAGS are needed.
Comment 2 dehua.yang 2012-11-26 05:28:12 UTC
(In reply to comment #1)
>
> Anyway, as a workaround to compile gnash, just remove -maltivec from
> CXXFLAGS. This needs to be done only for the directories libcore,
> libcore/parser, libcore/vm, gui, utilities, and extensions/dbus, which is
> where the boost vector class is used. -mabi=altivec should not be removed if
> present.  No changes to CFLAGS are needed.

It seems the workaround doesn't work in my system. I tried to compile libcore/vw   manually by removing -maltivec from CXXFLAGS in Makefile, but it still had the same problems.
Comment 3 Marcus Comstedt 2012-12-02 15:18:19 UTC
Created attachment 331198 [details, diff]
Workaround patch to be applied to dev-libs/boost to avoid the gcc bug.  Not a real fix.
Comment 4 Marcus Comstedt 2012-12-02 15:21:09 UTC
Well, as an alternative workaround, you could try to apply the patch I just attached to dev-lib/boost (unfortunately, that ebuild does not seem to support /etc/portage/patches, so it takes some fiddling).  That also fixes the problem for me.

Anyway, since the core issue seems to be a gcc bug, I have opened a separate bug (#445606) about that, and made it a blocker for this one.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-02 20:58:21 UTC
So if I understand correctly, this is a bug in boost and not gnash (or gcc)?
Comment 6 Marcus Comstedt 2012-12-02 21:46:00 UTC
It is a gcc bug.  I found out that it has been fixed upstreams in the gcc 4.7 series (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48226).
Comment 7 Marcus Comstedt 2012-12-03 15:53:58 UTC
And as I wrote in the other bug, putting the patch from the gcc bugzilla into /etc/portage/patches/sys-devel/gcc-4.5.4/ and re-emerging gcc fixes the problem.
Comment 8 dehua.yang 2012-12-04 09:42:15 UTC
(In reply to comment #7)
> And as I wrote in the other bug, putting the patch from the gcc bugzilla
> into /etc/portage/patches/sys-devel/gcc-4.5.4/ and re-emerging gcc fixes the
> problem.

Thank you. I followed your instructions and ememrged the gnash successfully. Maybe we could close this bug if the gcc-power7 patch is applied to gcc-4.5.4.
Comment 9 Marcus Comstedt 2012-12-21 10:40:33 UTC
Issue #445606 has now been resolved, so this issue can probably be closed as well.
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-21 11:05:52 UTC
In order to avoid duplicate reports, I will wait until next revision bump or stabilization (bug 418383) before closing.
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-01-27 22:42:56 UTC
gcc-4.6 is stable now