dev-db/mongodb-2.0.2_rc0 fails to build. Reproducible: Always Steps to Reproduce: 1. emerge mognodb Actual Results: scripting/v8_db.cpp: In function 'v8::Handle<v8::FunctionTemplate> mongo::getTimestampFunctionTemplate(mongo::V8Scope*)': scripting/v8_db.cpp:131:33: error: variable 'proto' set but not used [-Werror=unused-but-set-variable] scripting/engine_v8.cpp: In member function 'v8::Local<v8::Object> mongo::V8Scope::mongoToV8(const mongo::BSONObj&, bool, bool)': scripting/engine_v8.cpp:1037:35: error: variable 'b' set but not used [-Werror=unused-but-set-variable] scripting/engine_v8.cpp:1063:35: error: variable 'sub' set but not used [-Werror=unused-but-set-variable] scripting/engine_v8.cpp: In member function 'v8::Handle<v8::Value> mongo::V8Scope::mongoToV8Element(const mongo::BSONElement&, bool)': scripting/engine_v8.cpp:1247:31: error: variable 'sub' set but not used [-Werror=unused-but-set-variable] cc1plus: all warnings being treated as errors scons: *** [scripting/v8_db.o] Error 1 cc1plus: all warnings being treated as errors scons: *** [scripting/engine_v8.o] Error 1 scons: building terminated because of errors. * ERROR: dev-db/mongodb-2.0.2_rc0 failed (compile phase): * escons failed. * * Call stack: * ebuild.sh, line 84: Called src_compile * environment, line 2529: Called escons '--cxx=x86_64-pc-linux-gnu-g++' '--use-system-all' '--sharedclient' '--usev8' 'all' * environment, line 1336: Called die * The specific snippet of code: * [[ ${ret} -ne 0 && ${EAPI:-0} -ge 4 ]] && die "escons failed."; * * If you need support, post the output of 'emerge --info =dev-db/mongodb-2.0.2_rc0', * the complete build log and the output of 'emerge -pqv =dev-db/mongodb-2.0.2_rc0'. * The complete build log is located at '/var/tmp/portage/dev-db/mongodb-2.0.2_rc0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-db/mongodb-2.0.2_rc0/temp/environment'. * S: '/var/tmp/portage/dev-db/mongodb-2.0.2_rc0/work/mongodb-mongo-ada33ce' * Messages for package dev-db/mongodb-2.0.2_rc0:
emerge --info =dev-db/mongodb-2.0.2_rc0 Portage 2.1.10.35 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.13-r4, 3.1.1-gen too x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.1.1-gentoo-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with- gentoo-2.1 Timestamp of tree: Fri, 18 Nov 2011 23:00:01 +0000 app-shells/bash: 4.2_p10 dev-lang/python: 2.7.2-r3 dev-util/cmake: 2.8.6-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.6.2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo betagarden stuff ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA skype-eula PUEL" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news para llel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-lo gs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru en" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclu de=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/betagarden /var/lib/layman/stuff" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X acl acpi alsa amd64 apng auto-hinter berkdb bzip2 cairo cl i consolekit cracklib cxx dbus device-mapper dga djvu dri enca encode exif extra s fuse gdbm git graphite gtk gtk3 gtkstyle hal hotkeys iconv icu idle jpeg jpeg2 k lastfm libnotify libsamplerate lxde mad mmx mmxext modules mp3 mpg123 mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre png polic ykit pppd qt3support radio rar readline savedconfig secure-delete session smp sq lite srv sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd threads tif f truetype udev unicode usb utp v4l v4l2 v8 vdpau vorbis xcb xorg xvmc zlib" ALS A_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens137 0 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="a ctions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_fil e authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user auto index 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 mi me_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan 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 fv1 8 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_ DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota 2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition t ee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_CO MMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS dos ~ # Repositories: gentoo betagarden stuff ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA skype-eula PUEL" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru en" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/betagarden /var/lib/layman/stuff" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X acl acpi alsa amd64 apng auto-hinter berkdb bzip2 cairo cli consolekit cracklib cxx dbus device-mapper dga djvu dri enca encode exif extras fuse gdbm git graphite gtk gtk3 gtkstyle hal hotkeys iconv icu idle jpeg jpeg2k lastfm libnotify libsamplerate lxde mad mmx mmxext modules mp3 mpg123 mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre png policykit pppd qt3support radio rar readline savedconfig secure-delete session smp sqlite srv sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb utp v4l v4l2 v8 vdpau vorbis xcb xorg 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 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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
emerge -pqv =dev-db/mongodb-2.0.2_rc0 [ebuild U ] dev-db/mongodb-2.0.2_rc0 [1.8.4-r1] USE="v8 -mms-agent -static-libs"
Created attachment 293061 [details] environment
Created attachment 293063 [details] build.log
What version of v8 do you have installed?
Created attachment 293109 [details, diff] mongodb-2.0-fix-scons.patch I've successfully built against dev-lang/v8-3.6.6.6. The build system seems to be using -Werror, which we shouldn't do. Updated our patch for this. It is still relevant to know what version you have installed. The easiest way to check this is either through portage or start `d8`
Yep, with dev-lang/v8-3.6.6.6 all fine.
(In reply to comment #7) > Yep, with dev-lang/v8-3.6.6.6 all fine. ..but what version did you run? This matters
I think it was prev version on ~amd64 ;)
Hmm... On my work machine mongodb still fail to build... emerge mongodb v8 -vpt These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ] dev-db/mongodb-2.0.2_rc0 [1.8.4-r1] USE="v8 -mms-agent -static-libs" 0 kB [ebuild R ] dev-lang/v8-3.6.6.6 0 kB Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 0 kB
I had forgotten that on the work machine as a compiler uses gcc 4.6.2 Most likely this is the problem.
(In reply to comment #11) > I had forgotten that on the work machine as a compiler uses gcc 4.6.2 Most > likely this is the problem. Then you should post a bug against mongodb here: http://jira.mongodb.org , please state gcc version, mongodb version and the offending output. Also feel free to link back here. Thanks a lot for your contribution so far!
I just compiled mongodb 2.0.2 rc0 manually using the gcc 4.6.2
Same problem for dev-db/mongodb-2.0.2_rc1
It looks like the patch is not applied correctly. Compile mongodb happened after I removed the file SConstruct adding -Werror flag
Created attachment 293593 [details, diff] Patch to fix problem
Suloev Dmitry: Thanks for the patch. If you look at my patch, it does indeed incorporate your patch. I had no issues building rc2 (rename rc1 to rc2) with this patch. On the other hand, I had no issues with rc1 either. By the way. Are you using dev-lang/v8-3.6.6.6 on your work machine, or perhaps some other version? If so, please report/scribble down before updating, and then try the newer. Thanks!
Hmmm... I still have problem! Still "-Werror=unused-but-set-variable" in options...
The Werror has been fixed since then. Please open a new bug if the new versions are affected.