Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905673 - sci-libs/tensorflow-2.11.0 failed to rebuild with GCC 13 - tensorflow/tsl/lib/io/cache.h:99:11: error: 'uint64_t' does not name a type
Summary: sci-libs/tensorflow-2.11.0 failed to rebuild with GCC 13 - tensorflow/tsl/lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-13 922374
  Show dependency tree
 
Reported: 2023-05-04 04:32 UTC by Leonid Kopylov
Modified: 2024-02-24 12:52 UTC (History)
2 users (show)

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


Attachments
build.log.xz (build.log.xz,16.98 KB, text/plain)
2023-05-04 04:32 UTC, Leonid Kopylov
Details
build.log (build.log,250.77 KB, text/plain)
2024-01-12 20:16 UTC, Leonid Kopylov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Kopylov 2023-05-04 04:32:34 UTC
# emerge -pqv '=sci-libs/tensorflow-2.11.0::gentoo'
[ebuild   R   ] sci-libs/tensorflow-2.11.0  USE="mpi python xla -cuda" CPU_FLAGS_X86="avx avx2 fma3 sse sse2 sse3 sse4_1 sse4_2 -fma4" PYTHON_TARGETS="python3_10"

# emerge --info '=sci-libs/tensorflow-2.11.0::gentoo'
Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr, gcc-13, glibc-2.37-r2, 6.3.1-gentoo-amd64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.3.1-gentoo-amd64-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-12700-with-glibc2.37
KiB Mem:    32876056 total,  17875296 free
KiB Swap:    8388604 total,   7030264 free
Timestamp of repository gentoo: Wed, 03 May 2023 12:00:02 +0000
Head commit of repository gentoo: 2da1260abc24bdbfc13f760379e9a5f63b7bd156
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p4) 2.40.0
ccache version 4.8 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.1-r1::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.3::gentoo, 3.12.0_alpha7::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/ccache:           4.8::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.3-r1::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.3::gentoo
sys-devel/gcc:             12.2.1_p20230428-r1::gentoo, 13.1.0-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo, 15.0.7::gentoo, 16.0.3::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://server.kopylovs.net/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

HomeAssistantRepository
    location: /var/lib/layman/HomeAssistantRepository
    sync-type: laymansync
    sync-uri: https://git.edevau.net/onkelbeh/HomeAssistantRepository.git
    masters: gentoo
    priority: 50
    volatile: True

brave-overlay
    location: /var/lib/layman/brave-overlay
    sync-type: laymansync
    sync-uri: https://gitlab.com/jason.oliveira/brave-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

guru
    location: /var/lib/layman/guru
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA android AnyDesk-TOS geekbench google-chrome microsoft-edge Microsoft-vscode OPERA-2018 PUEL-11 RAR TeamViewer Vivaldi"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 -O2 -pipe -fomit-frame-pointer"
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 strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="https://mirror.isoc.org.il/pub/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j10"
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"
SHELL="/bin/bash"
USE="X a52 aac aalib accessibility acl acpi activities alsa amd64 ao appindicator archive aspell audit bash-completion berkdb bidi bluray boost branding brotli btrfs bzip2 cairo cdda cddb cdio cdr cgi cli colord contrib cron crypt cryptsetup cups curl dbi dbus designer device-mapper djvu doc dri dts dv dvb dvd dvdr eds emacs enchant encode evdev evo examples executable exif expat experimental extra extras fam fastcgi fbcon ffmpeg fftw firebird flac fluidsynth fontconfig fontforge fortran freetds ftp fuse games gcrypt gd gdbm gdk-pixbuf geoip geolocation gif git glade glib glusterfs gme gmp gnome gnome-keyring gnome-online-accounts gnuplot gnutls go gpg gphoto2 gpm graphite graphviz gsm gssapi gstreamer gtk gtk-doc gtk3 gui guile harfbuzz hdf5 heif highlight hscolour html http http2 ibus iconv icu idn imagemagick imap imlib introspection iodbc ios ipv6 jack java javascript jbig jemalloc jpeg jpeg2k jpegxl json kde kerberos ladspa lame latex lcms ldap libass libcaca libevent libglvnd libnotify libsamplerate libsecret libtirpc libxml2 lmdb lua lv2 lvm lz4 lzma lzo mad magic maildir man mbedtls mbox memcached midi mmap mms mng modplug mono mp3 mp4 mpeg mpi mplayer mssql mtp multilib multimedia musepack mysql nas nautilus ncurses netlink nettle network networkmanager nfs nls nptl nss ntlm odbc offensive ogg openal openexr opengl openmp openssl opus pam pango pcap pcre pdf perl phonon pkcs11 plasma plugins png policykit portaudio postgres postscript ppds pulseaudio python qdbm qml qrcode qt5 raw rdma readline redis rss samba sasl screencast sctp sdl seccomp semantic-desktop sftp share skey smp smtp snappy sndfile sndio snmp sound source sox speech speex spell sql sqlite ssh ssl startup-notification svg symlink syslog sysprof systemd taglib tbb tcl tcpd telemetry telepathy test-rust theora threads tiff tk tools tpm tracker tremor truetype twolame udev udisks unicode unwind upnp upower usb utils uuid v4l vala vcd vim-syntax vnc vorbis vpx wavpack wayland webengine webkit webp websockets widgets wmf wxwidgets x264 x265 xattr xcb xface xft xinerama xml xmp xpm xscreensaver xv xvid yaml zeroconf zip zlib zsh-completion zstd" ABI_X86="64 32" 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 stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha 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="efi-64" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en en-US he ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" 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_11" PYTHON_TARGETS="python3_11 python3_10" RUBY_TARGETS="ruby30 ruby31 ruby32" USERLAND="GNU" VIDEO_CARDS="fbdev vesa" 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, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sci-libs/tensorflow-2.11.0::gentoo was built with the following:
USE="mpi python xla -cuda" ABI_X86="(64)" CPU_FLAGS_X86="avx avx2 fma3 sse sse2 sse3 sse4_1 sse4_2 -fma4" PYTHON_TARGETS="python3_10"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -std=c++17"
Comment 1 Leonid Kopylov 2023-05-04 04:32:51 UTC
Created attachment 861111 [details]
build.log.xz
Comment 2 weikaik 2023-06-15 22:00:17 UTC
diff --git a/tensorflow/tsl/lib/io/cache.h.orig b/tensorflow/tsl/lib/io/cache.h
index f894c59..7b1cf32 100644
--- a/tensorflow/tsl/lib/io/cache.h.orig
+++ b/tensorflow/tsl/lib/io/cache.h
@@ -17,6 +17,7 @@ limitations under the License.
 #define TENSORFLOW_TSL_LIB_IO_CACHE_H_
 
 #include "tensorflow/tsl/platform/stringpiece.h"
