Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 773538

Summary: dev-libs/libebml-1.4.2 with gcc-11: src/EbmlString.cpp:147:41: error: ‘numeric_limits’ is not a member of ‘std’
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, sam
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/Matroska-Org/libebml/commit/f0bfd53
See Also: https://github.com/gentoo/gentoo/pull/19720
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    

Description Kobboi 2021-03-01 10:20:44 UTC
[11/25] /usr/bin/x86_64-pc-linux-gnu-g++ -Debml_EXPORTS -I. -I/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2  -O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -MD -MT CMakeFiles/ebml.dir/src/EbmlString.cpp.o -MF CMakeFiles/ebml.dir/src/EbmlString.cpp.o.d -o CMakeFiles/ebml.dir/src/EbmlString.cpp.o -c /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp
FAILED: CMakeFiles/ebml.dir/src/EbmlString.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -Debml_EXPORTS -I. -I/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2  -O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -MD -MT CMakeFiles/ebml.dir/src/EbmlString.cpp.o -MF CMakeFiles/ebml.dir/src/EbmlString.cpp.o.d -o CMakeFiles/ebml.dir/src/EbmlString.cpp.o -c /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp
/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp: In member function ‘virtual filepos_t libebml::EbmlString::ReadData(libebml::IOCallback&, libebml::ScopeMode)’:
/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp:147:41: error: ‘numeric_limits’ is not a member of ‘std’
  147 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr;
      |                                         ^~~~~~~~~~~~~~
/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp:147:67: error: expected primary-expression before ‘>’ token
  147 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr;
      |                                                                   ^
/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp:147:70: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  147 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize() + 1] : nullptr;
      |                                                                      ^~~
      |                                                                      std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.1/include/g++-v11/algorithm:62,
                 from /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/ebml/EbmlEndian.h:41,
                 from /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/ebml/EbmlTypes.h:38,
                 from /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/ebml/EbmlString.h:41,
                 from /var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp:38:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.1/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/var/tmp/portage/dev-libs/libebml-1.4.2/work/libebml-1.4.2/src/EbmlString.cpp:157:17: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
  157 |       delete [] Buffer;
      |                 ^~~~~~


Reproducible: Always
Comment 1 Ionen Wolkens gentoo-dev 2021-03-01 10:31:03 UTC
Fixed upstream, see $url
Comment 2 Kobboi 2021-03-01 10:35:51 UTC
Portage 3.0.16 (python 3.8.8-final-0, !../../var/db/repos/kobboi-linux/profiles/kobboi/samsonov, gcc-11.0.1, glibc-2.32-r8, 5.4.99 x86_64)
=================================================================
System uname: Linux-5.4.99-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-glibc2.2.5
KiB Mem:    32776896 total,   2044836 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 01 Mar 2021 09:37:09 +0000
Head commit of repository gentoo: c722d3a7e5f6f0eded0d5e694dcccab4fccaedeb

Timestamp of repository brother-overlay: Wed, 24 Feb 2021 15:55:57 +0000
Head commit of repository brother-overlay: 1e7eb433a7da12af962e5c36b072bbf2e7c0393b

Timestamp of repository gitlab: Sun, 28 Feb 2021 15:22:03 +0000
Head commit of repository gitlab: 6a3d61e56edbba60d5132c079e576f72bb95edf7

Head commit of repository kobboi-linux: c0b1a0f78e70e03be9e55d4a07a2bf70fed9ecc3

Timestamp of repository steam-overlay: Wed, 24 Feb 2021 15:55:35 +0000
Head commit of repository steam-overlay: 01ea47ce41b53b47958e557262eeb7faf85575f2

sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 4.2 [disabled]
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p7::gentoo, 3.7.10::gentoo, 3.8.8::gentoo, 3.9.2::gentoo
dev-util/ccache:          4.2::gentoo
dev-util/cmake:           3.19.6::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            11.0.1_pre9999::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

brother-overlay
    location: /var/db/repos/brother-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
    masters: gentoo

gitlab
    location: /var/db/repos/gitlab
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gitlab.git
    masters: gentoo

kobboi-linux
    location: /var/db/repos/kobboi-linux
    sync-type: git
    sync-uri: https://github.com/kobboi/kobboi-linux.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

Installed sets: @kobboi-all
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
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.0/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/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="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
DISTDIR="/usr/portage/distfiles"
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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://kobboi-linux:*password*@10.8.0.1/2020.11"
INSTALL_MASK="/usr/src/debug /usr/lib/debug"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="ftp://kobboi-linux:*password*@10.8.0.1/2020.11/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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth bzip2 cairo cdda cdr cli colord crypt cups dbus dist-kernel djvu dri dts dvd dvdr eds egl emboss encode evo exif facedetect ffmpeg flac fluidsynth fortran frei0r gdbm gif glade gles gles2 gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle gui iconv icu introspection ipv6 jpeg ladspa lcms libass libglvnd libnotify libsecret libtirpc lv2 lz4 lzma lzo mad midi mng modemmanager mono mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl ogg opencv opengl openmp opus pam pango pcre pdf png policykit ppds pulseaudio qt5 readline samba screencast sdl seccomp smartcard smp spell split-usr ssl startup-notification svg sysprof systemd tcpd tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="vesa radeon nvidia intel amdgpu dummy fbdev nouveau radeonsi v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Kobboi 2021-03-01 10:39:24 UTC
(In reply to Ionen Wolkens from comment #1)
> Fixed upstream, see $url

I suggest I make a PR for this? libebml does not have frequent releases.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-01 10:50:30 UTC
(In reply to Kobboi from comment #3)
> (In reply to Ionen Wolkens from comment #1)
> > Fixed upstream, see $url
> 
> I suggest I make a PR for this? libebml does not have frequent releases.

Go for it!
Comment 5 Larry the Git Cow gentoo-dev 2021-03-09 09:49:09 UTC
The bug has been closed via the following commit(s):

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

commit 91a20cf6c54e8fbf6b2961f1b786f1fc64e12561
Author:     Christophe Lermytte <christophe.lermytte@technicolor.com>
AuthorDate: 2021-03-01 12:31:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-09 09:47:33 +0000

    dev-libs/libebml: revbump for gcc-11 fix
    
    Patch source: https://github.com/Matroska-Org/libebml/commit/f0bfd53
    (I dropped the ChangeLog part as that depends on other commits to apply nicely)
    
    Signed-off-by: Christophe Lermytte <gentoo@lermytte.be>
    Closes: https://bugs.gentoo.org/773538
    Closes: https://github.com/gentoo/gentoo/pull/19720
    Thanks: Ionen Wolkens <sudinave@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libebml-1.4.2-header-fixes-for-gcc11.patch     | 35 ++++++++++++++++++++++
 dev-libs/libebml/libebml-1.4.2.ebuild              |  5 ++++
 2 files changed, 40 insertions(+)