Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 887037 - dev-db/mongodb fails with >=dev-libs/boost-1.81.0: src/third_party/s2/hash.h:8:23: error: invalid use of template-name ‘std::unordered_set’ without an argument list
Summary: dev-db/mongodb fails with >=dev-libs/boost-1.81.0: src/third_party/s2/hash.h:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords: PATCH
: 886495 (view as bug list)
Depends on:
Blocks: boost-1.83 boost-1.82
  Show dependency tree
 
Reported: 2022-12-18 18:52 UTC by Conrad Kostecki
Modified: 2023-08-12 09:01 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,466.06 KB, text/plain)
2022-12-18 18:54 UTC, Conrad Kostecki
Details
mongodb-4.4.10-boost-1.81.patch (mongodb-4.4.10-boost-1.81.patch,13.12 KB, patch)
2022-12-30 06:17 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2022-12-18 18:52:06 UTC
Compiling build/opt/mongo/db/query/killcursors_request.o
In file included from src/third_party/s2/s2.h:19,
                 from src/mongo/db/geo/s2.h:41,
                 from src/mongo/db/geo/big_polygon.h:34,
                 from src/mongo/db/geo/shapes.h:37,
                 from src/mongo/db/geo/geometry_container.h:34,
                 from src/mongo/db/index/expression_keys_private.cpp:42:
src/third_party/s2/hash.h:8:23: error: invalid use of template-name ‘std::unordered_set’ without an argument list
    8 | #define hash_set std::unordered_set
      |                       ^~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/unordered_set:47,
                 from src/third_party/abseil-cpp-master/abseil-cpp/absl/algorithm/container.h:50,
                 from src/third_party/abseil-cpp-master/abseil-cpp/absl/container/node_hash_map.h:43,
                 from src/mongo/stdx/unordered_map.h:34,
                 from src/mongo/base/string_data_comparator_interface.h:33,
                 from src/mongo/bson/bsonobj.h:42,
                 from src/mongo/db/index/expression_keys_private.h:34,
                 from src/mongo/db/index/expression_keys_private.cpp:32:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/unordered_set.h:97:11: note: ‘template<class _Value, class _Hash, class _Pred, class _Alloc> class std::unordered_set’ declared here
   97 |     class unordered_set
      |           ^~~~~~~~~~~~~
src/third_party/s2/hash.h:5:23: error: invalid use of template-name ‘std::unordered_map’ without an argument list
    5 | #define hash_map std::unordered_map
      |                       ^~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/unordered_map:47,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/functional:61,
                 from /usr/include/boost/utility/compare_pointees.hpp:15,
                 from /usr/include/boost/optional/optional.hpp:61,
                 from /usr/include/boost/optional.hpp:15,
                 from src/mongo/base/status_with.h:32,
                 from src/mongo/base/data_type.h:40,
                 from src/mongo/bson/bsonobj.h:40:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/unordered_map.h:102:11: note: ‘template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map’ declared here
  102 |     class unordered_map
      |           ^~~~~~~~~~~~~
