Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882617 - sci-libs/tensorflow-2.10.0 unable to merge (/usr/include/absl/container/internal/inlined_vector.h:907:97: error: expected ‘;’ before ‘}’ token)
Summary: sci-libs/tensorflow-2.10.0 unable to merge (/usr/include/absl/container/inter...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 922374
  Show dependency tree
 
Reported: 2022-11-23 17:57 UTC by Emile De Favas
Modified: 2024-02-24 12:52 UTC (History)
0 users

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


Attachments
Environment (environment,193.88 KB, text/plain)
2022-11-23 17:58 UTC, Emile De Favas
Details
Build log (build.log.gz,99.65 KB, application/octet-stream)
2022-11-24 13:03 UTC, Emile De Favas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emile De Favas 2022-11-23 17:57:35 UTC
Hi. I'm not able to emerge tensorflow

What I'm emerging:

[ebuild  N    ] sci-libs/tensorflow-2.10.0  USE="cuda python -mpi -xla" CPU_FLAGS_X86="avx sse sse2 sse3 sse4_1 sse4_2 -avx2 -fma3 -fma4" PYTHON_TARGETS="python3_10 -python3_8 -python3_9" 
[ebuild  N    ] sci-libs/keras-2.10.0  PYTHON_TARGETS="python3_10 -python3_8 -python3_9" 
[ebuild  N    ] sci-libs/tensorflow-estimator-2.10  PYTHON_TARGETS="python3_10 -python3_8 -python3_9" 

Emerge info

Portage 3.0.38.1 (python 3.10.8-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.36-r5, 6.0.9-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.0.9-gentoo-x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E3-1275_V2_@_3.50GHz-with-glibc2.36
KiB Mem:    16346300 total,   7708664 free
KiB Swap:   16776208 total,  16760336 free
Timestamp of repository gentoo: Wed, 23 Nov 2022 16:00:01 +0000
Head commit of repository gentoo: eb45667b514902819ee8fe4397362e0df1eb12c3
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r4::gentoo
dev-lang/python:           2.7.18_p16::gentoo, 3.10.8_p3::gentoo, 3.11.0_p2::gentoo
dev-lang/rust-bin:         1.65.0::gentoo
dev-util/cmake:            3.24.3::gentoo
dev-util/meson:            0.63.3::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r1::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.6-r1::gentoo, 15.0.3::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             15.0.3::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo, 15.0.3::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: 
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mfpmath=sse -m64 -falign-loops=2 -falign-functions=2 -falign-jumps=2 -fomit-frame-pointer -fforce-addr -mprefer-avx128 -mprefer-vector-width=128 -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -mfpmath=sse -m64 -falign-loops=2 -falign-functions=2 -falign-jumps=2 -fomit-frame-pointer -fforce-addr -mprefer-avx128 -mprefer-vector-width=128 -ftree-vectorize"
DISTDIR="/var/cache/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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native -mfpmath=sse -m64 -falign-loops=2 -falign-functions=2 -falign-jumps=2 -fomit-frame-pointer -fforce-addr -mprefer-avx128 -mprefer-vector-width=128 -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -mfpmath=sse -m64 -falign-loops=2 -falign-functions=2 -falign-jumps=2 -fomit-frame-pointer -fforce-addr -mprefer-avx128 -mprefer-vector-width=128 -ftree-vectorize"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
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"
RUSTFLAGS="-C target-cpu=native"
SHELL="/bin/bash"
USE="X Xaw3d a52 aac acl acpi alsa amd64 apng asm avr bluetooth branding bzip2 cacert cairo cdda cdr clang cli crypt cuda cups d dbus declarative device-lib dri driver dts dvd dvdr egl elogind encode evdev exif ffmpeg firmware flac fortran game gamepad games gdbm geoip geoip2 geoipv2 geolocation gif gles2 gles3 glew gmp gnome-online-accounts google googledrive gpl gpm gtk gtk3 gui hwaccel iconv icu id3tag introspection ipv6 jpeg json lcms libglvnd libnotify libtirpc lm-sensors lz4 lzip lzma mad matroska mcs51 midi minizip mng mod modplug mount mp3 mp4 mpeg multilib mysql ncurses networkmanager nfs nfsv4 nfsv41 nls non-free nptl numpy ogg opengl openmp pam pango pcre pdf pdfimport png policykit postproc postscript ppds pulseaudio python qml qt5 readline rsync rust rust-src rustfmt sdbinutils sdcdb sdcpp sdl seccomp sensord sensors server sftp spell spidermonkey split-usr sql sqlite ssh ssl startup-notification svg system-act system-av1 system-ffmpeg system-harfbuzz system-icu system-info system-jpeg system-libevent system-libvpx system-llvm system-lz4 system-png system-python-libs system-sqlite system-ssl system-tbb system-webp system-zlib tcl test-rust thread-names thread-safety threaded threads tiff timidity tk toolbar tools truetype twm udev udisks unicode upower usb vdpau vorbis vulkan wayland webchannel widgets wxwidgets x11extras x264 xattr xcb xfig xfs xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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="aes avx f16c mmx mmxext pclmul popcnt rdrand 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="fr" 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-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Emile De Favas 2022-11-23 17:58:59 UTC
Created attachment 836045 [details]
Environment

This is the environment in build directory
Comment 2 Mike Gilbert gentoo-dev 2022-11-24 01:44:56 UTC
Please attach the build log and change the status back to UNCONFIRMED.
Comment 3 Emile De Favas 2022-11-24 13:03:34 UTC
Created attachment 836389 [details]
Build log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-25 03:06:55 UTC
A>::Swap(absl::lts_20211102::inlined_vector_internal::Storage<T, N, A>*)’:
/usr/include/absl/container/internal/inlined_vector.h:907:97: error: expected ‘;’ before ‘}’ token
  907 |       allocated_ptr->SetAllocation(
      |                                                                                                 ^
      |                                                                                                 ;
/usr/include/absl/container/internal/inlined_vector.h:915:95: error: expected ‘;’ before ‘}’ token
  915 |     inlined_ptr->SetAllocation(
      |                                                                                               ^
      |                                 

I think it may be a dupe of bug 881445.
Comment 5 Alex 2023-03-09 22:19:37 UTC
I can confirm this error. Having the same trouble both on GCC 11 and GCC 12.

Python 3.10, Tensorflow 2.11.0

I wonder why this bug is still unconfirmed and with Tensorflow being a pretty major library.
Comment 6 Alex 2023-03-10 17:35:47 UTC
(In reply to Alex from comment #5)
> I can confirm this error. Having the same trouble both on GCC 11 and GCC 12.
> 
> Python 3.10, Tensorflow 2.11.0
> 
> I wonder why this bug is still unconfirmed and with Tensorflow being a
> pretty major library.

OK, I figured the root of the problem. C++ compiler is confused by a deep magic of templating somewhere and fails to deduce the type of expressions in the lines 907 and 915 of /usr/include/absl/container/internal/inlined_vector.h. This problem is resolved in upstream version of ABSL (by explicitly specifying the type of the expressions), so the easiest fix is to bump ABSL version in the repository.
Comment 7 Alex 2023-03-10 17:46:50 UTC
I created a bug report #900749 asking for a version bump for ABSL. Meanwhile, the workaround for this problem is to specify type of expressions in lines 907 and 915 as "Allocation<A>" (see https://github.com/abseil/abseil-cpp/blob/66bfca85c825a0c53254fa7f7787784099395d69/absl/container/internal/inlined_vector.h#L943 for an example).
Comment 8 Alex 2023-03-12 20:23:07 UTC
OK, after a bit of investigation it seems I was partially wrong.

The package what is needed is dev-cpp/abseil-cpp, not dev-python/absl-py.

And the required version dev-cpp/abseil-cpp:20220623 that has the required fix is present in the tree. However, for some reason Tensorflow ebuild depends on the older 20211102 (with which it can't be built), so it doesn't pull the update automatically and therefore build fails.

So, the solution would be to make tensorflow-2.11.0 to depend on dev-cpp/abseil-cpp:20220623.

I hope this will be fixed soon, and also that my discovery will help others with the same problem.
Comment 9 Larry the Git Cow gentoo-dev 2024-02-03 19:35:33 UTC
The bug has been referenced in the following commit(s):

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

commit d2ed3a1af052c5886b94a37efee34574114cabbf
Author:     wangjiezhe <wangjiezhe@gmail.com>
AuthorDate: 2024-01-20 05:39:25 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2024-02-03 19:32:42 +0000

    sci-libs/tensorflow: update dependencies
    
    tensorflow 2.11 and 2.12 need abseil-cpp>=20220623 built with C++17
    tensorflow-2.12 cannot compile with abseil-cpp-20230125.2
    stick to version 20220623
    
    Bug: https://bugs.gentoo.org/881445
    Bug: https://bugs.gentoo.org/882617
    Bug: https://bugs.gentoo.org/913731
    Bug: https://bugs.gentoo.org/915621
    
    Signed-off-by: wangjiezhe <wangjiezhe@gmail.com>
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 sci-libs/tensorflow/tensorflow-2.11.0.ebuild | 3 ++-
 sci-libs/tensorflow/tensorflow-2.12.0.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2024-02-24 12:52:39 UTC
The bug has been closed via the following commit(s):

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

commit f57039ebc84c40eddf9f6a63afbbf86a8b3c42da
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2024-02-24 12:47:06 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2024-02-24 12:47:06 +0000

    sci-libs/tensorflow: treeclean
    
    Bug: https://bugs.gentoo.org/807625
    Closes: https://bugs.gentoo.org/906609
    Closes: https://bugs.gentoo.org/905673
    Closes: https://bugs.gentoo.org/913731
    Closes: https://bugs.gentoo.org/882617
    Closes: https://bugs.gentoo.org/881445
    Closes: https://bugs.gentoo.org/915621
    Closes: https://bugs.gentoo.org/909002
    Closes: https://bugs.gentoo.org/705712
    Closes: https://bugs.gentoo.org/873295
    Closes: https://bugs.gentoo.org/907031
    Closes: https://bugs.gentoo.org/909003
    Closes: https://bugs.gentoo.org/909767
    Closes: https://bugs.gentoo.org/913534
    Closes: https://bugs.gentoo.org/818766
    Closes: https://bugs.gentoo.org/830167
    Closes: https://bugs.gentoo.org/854354
    Closes: https://bugs.gentoo.org/851573
    Closes: https://bugs.gentoo.org/780468
    Closes: https://bugs.gentoo.org/910029
    Closes: https://bugs.gentoo.org/897228
    Closes: https://bugs.gentoo.org/844196
    Closes: https://bugs.gentoo.org/910030
    Closes: https://bugs.gentoo.org/897230
    Closes: https://bugs.gentoo.org/788064
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 profiles/package.mask                              |   1 -
 sci-libs/tensorflow/Manifest                       |  57 --
 ...dd-rules-docker-http_archive-bazel-toolch.patch |  37 -
 ...emlib-Latest-absl-LTS-has-split-cord-libs.patch |  32 -
 ...Must-link-against-libm-for-round-and-log2.patch |  29 -
 ...ensorflow_cc-Add-systemlib-nsync-linkopts.patch |  35 -
 ...systemlib-Updates-for-Abseil-20220623-LTS.patch |  71 --
 ...0006-systemlib-Update-targets-for-absl_py.patch |  24 -
 ...temlib-Add-well_known_types_py_pb2-target.patch |  28 -
 ...-0008-Relax-setup.py-version-requirements.patch |  86 --
 ....0-0009-systemlib-update-targets-for-absl.patch | 365 --------
 ...010-systemlib-fix-missing-osx-in-pybind11.patch |  25 -
 ...temlib-fix-missing-LICENSE-in-flatbuffers.patch |  25 -
 ...nstallation-remove-cp_local_config_python.patch |  68 --
 ...2.15.0-0013-build-use-non-hermetic-python.patch | 990 ---------------------
 sci-libs/tensorflow/metadata.xml                   |  15 -
 sci-libs/tensorflow/tensorflow-2.15.0.ebuild       | 464 ----------
 17 files changed, 2352 deletions(-)