Created attachment 397572 [details] emerge log Whilst doing: $sudo emerge --update --deep --with-bdeps=y --newuse world xapian-1.2.19 failed to compile with the following error: queryparser/queryparser.lemony: In function 'void yy_reduce(yyParser*, int)': queryparser/queryparser.lemony:1630:50: error: unable to find string literal operator 'operator""OP_TXT' state->error = "Syntax: <expression> "OP_TXT" <expression>";\ attached is the full log from the emerge process
output from emerge --info: Portage 2.2.17 (python 3.3.5-final-0, default/linux/x86/13.0/desktop/kde, gcc-4.9.2, glibc-2.20-r2, 3.16.5-gentoo i686) ================================================================= System uname: Linux-3.16.5-gentoo-i686-Intel-R-_Core-TM-_Duo_CPU_T2350_@_1.86GHz-with-gentoo-2.2 KiB Mem: 2060976 total, 731628 free KiB Swap: 2097148 total, 1739788 free Timestamp of repository gentoo: Thu, 26 Feb 2015 17:30:01 +0000 sh bash 4.3_p33-r1 ld GNU ld (Gentoo 2.25 p1.0) 2.25 app-shells/bash: 4.3_p33-r1::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.9-r2::gentoo, 3.3.5-r1::gentoo, 3.4.2::gentoo dev-util/cmake: 2.8.12.2-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.13.11::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.13.4::gentoo, 1.15::gentoo sys-devel/binutils: 2.25::gentoo sys-devel/gcc: 4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 crossdev location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11" 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/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11 -std=gnu++11" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -march=i686 -pipe" FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 c++11 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi lcms ldap libav libnotify mad mmx mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit polkit ppds pyqt4 qt3support qt4 readline sdl semantic-desktop session spell sse sse2 sse3 ssl startup-notification svg syslog tcpd tiff truetype udev udisks unicode upower usb vorbis webkit wxwidgets x264 x86 xcb xcomposite xinerama xml xorg xscreensaver xv xvid zlib" ABI_X86="32" 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" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 sse3" 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 ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" 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" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
(In reply to Grahame from comment #0) > Created attachment 397572 [details] > emerge log > > Whilst doing: > $sudo emerge --update --deep --with-bdeps=y --newuse world > > xapian-1.2.19 failed to compile with the following error: > queryparser/queryparser.lemony: In function 'void yy_reduce(yyParser*, int)': > queryparser/queryparser.lemony:1630:50: error: unable to find string literal > operator 'operator""OP_TXT' > state->error = "Syntax: <expression> "OP_TXT" <expression>";\ > > attached is the full log from the emerge process Okay I can't reproduce this off the bat. Two things: 1) Can you give me the output to `emerge -vp =dev-libs/xapian-1.2.19` 2) Can you try building with gcc-4.7.4 and gcc-4.8.4
$emerge -vp =dev-libs/xapian-1.2.19 [ebuild U ] dev-libs/xapian-1.2.19::gentoo [1.2.18::gentoo] USE="brass chert inmemory -doc -static-libs" CPU_FLAGS_X86="sse sse2" 0 KiB Total: 1 package (1 upgrade), Size of downloads: 0 KiB I'm installing gcc-4.7.4 and gcc-4.8.4 right now, once done I'll add some emerge logs. I can add a build log for xapian-1.3.1-r1 (using gcc-4.9.2) that also failed with the same error if that would help
Created attachment 397992 [details] emerge log - with gcc-4.7.4
Created attachment 397994 [details] emerge log - with gcc-4.8.4
with gcc-4.7.4 xapian-1.2.19 failed to compile/emerge with gcc-4.8.4 xapian-1.2.19 compiled/emerged successfully
(In reply to Grahame from comment #6) > with gcc-4.7.4 xapian-1.2.19 failed to compile/emerge > > with gcc-4.8.4 xapian-1.2.19 compiled/emerged successfully cc1plus: warning: command line option '-std=gnu11' is valid for C/ObjC but not for C++ [enabled by default] I got it. Its because c++11 compiled with gcc-4.X is not abi compatible with c++11 compile with gcc-4.Y where X != Y.
(In reply to Grahame from comment #6) > with gcc-4.7.4 xapian-1.2.19 failed to compile/emerge > > with gcc-4.8.4 xapian-1.2.19 compiled/emerged successfully Rereading my previous message I realized I didn't tell you how to fix this. You really can't, you just have to compile xapian with 4.8. Its not a bug in xapian, its how we do things in gentoo plus the abi incompatibility between libstdc++. One of the other devs (zmdedico) and I are thinking about how to get portage to track this and make sure the linking is correct. @zmedico et al. I'm going to start a tracker for this class of bugs.
(In reply to Anthony Basile from comment #8) > Rereading my previous message I realized I didn't tell you how to fix this. > You really can't, you just have to compile xapian with 4.8. Alternatively, he can rebuild any dependencies that use c++11 with gcc 4.9, right? Unfortunately, there's currently not an easy way to identify those packages. I would like for these packages to use -rpath so that they are forced to link against the libstdc++.so that they are built against. This will result in a DT_RUNPATH entry (recorded in /var/db/pkg/*/*/NEEDED.ELF.2) that we can use to identify which packages need to be rebuilt then you upgrade gcc.
(In reply to Zac Medico from comment #9) > (In reply to Anthony Basile from comment #8) > > Rereading my previous message I realized I didn't tell you how to fix this. > > You really can't, you just have to compile xapian with 4.8. > > Alternatively, he can rebuild any dependencies that use c++11 with gcc 4.9, > right? Unfortunately, there's currently not an easy way to identify those > packages. I would like for these packages to use -rpath so that they are > forced to link against the libstdc++.so that they are built against. This > will result in a DT_RUNPATH entry (recorded in /var/db/pkg/*/*/NEEDED.ELF.2) > that we can use to identify which packages need to be rebuilt then you > upgrade gcc. Sorry my post was misleading. Yes rebuilding any deps that use c++11 with your latest gcc should work.
I've tried: #emerge -ev world but xapian is still failing to build at the same point when I use gcc-4.9.2, am I missing something obvious?
(In reply to Grahame from comment #11) > I've tried: > #emerge -ev world > > but xapian is still failing to build at the same point when I use gcc-4.9.2, > am I missing something obvious? Maybe I'm wrong about this one being a c++ abi mismatch. It may be a pure 4.9 problem. Do you still have gcc 4.8 isntalled?
After testing if xapian would build with 4.8.4 and 4.7.4 I unmerged them leaving me with only 4.9.2 I then emerged libtools and glibc then @system and finally for a last ditch effort I emerged world. This all started when I thought I'd have a go at compiling my system with 4.9.2 and C++11 so that I could give some feedback to the community. So far you've been far more helpful than any of the other failed compilations I've tried to follow up on (rcs and qtscript) and for that I'm grateful.
(In reply to Grahame from comment #13) > After testing if xapian would build with 4.8.4 and 4.7.4 I unmerged them > leaving me with only 4.9.2 > > I then emerged libtools and glibc then @system and finally for a last ditch > effort I emerged world. > > > This all started when I thought I'd have a go at compiling my system with > 4.9.2 and C++11 so that I could give some feedback to the community. So far > you've been far more helpful than any of the other failed compilations I've > tried to follow up on (rcs and qtscript) and for that I'm grateful. You really shouldn't add -std=gnu++11 to your CFLAGS because some packages just don't compile under that standard. (Unless of course, you're testing.) The whole incompatible c++11 thing mostly hits gentoo because we support multiple versions of gcc on a system, and so can get mix c++11 abis. That's not what's happening here though. It looks like xapian-1.2.19 just breaks with C++11 at the syntax level. After all you have a pure gcc-4.9.2 and c++11 system and yet it still doesn't compile.
(In reply to Grahame from comment #1) > CFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11" > CXXFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11 -std=gnu++11" Oh, I didn't notice these -std settings in CFLAGS and CXXFLAGS before. You should remove those settings and rebuild all your C++ packages before you file any more bugs.
(In reply to Zac Medico from comment #15) > (In reply to Grahame from comment #1) > > CFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11" > > CXXFLAGS="-O2 -march=prescott -mtune=prescott -pipe -std=gnu11 -std=gnu++11" > > Oh, I didn't notice these -std settings in CFLAGS and CXXFLAGS before. You > should remove those settings and rebuild all your C++ packages before you > file any more bugs. Yeah. I think he was just playing around, but this is not *the* bug.
Created attachment 400098 [details, diff] xapian-1.3.1-r1_c++11-fix.patch This is a C++11 syntax addition that is intentionally not backwards-compatible. I've fixed it (add spaces around the quotes) and it now compiles fine for me with -std=c++11: libtool: compile: x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I./common -I./include -fshow-column -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -fvisibility=hidden -march=corei7-avx -O2 -pipe -std=c++11 -c queryparser/queryparser_internal.cc -fPIC -DPIC -o queryparser/.libs/queryparser_internal.o
Created attachment 400102 [details, diff] xapian-1.3.1-r1_c++11-fix.patch Sorry, previous patch unnecessarily renamed one macro argument.
(In reply to Ted Tanberry from comment #18) > Created attachment 400102 [details, diff] [details, diff] > xapian-1.3.1-r1_c++11-fix.patch > > Sorry, previous patch unnecessarily renamed one macro argument. This is against 1.3.1. What about 1.2.19? Anyhow, since we're not really proceeding to fix packages that build under c++98 to build under c++11, i'm not sure I want to carry this patch. Maybe take it directly usptream?
follow along in bug 550432 for details on revdep-rebuild *** This bug has been marked as a duplicate of bug 547788 ***