Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689282 - sci-libs/tensorflow-1.14 with dev-libs/jsoncpp-1.9 - In file included from tensorflow/core/platform/cloud/gcs_file_system.cc:29: bazel-out/host/genfiles/external/jsoncpp_git/include/json/config.h:127:10: fatal error: allocator.h: No such file or directory
Summary: sci-libs/tensorflow-1.14 with dev-libs/jsoncpp-1.9 - In file included from te...
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:
: 689238 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-04 16:47 UTC by Harris Landgarten
Modified: 2019-08-06 15:10 UTC (History)
4 users (show)

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


Attachments
build log (build.log,228.15 KB, text/x-log)
2019-07-07 10:10 UTC, janjitse
Details
tensorflow-jsoncpp-1.9.patch (jsoncpp-1.9-gb689282-c8.patch,377 bytes, patch)
2019-07-31 07:45 UTC, Jouni Kosonen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2019-07-04 16:47:31 UTC
build fails after upgrade from jsoncpp-1.8.4 to 1.9

Execution platform: @bazel_tools//platforms:host_platform
In file included from bazel-out/host/genfiles/external/jsoncpp_git/include/json/autolink.h:9,
                 from bazel-out/host/genfiles/external/jsoncpp_git/include/json/json.h:9,
                 from tensorflow/core/platform/cloud/gcs_file_system.cc:29:
bazel-out/host/genfiles/external/jsoncpp_git/include/json/config.h:127:10: fatal error: allocator.h: No such file or directory
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-07-05 16:15:08 UTC
1) Please attach the entire build log to this bug report.
2) Please post your `emerge --info` output in a comment.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-07-05 16:22:23 UTC
*** Bug 689238 has been marked as a duplicate of this bug. ***
Comment 3 janjitse 2019-07-07 10:10:43 UTC
Created attachment 582122 [details]
build log

Same issue here. Attached build.log
emerge --info (note, lto is disabled for tensorflow using custom package.env):

Portage 2.3.68 (python 3.6.8-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.1.0, glibc-2.29-r2, 5.1.12-gentoo x86_64)
=================================================================
System uname: Linux-5.1.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700K_CPU_@_4.00GHz-with-gentoo-2.6
KiB Mem:    32905500 total,  25202120 free
KiB Swap:   18874364 total,  18874364 free
Timestamp of repository gentoo: Fri, 05 Jul 2019 17:00:01 +0000
Head commit of repository gentoo: d61d24f4818eef45f8e7ba2e4a7c508ad5bdfb43
sh bash 5.0_p7
ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16-r100::sage-on-gentoo, 3.6.8::Local, 3.7.3::Local
dev-util/cmake:           3.14.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::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.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

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

Local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

archenroot
    location: /var/lib/layman/archenroot
    masters: gentoo
    priority: 50

atom
    location: /var/lib/layman/atom
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

games-overlay
    location: /var/lib/layman/games-overlay
    masters: gentoo
    priority: 50

interactive-fiction
    location: /var/lib/layman/interactive-fiction
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    masters: gentoo science
    priority: 50

sakaki-tools
    location: /var/lib/layman/sakaki-tools
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