+#include <cstdint>
 
 // A Cache is an interface that maps keys to values.  It has internal
 // synchronization and may be safely accessed concurrently from

this will do it
Comment 3 Leonid Kopylov 2023-07-09 16:02:03 UTC
(In reply to weikaik from comment #2)
> diff --git a/tensorflow/tsl/lib/io/cache.h.orig
> b/tensorflow/tsl/lib/io/cache.h
> index f894c59..7b1cf32 100644
> --- a/tensorflow/tsl/lib/io/cache.h.orig
> +++ b/tensorflow/tsl/lib/io/cache.h
> @@ -17,6 +17,7 @@ limitations under the License.
>  #define TENSORFLOW_TSL_LIB_IO_CACHE_H_
>  
>  #include "tensorflow/tsl/platform/stringpiece.h"
> +#include <cstdint>
>  
>  // A Cache is an interface that maps keys to values.  It has internal
>  // synchronization and may be safely accessed concurrently from
> 
> this will do it

apparently the same should be added also to:
tensorflow/lite/kernels/internal/spectrogram.cc

only after that it builds successfully with gcc 13
Comment 4 Leonid Kopylov 2023-07-11 03:52:37 UTC
on other machine had to add also for: tensorflow/tsl/platform/denormal.cc
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-03 02:21:39 UTC
Would someone mind attaching a full patch? It's a pain for me to unpack it all (I'm not its maintainer) with all the deps required.
Comment 6 Leonid Kopylov 2024-01-12 20:16:04 UTC
Created attachment 882148 [details]
build.log
Comment 7 Leonid Kopylov 2024-01-12 20:16:43 UTC
sci-libs/tensorflow-2.12.0 doesn't build
Comment 8 Larry the Git Cow gentoo-dev 2024-02-03 19:35:35 UTC
The bug has been referenced in the following commit(s):

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

commit 77b20ee55bb5699ecd496e3a68e27fb4d5399f03
Author:     wangjiezhe <wangjiezhe@gmail.com>
AuthorDate: 2024-01-21 08:07:44 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2024-02-03 19:33:04 +0000

    sci-libs/tensorflow: fixing build issue with gcc-13
    
    Tested on tensorflow-2.12/2.13/2.14/2.15 with USE="mpi python xla -cuda"
    and gcc-13.
    
    Bug: https://bugs.gentoo.org/905673
    
    Signed-off-by: wangjiezhe <wangjiezhe@gmail.com>
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 ...xing-build-issue-with-Clang-16-and-GCC-13.patch | 39 ++++++++++++++++++++++
 ...4.1-0014-Fixing-build-issue-with-Clang-16.patch | 25 ++++++++++++++
 sci-libs/tensorflow/tensorflow-2.11.0.ebuild       |  1 +
 sci-libs/tensorflow/tensorflow-2.12.0.ebuild       |  1 +
 sci-libs/tensorflow/tensorflow-2.13.1.ebuild       |  1 +
 sci-libs/tensorflow/tensorflow-2.14.1.ebuild       |  1 +
 6 files changed, 68 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2024-02-24 12:52:58 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(-)