Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909003 - sci-libs/tensorflow-2.12.0 +cuda Fails to build
Summary: sci-libs/tensorflow-2.12.0 +cuda Fails to build
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: 2023-06-22 17:08 UTC by Lemon Lime
Modified: 2024-02-24 12:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lemon Lime 2023-06-22 17:08:40 UTC
Tensorflow-2.12.0 +cuda Fails to build

The first error message I get is:
ERROR: An error occurred during the fetch of repository 'local_config_cuda':
   Traceback (most recent call last):
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 1437, column 38, in _cuda_autoconf_impl
		_create_local_cuda_repository(repository_ctx)
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 1111, column 27, in _create_local_cuda_repository
		cuda_libs = _find_libs(repository_ctx, check_cuda_libs_script, cuda_config)
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 635, column 21, in _find_libs
		_check_cuda_libs(repository_ctx, check_cuda_libs_script, check_cuda_libs_params.values())
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 530, column 28, in _check_cuda_libs
		checked_paths = execute(repository_ctx, [python_bin, "-c", cmd]).stdout.splitlines()
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/remote_config/common.bzl", line 230, column 13, in execute
		fail(
Error in fail: Repository command failed

The second error:
ERROR: /var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/WORKSPACE:25:14: fetching cuda_configure rule //external:local_config_cuda: Traceback (most recent call last):
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 1437, column 38, in _cuda_autoconf_impl
		_create_local_cuda_repository(repository_ctx)
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 1111, column 27, in _create_local_cuda_repository
		cuda_libs = _find_libs(repository_ctx, check_cuda_libs_script, cuda_config)
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 635, column 21, in _find_libs
		_check_cuda_libs(repository_ctx, check_cuda_libs_script, check_cuda_libs_params.values())
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/gpus/cuda_configure.bzl", line 530, column 28, in _check_cuda_libs
		checked_paths = execute(repository_ctx, [python_bin, "-c", cmd]).stdout.splitlines()
	File "/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.12.0/work/tensorflow-2.12.0-python3_11/third_party/remote_config/common.bzl", line 230, column 13, in execute
		fail(

Full emerge info:

emerge --info '=sci-libs/tensorflow-2.12.0::gentoo'
Portage 3.0.46 (python 3.11.4-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r8, 6.1.31-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.1.31-gentoo-dist-x86_64-Intel-R-_Core-TM-_i5-8400_CPU_@_2.80GHz-with-glibc2.36
KiB Mem:    16323896 total,    736836 free
KiB Swap:   25165820 total,  25162236 free
Timestamp of repository gentoo: Thu, 22 Jun 2023 12:00:01 +0000
Head commit of repository gentoo: ae7d31b67813927c5263a2d9c7211bc35693032b
Timestamp of repository dargor: Sun, 18 Jun 2023 15:02:02 +0000
Head commit of repository dargor: efe560b9341c8101262445ba294e2117293f75c7

Timestamp of repository guru: Tue, 20 Jun 2023 19:01:54 +0000
Head commit of repository guru: 2d943f8c292f2d061962f9b9a0f3124f31b3eead

Timestamp of repository science: Sun, 18 Jun 2023 21:02:00 +0000
Head commit of repository science: 720b7b1174f097be615bb2daaa0272fd597abc80

Timestamp of repository slonko: Thu, 22 Jun 2023 06:46:50 +0000
Head commit of repository slonko: 96d77bf20cfb5e397ab32ec2a1832aac6d144038

Timestamp of repository steam-overlay: Sat, 17 Jun 2023 10:17:28 +0000
Head commit of repository steam-overlay: 6d66cb6aaaeceafa8b4df65009bc5f851e6e7b01

Timestamp of repository vaacus: Wed, 21 Jun 2023 20:46:50 +0000
Head commit of repository vaacus: fb6a8401aeab8f8dc29d5e3bdf99920e18726ed5

Timestamp of repository xdch47: Sun, 18 Jun 2023 21:02:00 +0000
Head commit of repository xdch47: bd791a852d231653c35a97fd10a5cb5b7e635481

sh bash 5.1_p16-r4
ld GNU ld (Gentoo 2.39 p6) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r4::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           3.10.12::gentoo, 3.11.4::gentoo
dev-lang/rust-bin:         1.69.0::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.32::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.5::gentoo
sys-devel/gcc:             11.3.1_p20230427::gentoo, 12.2.1_p20230428-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.5::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r8::gentoo
Repositories:

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

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

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

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

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

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

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

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

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: 10
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/bin/startx /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -O2 -pipe"
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"
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="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://gentoo.c3sl.ufpr.br/ https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ https://mirror.ufro.cl/gentoo/ https://gentoo.osuosl.org/ https://mirrors.rit.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j4"
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 acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dist-kernel dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui ibus iconv icu ipv6 jpeg lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wxwidgets x264 xattr xcb xft 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 avx2 f16c fma3 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="ja" 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_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia" 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, 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
Comment 1 Denis Strizhkin 2023-10-13 00:33:07 UTC
I had problems compiling tensorflow with +cuda flag for Docker container. I think it maybe gcc version mismatch related. What helped in my cases was masking gcc 12 and 13 (then unmerging them) and recompiling world with gcc 11 then emerging tesnsorflow.
Comment 2 Maxim Fomin 2023-11-09 19:10:13 UTC
(In reply to Denis Strizhkin from comment #1)
> I had problems compiling tensorflow with +cuda flag for Docker container. I
> think it maybe gcc version mismatch related. What helped in my cases was
> masking gcc 12 and 13 (then unmerging them) and recompiling world with gcc
> 11 then emerging tesnsorflow.

I default to gcc11 and tensorflow still does not compile because of abseil-cpp errors like in these issues:

https://bugs.gentoo.org/913731

https://bugs.gentoo.org/915621
Comment 3 Larry the Git Cow gentoo-dev 2024-02-24 12:52:51 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(-)