Installed sets: @toolchain
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -flto=8 -fuse-linker-plugin -pipe"
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/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=native -flto=8 -fuse-linker-plugin -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/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="-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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://mirror.netcologne.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_US.utf-8"
LC_ALL="en_US.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -O2 -march=native -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -flto=8 -fuse-linker-plugin"
LINGUAS="en en-US nl"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/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 activities alsa amd64 avx avx2 berkdb bluetooth boost branding btrfs bzip2 c++0x cairo caps cdda cdr clang cli crypt cryptsetup cuda cups cxx dbus declarative dhclient dri dts dvd dvdr emboss encode exif extraengine fam fat ffmpeg flac flash fontconfig gdbm gif git glamor gmp gpg gpm graphics graphite gtk iconv icu inotify ipv6 jpeg jpeg2k kdbus kde kipi kwallet latex lcms ldap libnotify libtirpc linguas_en linguas_nl lto luatex lzma lzo mad mathml mmx mng mono mp3 mp4 mpeg mpx multilib ncurses nls nptl ntfs ogg openal opencv opengl openmp pam pango pcre pdf phonon plasma plymouth png policykit ppds pulseaudio python qml qt5 r600-llvm-compiler readline s3tc science sdl seccomp semantic-desktop spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification steamfonts streaming subversion svg systemd tcpd theora threads tiff trayicon truetype udev udisks unicode upower usb vaapi vdpau vlc vorbis vpx widevine widgets wxwidgets x264 x265 xa xattr xcb xcomposite xetex xml xv xvid zlib" ABI_X86="64" 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 sse sse2 ssse3 sse3 sse4_1 sse4_2 mmxext avx avx2 aes fma3 mpx" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en_US nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 pypy python3_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Martin H 2019-07-11 06:02:34 UTC
I was hit by this as well. Confirming that jsoncpp-1.9.0 breaks things. Either masking this version of jsoncpp or setting the dependency in the tensorflow ebuild to ~jsoncpp-1.8.4 resolved this error.
Comment 5 Fredrik Fyring 2019-07-20 08:06:04 UTC
(In reply to Martin H from comment #4)
> I was hit by this as well. Confirming that jsoncpp-1.9.0 breaks things.
> Either masking this version of jsoncpp or setting the dependency in the
> tensorflow ebuild to ~jsoncpp-1.8.4 resolved this error.

Hi,

I have the same error. Unfortunately masking jsoncpp, forcing a downgrade to jsoncpp-1.8.4 does not resolve things for me but the same error remains.
Comment 6 Fredrik Fyring 2019-07-21 07:33:53 UTC
(In reply to Fredrik Fyring from comment #5)
> (In reply to Martin H from comment #4)
> > I was hit by this as well. Confirming that jsoncpp-1.9.0 breaks things.
> > Either masking this version of jsoncpp or setting the dependency in the
> > tensorflow ebuild to ~jsoncpp-1.8.4 resolved this error.
> 
> Hi,
> 
> I have the same error. Unfortunately masking jsoncpp, forcing a downgrade to
> jsoncpp-1.8.4 does not resolve things for me but the same error remains.

Sorry, was a bit quick. I now have another error, but still related to allocator in jsoncpp:

ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7/tensorflow/cc/BUILD:492:1: Linking of rule '//tensorflow/cc:ops/string_ops_gen_cc' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7-bazel-base/execroot/org_tensorflow && \
  exec env - \
    PATH=/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/python3.7/bin:/usr/lib/portage/python3.7/ebuild-helpers/xattr:/usr/lib/portage/python3.7/ebuild-helpers:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/subversion/bin:/opt/cuda/bin \
    PWD=/proc/self/cwd \
  external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc @bazel-out/host/bin/tensorflow/cc/ops/string_ops_gen_cc-2.params)
Execution platform: @bazel_tools//platforms:host_platform
/usr/bin/ld: /usr/lib64/libjsoncpp.so.19: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'

 



(In reply to Fredrik Fyring from comment #5)
> (In reply to Martin H from comment #4)
> > I was hit by this as well. Confirming that jsoncpp-1.9.0 breaks things.
> > Either masking this version of jsoncpp or setting the dependency in the
> > tensorflow ebuild to ~jsoncpp-1.8.4 resolved this error.
> 
> Hi,
> 
> I have the same error. Unfortunately masking jsoncpp, forcing a downgrade to
> jsoncpp-1.8.4 does not resolve things for me but the same error remains.
Comment 7 Jouni Kosonen 2019-07-31 07:04:21 UTC
This is still happening with dev-libs/jsoncpp-1.9.1, currently going stable in bug 690878 :

Execution platform: @bazel_tools//platforms:host_platform
In file included from tensorflow/contrib/cloud/kernels/gcs_config_ops.cc:18:
In file included from bazel-out/k8-opt/bin/external/jsoncpp_git/include/json/json.h:9:
In file included from bazel-out/k8-opt/bin/external/jsoncpp_git/include/json/autolink.h:9:
bazel-out/k8-opt/bin/external/jsoncpp_git/include/json/config.h:132:10: fatal error: 'allocator.h' file not found
#include "allocator.h"
         ^~~~~~~~~~~~~
1 error generated.
Comment 8 Jouni Kosonen 2019-07-31 07:45:14 UTC
Created attachment 585226 [details, diff]
tensorflow-jsoncpp-1.9.patch

jsoncpp-1.9* unconditionally #includes "allocator.h" in the unamalgamated config, jsoncpp-1.8.4 didn't. 

Tensorflow doesn't point the compilation machinery to the existing headers, it softlinks the list of required headers to its own source tree and "allocator.h" is not on the list. 

I think the attached patch to tensorflow should be enough to fix the situation, but it'll take quite a few hours to verify on my machine. The file existed already with jsoncpp-1.8.4, it just didn't get used, so this shouldn't break anything.
Comment 9 Jouni Kosonen 2019-07-31 22:38:49 UTC
Confirming that the patch in comment 8 above did allow tensorflow-1.14 to build here against jsoncpp-1.9.1.

Protip: if you have net-libs/google-cloud-cpp installed and then bump up net-libs/grpc to a new minor version, rebuild net-libs/google-cloud-cpp afterwards unless you enjoy wasting a few hours on tensorflow rebuild that then fails because the classes and typedefs of those two conflict. With an API that volatile 
net-libs/google-cloud-cpp really needs a subslot dependency on net-libs/grpc.
Comment 10 Jura 2019-08-01 18:20:07 UTC
> Sorry, was a bit quick. I now have another error, but still related to
> allocator in jsoncpp:
> 
> ERROR:
> /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7/
> tensorflow/cc/BUILD:492:1: Linking of rule
> '//tensorflow/cc:ops/string_ops_gen_cc' failed (Exit 1):
> crosstool_wrapper_driver_is_not_gcc failed: error executing command 
>   (cd
> /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7-
> bazel-base/execroot/org_tensorflow && \
>   exec env - \
>    
> PATH=/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/python3.7/bin:/usr/lib/
> portage/python3.7/ebuild-helpers/xattr:/usr/lib/portage/python3.7/ebuild-
> helpers:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/local/sbin:/usr/local/
> bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/subversion/bin:/opt/
> cuda/bin \
>     PWD=/proc/self/cwd \
>  
> external/local_config_cuda/crosstool/clang/bin/
> crosstool_wrapper_driver_is_not_gcc
> @bazel-out/host/bin/tensorflow/cc/ops/string_ops_gen_cc-2.params)
> Execution platform: @bazel_tools//platforms:host_platform
> /usr/bin/ld: /usr/lib64/libjsoncpp.so.19: undefined reference to
> `std::__cxx11::basic_ostringstream<char, std::char_traits<char>,
> std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
> 

I have same problem with jsoncpp-1.9.1 and tensorflow-jsoncpp-1.9.patch:

ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7/tensorflow/cc/BUILD:492:1: Linking of rule '//tensorflow/cc:ops/random_ops_gen_cc' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7-bazel-base/execroot/org_tensorflow && \
  exec env - \
    PATH=/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/python3.7/bin:/usr/lib/portage/python3.7/ebuild-helpers/xattr:/usr/lib/portage/python3.7/ebuild-helpers:/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/opt/cuda/bin \
    PWD=/proc/self/cwd \
  external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc @bazel-out/host/bin/tensorflow/cc/ops/random_ops_gen_cc-2.params)
Execution platform: @bazel_tools//platforms:host_platform
/usr/bin/ld: /usr/lib64/libjsoncpp.so.21: 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
Comment 11 Larry the Git Cow gentoo-dev 2019-08-03 12:04:41 UTC
The bug has been closed via the following commit(s):

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

commit b684f751b6ad2029191c65b50ce0eacc4de001a3
Author:     Jason Zaman <perfinion@gentoo.org>
AuthorDate: 2019-08-02 14:21:01 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2019-08-03 11:55:38 +0000

    sci-libs/tensorflow-1.14.0-r1: Fix build issues
    
    - Header paths were mangled
    - Jsoncpp-1.9 build error
    - Newer GRPC needed a bumped google-cloud-cpp dep
    - Build failed with python2 if future was not installed
    - Add tensorflow_cc pkgconfig file
    
    Closes: https://bugs.gentoo.org/688594
    Closes: https://bugs.gentoo.org/689282
    Closes: https://bugs.gentoo.org/690212
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 ...ll_headers-fix-paths-of-generated-headers.patch | 38 ++++++++++++++++++
 ...jsoncpp-update-header-symlinks-for-jsoncp.patch | 27 +++++++++++++
 ...g-generate-tensorflow_cc-pkg-config-entry.patch | 46 ++++++++++++++++++++++
 ...source-builtins-does-not-exist-in-python2.patch | 25 ++++++++++++
 ...w-1.14.0.ebuild => tensorflow-1.14.0-r1.ebuild} | 16 +++++---
 5 files changed, 146 insertions(+), 6 deletions(-)