scons: *** [build/opt/mongo/db/index/expression_keys_private.o] Error 1
Comment 1 Conrad Kostecki gentoo-dev 2022-12-18 18:52:25 UTC
Portage 3.0.41 (python 3.11.1-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.36-r6, 6.1.0-gentoo x86_64)
=================================================================
System uname: Linux-6.1.0-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_C2758_@_2.40GHz-with-glibc2.36
KiB Mem:    32854016 total,  29146000 free
KiB Swap:   34078716 total,  34078716 free
Timestamp of repository gentoo: Sun, 18 Dec 2022 12:45:01 +0000
Head commit of repository gentoo: dd675293c8b546a9feb10223d50280a040b2f7ec
sh bash 5.2_p15
ld GNU ld (Gentoo 2.39 p5) 2.39.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.7.4 [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.2_p15::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.9.16::gentoo, 3.10.9::gentoo, 3.11.1::gentoo
dev-lang/rust:             1.65.0::gentoo
dev-util/ccache:           4.7.4::gentoo
dev-util/cmake:            3.25.1::gentoo
dev-util/meson:            0.64.1::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             12.2.1_p20221210::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.6::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: --compress --exclude-from=/etc/portage/rsync_excludes --new-compress
    sync-rsync-verify-jobs: 1

crossdev
    location: /usr/local/crossdev
    masters: gentoo

galactica
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /opt/fhem /usr/share/gnupg/qualified.txt /var/lib/fhem /var/lib/unifi"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /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="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/systemd/* /etc/xinetd.d/* /usr/lib/systemd/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--sort-common -Wl,-z,now"
LEX="flex"
LINGUAS="de de_DE"
PKGDIR="/var/cache/binpkgs"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--compress --exclude-from=/etc/portage/rsync_excludes --new-compress"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X aalib acl alsa amd64 bash-completion berkdb bluetooth bzip2 cairo calendar caps cddb cgi cjk colord cracklib crypt cups curl cvs cxx dbus dga djvu dri dvb elogind encode exif fbcon fbcpm ffmpeg fftw filecaps flac fontconfig fortran ftp gd gdbm geolocation gif git gmp gnutls gphoto2 gpm graphviz gsm gstreamer iconv icu idn ieee1394 imap imlib inotify introspection ipv6 java javascript jbig jemalloc jit joystick jpeg jpeg2k latex lcms ldap libass libcaca libglvnd libnotify libsamplerate lm-sensors lua luajit lz4 lzma lzo mad magic maildir mbox mhash mikmod milter mmap modplug mono mp3 mysql mysqli ncurses networkmanager nls nntp offensive ogg openal openexr opengl openmp opus orc oss pam pcre pdf perl pie png policykit posix postgres postscript pulseaudio python raw readline rtmp samba sasl scanner sdl seccomp session slang slp smartcard sndfile snmp soap sockets sound sox speex spell split-usr sqlite ssl startup-notification subversion suid svg symlink syslog tcmalloc tcpd test-rust theora threads tiff truetype udev unicode usb v4l vaapi vcd vdpau verify-sig vhosts vim-syntax vnc vorbis wavpack wayland webkit webp wifi wmf x264 xattr xcb xface xft xinetd xml xmp xpm xscreensaver xv xvid zeroconf zip zlib zsh-completion zstd" ABI_X86="32 64" COLLECTD_PLUGINS="apcups battery buddyinfo capabilities cgroups check_uptime connectivity conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec fhcount filecount gps hddtemp hugepages interface ipc ipmi iptables irq load java mcelog md memory mysql netlink nfs nginx ntpd openldap openvpn pcie_errors ping postgresql procevent processes protocols rrdcached sensors serial smart snmp swap syslog tcpconns thermal turbostat unixsock uptime users wireless" CPU_FLAGS_X86="aes mmx mmxext rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt nmea0183" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="cfontzpacket crystalfontz glcd2usb hd44780 lcd2usb" LUA_SINGLE_TARGET="lua5-3" LUA_TARGETS="lua5-3 lua5-4" NGINX_MODULES_HTTP="access addition auth_basic autoindex brotli browser charset fancyindex fastcgi geo geoip geoip2 gunzip gzip gzip_static headers_more image_filter javascript limit_conn limit_req map metrics proxy realip referer rewrite secure_link sticky stub_status upload_progress upstream_keepalive vhost_traffic_status xslt" NGINX_MODULES_MAIL="imap pop3 smtp" NGINX_MODULES_STREAM="access geo geoip geoip2 javascript limit_conn map realip return ssl_preread" PHP_TARGETS="php7-4 php8-1 php8-2" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_11" RUBY_TARGETS="ruby30 ruby31" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="ast d3d12 fbdev"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Conrad Kostecki gentoo-dev 2022-12-18 18:54:36 UTC
Created attachment 843487 [details]
build.log
Comment 3 Agostino Sarubbo gentoo-dev 2022-12-25 08:02:36 UTC
dash_tinderbox has reproduced this issue with version 5.0.5-r2 - Updating summary.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-30 04:56:14 UTC Comment hidden (obsolete)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-30 05:40:12 UTC
I think https://github.com/boostorg/container/commit/99091420ae553b27345e04279fd19fe24fb684c1 is what exposes this?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-30 05:57:17 UTC
*** Bug 886495 has been marked as a duplicate of this bug. ***
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-30 06:17:20 UTC
Created attachment 845726 [details, diff]
mongodb-4.4.10-boost-1.81.patch

Please try the attached patch at runtime.
Comment 8 Leonid Kopylov 2022-12-30 09:07:46 UTC
(In reply to Sam James from comment #7)
> Created attachment 845726 [details, diff] [details, diff]
> mongodb-4.4.10-boost-1.81.patch
> 
> Please try the attached patch at runtime.

works for me
Comment 9 Conrad Kostecki gentoo-dev 2022-12-30 16:09:11 UTC
(In reply to Sam James from comment #7)
> Created attachment 845726 [details, diff] [details, diff]
> mongodb-4.4.10-boost-1.81.patch
> 
> Please try the attached patch at runtime.

I can confirm, patch works. MongoDB runtime works with UniFi fine.
Do you know, if that patch has been applied in newest upstream 4.4.18?
Last time I tried, it failed to compile.
Comment 10 Larry the Git Cow gentoo-dev 2022-12-30 20:22:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab2870232ca91c7537058c64caf2012d0a2945d8

commit ab2870232ca91c7537058c64caf2012d0a2945d8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-30 20:19:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-30 20:21:12 +0000

    dev-db/mongodb: fix build w/ boost 1.81
    
    Closes: https://bugs.gentoo.org/887037
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mongodb/files/mongodb-4.4.10-boost-1.81.patch  | 317 +++++++++++++++++++++
 dev-db/mongodb/mongodb-4.4.10-r1.ebuild            |   1 +
 dev-db/mongodb/mongodb-5.0.5-r2.ebuild             |   1 +
 3 files changed, 319 insertions(+)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-30 20:23:12 UTC
(In reply to Conrad Kostecki from comment #9)
> (In reply to Sam James from comment #7)
> > Created attachment 845726 [details, diff] [details, diff] [details, diff]
> > mongodb-4.4.10-boost-1.81.patch
> > 
> > Please try the attached patch at runtime.
> 
> I can confirm, patch works. MongoDB runtime works with UniFi fine.
> Do you know, if that patch has been applied in newest upstream 4.4.18?
> Last time I tried, it failed to compile.

no, sadly :(

Thank you both for testing!