Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710908 - ~dev-libs/jsoncpp-1.9.2-r2 ld: /usr/lib64/libjsoncpp.so.22: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
Summary: ~dev-libs/jsoncpp-1.9.2-r2 ld: /usr/lib64/libjsoncpp.so.22: undefined referen...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-26 19:54 UTC by Paul Bors
Modified: 2020-03-01 04:55 UTC (History)
1 user (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 Paul Bors 2020-02-26 19:54:43 UTC
sci-libs/tensorflow-2.1.0 fails to build with the "cuda" use-flag on due to link errors against jsoncpp

Reproducible: Always

Steps to Reproduce:
1. # emerge --sync
2. # echo "USE=${USE} cuda" >> /etc/portage/make.conf
3. # emerge sci-libs/tensorflow
Actual Results:  
ERROR: /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6/tensorflow/cc/BUILD:590:1: Linking of rule '//tensorflow/cc:ops/functional_ops_gen_cc' failed (Exit 1)
/usr/bin/ld: /usr/lib64/libjsoncpp.so.22: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 14612.883s, Critical Path: 197.29s
INFO: 6375 processes: 6375 local.
FAILED: Build did NOT complete successfully


Expected Results:  
Tensorflow to have installed (it does fine without the "cuda" use flag but my 4 GeForce GPUs are now worthless :)

This first showed up as https://bugs.gentoo.org/709444 but then I reinstalled Gentoo and only white listed ~amd64 as needed.

This bug came back the moment I enabled the "cuda" use flag.


# emerge -pqv '=sci-libs/tensorflow-2.1.0::gentoo'
[ebuild   R   ] sci-libs/tensorflow-2.1.0  USE="cuda* mpi python xla" CPU_FLAGS_X86="sse sse2 sse3 sse4_1 sse4_2 -avx -avx2 -fma3 -fma4" PYTHON_TARGETS="python3_6 -python3_7"=


# emerge --info '=sci-libs/tensorflow-2.1.0::gentoo'
Portage 2.3.84 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-9.2.0, glibc-2.29-r7, 4.19.97-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.97-gentoo-x86_64-Intel-R-_Celeron-R-_CPU_G3930_@_2.90GHz-with-gentoo-2.6
KiB Mem:    32903076 total,  11288852 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 25 Feb 2020 15:30:01 +0000
Head commit of repository gentoo: def937dfdf893fc4e2272fe81245636892da67d9
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

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

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ https://mirrors.rit.edu/gentoo/ https://mirror.sjc02.svwh.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli client colord crypt cuda cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu introspection ipv6 jpeg jpeg2k json lcms ldap libnotify libsecret libtirpc mad mbox mmx mng mongodb mp3 mp4 mpeg mpi multilib nautilus ncat ncurses ndiff networkmanager nls nping nptl nse nvidia ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt5 raw readline sasl sdl seccomp sendmail smtp spell split-usr spoof-source sse sse2 ssl startup-notification svg systemd tcpd tiff tools tracker truetype udev udisks unicode upower usb user-session vorbis wxwidgets x264 xattr xcb xla xml xv xvid xvmc zenmap zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel 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 sse sse2 aes pclmul popcnt 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="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev intel nvidia" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

sci-libs/tensorflow-2.1.0::gentoo was built with the following:
USE="mpi python xla -cuda" ABI_X86="(64)" CPU_FLAGS_X86="sse sse2 sse3 sse4_1 sse4_2 -avx -avx2 -fma3 -fma4" PYTHON_TARGETS="python3_6 -python3_7"
CFLAGS="-march=native -O2 -pipe -msse -msse2 -msse3 -msse4.1 -msse4.2"
CXXFLAGS="-march=native -O2 -pipe -msse -msse2 -msse3 -msse4.1 -msse4.2"
Comment 1 Paul Bors 2020-02-26 20:23:02 UTC
Can't attache full build.log due to 1MB file limit (Tensorflow generated a 15 MB build.log file). Below is the top and last few lines from it:


[32;01m * [39;49;00mPackage:    sci-libs/tensorflow-2.1.0
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mMaintainer: perfinion@gentoo.org
[32;01m * [39;49;00mUSE:        abi_x86_64 amd64 cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cuda elibc_glibc kernel_linux mpi python python_targets_python3_6 userland_GNU xla
[32;01m * [39;49;00mFEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 [33;01m*[0m TensorFlow 2.0 is a major release that contains some incompatibilities
 [33;01m*[0m with TensorFlow 1.x. For more information about migrating to TF2.0 see:
 [33;01m*[0m https://www.tensorflow.org/guide/migrate
 [32;01m*[0m python3_6: running count_impls
 [32;01m*[0m Checking for at least 5 GiB RAM ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Checking for at least 16 GiB disk space at "/var/tmp/portage/sci-libs/tensorflow-2.1.0/temp" ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
>>> Unpacking source...
>>> Unpacking tensorflow-2.1.0.tar.gz to /var/tmp/portage/sci-libs/tensorflow-2.1.0/work
>>> Unpacking tensorflow-patches-2.1.0.tar.bz2 to /var/tmp/portage/sci-libs/tensorflow-2.1.0/work
Copying oourafft2d-20061228.tgz to bazel distdir as fft2d.tgz
Copying eigen-4e696901f873a2347f76d931cf2f701e31e15d05.tar.gz to bazel distdir as eigen-4e696901f873a2347f76d931cf2f701e31e15d05.tar.gz
Copying abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f.tar.gz to bazel distdir as 43ef2148c0936ebf7cb4be6b19927a9d9d145b8f.tar.gz
Copying bazel-skylib.0.8.0.tar.gz to bazel distdir
Copying bazel_skylib-0.9.0.tar.gz to bazel distdir
Copying bazel-toolchains-92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz to bazel distdir as 92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz
Copying bazelbuild-rules_cc-0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip to bazel distdir as 0d5f3f2768c6ca2faca0079a997a97ce22997a0c.zip
Copying bazelbuild-rules_closure-308b05b2419edb5c8ee0471b67a40403df940149.tar.gz to bazel distdir as 308b05b2419edb5c8ee0471b67a40403df940149.tar.gz
Copying bazelbuild-rules_docker-v0.10.0.tar.gz to bazel distdir as rules_docker-v0.10.0.tar.gz
Copying bazelbuild-rules_swift.0.12.1.tar.gz to bazel distdir as rules_swift.0.12.1.tar.gz
Copying farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz to bazel distdir as 816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz
Copying gemmlowp-12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3.zip to bazel distdir as 12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3.zip
Copying highwayhash-fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz to bazel distdir as fd3d9af80465e4383162e4a7c5e2f406e82dd968.tar.gz
Copying re2-506cfa4bffd060c06ec338ce50ea3468daa6c814.tar.gz to bazel distdir as 506cfa4bffd060c06ec338ce50ea3468daa6c814.tar.gz
Copying kissfft-36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz to bazel distdir as 36dbc057604f00aacfc0288ddad57e3b21cfc1b8.tar.gz
Copying pybind11-v2.3.0.tar.gz to bazel distdir as v2.3.0.tar.gz
Copying llvm-ecc999101aadc8dc7d4af9fd88be10fe42674aa0.tar.gz to bazel distdir as ecc999101aadc8dc7d4af9fd88be10fe42674aa0.tar.gz
Copying nvidia-nccl-0ceaec9cee96ae7658aa45686853286651f36384.tar.gz to bazel distdir as 0ceaec9cee96ae7658aa45686853286651f36384.tar.gz
Copying cub-1.8.0.zip to bazel distdir as 1.8.0.zip
Copying ARM_NEON_2_x86_SSE-1200fe90bb174a6224a525ee60148671a786a71f.tar.gz to bazel distdir as 1200fe90bb174a6224a525ee60148671a786a71f.tar.gz
Copying tensorflow-1.15.0-python-license.rst.txt to bazel distdir as license.rst.txt
Copying backports.weakref-1.0rc1.tar.gz to bazel distdir
>>> Source unpacked in /var/tmp/portage/sci-libs/tensorflow-2.1.0/work
>>> Preparing source in /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0 ...
 [32;01m*[0m Applying tensorflow-1.15.0_rc0-0001-WORKSPACE-add-rules-docker-http_archive-bazel-toolch.patch ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying tensorflow-2.1.0-0001-Make-nccl-bindings-compilable-with-cuda-10.2.patch ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying tensorflow-2.1.0-0002-systemlibs-unbundle-pybind11.patch ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying tensorflow-2.1.0-external_libs.patch ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying tensorflow-2.1.0-python3.8-pywrap_tensor.patch ...
[A[141C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Will copy sources from /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0
 [32;01m*[0m python3_6: copying to /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0 ...
 [32;01m*[0m python3_6: running run_in_build_dir do_configure
 [32;01m*[0m Setting CUDA version: 10.2
 [32;01m*[0m Setting CUDNN version: 7.6
Extracting Bazel installation...

WARNING: ignoring LD_PRELOAD in environment.
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.29.1- (@non-git) installed.
Found CUDA 10.2 in:
    /opt/cuda/lib64
    /opt/cuda/include
Found cuDNN 7 in:
    /opt/cuda/lib64
    /opt/cuda/include


Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
	--config=mkl         	# Build with MKL support.
	--config=monolithic  	# Config for mostly static monolithic build.
	--config=ngraph      	# Build with Intel nGraph support.
	--config=numa        	# Build with NUMA support.
	--config=dynamic_kernels	# (Experimental) Build kernels into separate shared objects.
	--config=v2          	# Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
	--config=noaws       	# Disable AWS S3 filesystem support.
	--config=nogcp       	# Disable GCP support.
	--config=nohdfs      	# Disable HDFS support.
	--config=nonccl      	# Disable NVIDIA NCCL support.
Configuration finished
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0 ...
bazel --bazelrc=/var/tmp/portage/sci-libs/tensorflow-2.1.0/temp/bazelrc --output_base=/var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6-bazel-base build --nobuild //tensorflow:libtensorflow_framework.so //tensorflow:libtensorflow.so //tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package:build_pip_package
WARNING: ignoring LD_PRELOAD in environment.
[35mWARNING: [0m--batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
[32mINFO: [0mOptions provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=0
[32mINFO: [0mReading rc options for 'build' from /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6/.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --config=v2

...

INFO: From Compiling tensorflow/c/kernels/ops/bitcast.cc [for host]:
tensorflow/c/kernels/ops/bitcast.cc: In function 'void bitcast_shape_inference_fn(TF_ShapeInferenceContext*, TF_Status*)':
tensorflow/c/kernels/ops/bitcast.cc:49:12: warning: 'output_type_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
     size_t divisor_val = input_type_size / output_type_size;
            ^~~~~~~~~~~
tensorflow/c/kernels/ops/bitcast.cc:82:10: note: 'output_type_size' was declared here
   size_t output_type_size;
          ^~~~~~~~~~~~~~~~
tensorflow/c/kernels/ops/bitcast.cc:49:12: warning: 'input_type_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
     size_t divisor_val = input_type_size / output_type_size;
            ^~~~~~~~~~~
tensorflow/c/kernels/ops/bitcast.cc:81:10: note: 'input_type_size' was declared here
   size_t input_type_size;
          ^~~~~~~~~~~~~~~
INFO: From Compiling tensorflow/core/util/proto/proto_utils.cc [for host]:
tensorflow/core/util/proto/proto_utils.cc: In function 'bool tensorflow::proto_utils::IsCompatibleType(google::protobuf::FieldDescriptor::Type, tensorflow::DataType)':
tensorflow/core/util/proto/proto_utils.cc:70:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
INFO: From Compiling external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp: In member function 'std::pair<llvm::RuntimeDyldCheckerExprEval::EvalResult, llvm::StringRef> llvm::RuntimeDyldCheckerExprEval::evalNumberExpr(llvm::StringRef) const':
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:100:59: warning: 'Value' may be used uninitialized in this function [-Wmaybe-uninitialized]
     EvalResult(uint64_t Value) : Value(Value), ErrorMsg("") {}
                                                           ^
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:471:14: note: 'Value' was declared here
     uint64_t Value;
              ^~~~~
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp: In member function 'std::pair<llvm::RuntimeDyldCheckerExprEval::EvalResult, llvm::StringRef> llvm::RuntimeDyldCheckerExprEval::evalSliceExpr(const std::pair<llvm::RuntimeDyldCheckerExprEval::EvalResult, llvm::StringRef>&) const':
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:100:59: warning: 'Value' may be used uninitialized in this function [-Wmaybe-uninitialized]
     EvalResult(uint64_t Value) : Value(Value), ErrorMsg("") {}
                                                           ^
external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:471:14: note: 'Value' was declared here
     uint64_t Value;
              ^~~~~
ERROR: /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6/tensorflow/cc/BUILD:590:1: Linking of rule '//tensorflow/cc:ops/functional_ops_gen_cc' failed (Exit 1)
/usr/bin/ld: /usr/lib64/libjsoncpp.so.22: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 14612.883s, Critical Path: 197.29s
INFO: 6375 processes: 6375 local.
FAILED: Build did NOT complete successfully
 * ERROR: sci-libs/tensorflow-2.1.0::gentoo failed (compile phase):
 *   ebazel failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 4015:  Called ebazel 'build' '//tensorflow:libtensorflow_framework.so' '//tensorflow:libtensorflow.so'
 *   environment, line 2158:  Called die
 * The specific snippet of code:
 *       "${@}" || die "ebazel failed"
 * 
 * If you need support, post the output of `emerge --info '=sci-libs/tensorflow-2.1.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/tensorflow-2.1.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-libs/tensorflow-2.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/tensorflow-2.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6'
 * S: '/var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0'
Comment 2 Paul Bors 2020-02-26 20:30:38 UTC
I have tried to reinstall dev-libs/jsoncpp-1.9.2-r2 and no luck.
Comment 3 Jason Zaman gentoo-dev 2020-02-27 08:53:06 UTC
switch your main GCC to 8.3.0 then rebuild jsoncpp then you can switch back to normal GCC and build tensorflow
Comment 4 Paul Bors 2020-02-29 01:18:02 UTC
That passed the jsoncpp link error but only to have the package compile over night and be greeted by the following link error in the AM:

ERROR: /var/tmp/portage/sci-libs/tensorflow-2.1.0/work/tensorflow-2.1.0-python3_6/tensorflow/lite/toco/BUILD:436:1: Linking of rule '//tensorflow/lite/toco:toco' failed (Exit 1)
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libflatbuffers.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libflatbuffers.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status

I see this is also looking up /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/... when my default compiler is set back to 9.x

Few questions here:
1) Why would I have to stop down to GCC 8.x, compile a package, then reset to 9.x in order to emerge a package?
2) How can I fix this system wide? Should I uninstall GCC 8.x and then emerge -e @world?
Comment 5 Paul Bors 2020-03-01 04:54:36 UTC
I uninstalled GCC 8.x leaving just 9.x installed following the instructions at:
https://wiki.gentoo.org/wiki/Upgrading_GCC

Then got this error:
 * Messages for package sci-libs/tensorflow-2.1.0:

 * TensorFlow 2.0 is a major release that contains some incompatibilities
 * with TensorFlow 1.x. For more information about migrating to TF2.0 see:
 * https://www.tensorflow.org/guide/migrate
 * Only gcc version(s) 4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3 are supported,
 * of which none is installed
 * ERROR: sci-libs/tensorflow-2.1.0::gentoo failed (configure phase):
 *   Only gcc version(s) 4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3 are supported

That explains previouse errors I've been running into.
I'll downgrade back to 8.x, install TensorFlow and then upgrade back to 9.x (will keep GCC 8.x and 9.x as I had it previously).

Thus this is not a defect.