Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721338 - sci-libs/tensorflow 2.1.0 missing autolink.h from jsoncpp (PATCH)
Summary: sci-libs/tensorflow 2.1.0 missing autolink.h from jsoncpp (PATCH)
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: PATCH
Depends on:
Blocks:
 
Reported: 2020-05-06 23:23 UTC by illule
Modified: 2020-10-09 03:50 UTC (History)
2 users (show)

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


Attachments
patch resolving tensorlfow 2.1 installation issue (tensorflow-2.1.0-099.patch,2.33 KB, patch)
2020-05-08 00:22 UTC, illule
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description illule 2020-05-06 23:23:25 UTC
Can't install tensorflow 2.1.0 with 1.9.3_pre20200412. bazel complains about missing autolink.h

An ugly workaround:

echo '#include "config.h"' > /usr/include/jsoncpp/json/autolink.h
Comment 1 illule 2020-05-08 00:22:42 UTC
Created attachment 636778 [details, diff]
patch resolving tensorlfow 2.1 installation issue

In order to successfully install tensorflow I had to had these to package.mask
   2   │ >=net-libs/grpc-1.28.1
   3   │ >=dev-python/grpc-1.28.0
   4   │ >=dev-python/grpcio-tools-1.28.1
And appply the attach patch
Comment 2 Simon Detheridge 2020-05-09 17:26:37 UTC
I had this problem also.

Looks like jsoncpp is the culprit, here. My system wants >=jsoncpp-1.9.2, but the only versions in Portage are 1.9.1, and 1.9.3_pre20200412 (which seems broken)

I resolved the issue by grabbing a copy of jsoncpp-1.9.2-r2.ebuild and dropping it into my local overlay. With that version installed, Tensorflow builds without issue.

I found the ebuild for 1.9.2 here: https://gitlab.com/liguros/core-kit/-/blob/3938cb4eb8810a50be217710079f0446df702307/dev-libs/jsoncpp/jsoncpp-1.9.2-r2.ebuild but that was just the first hit on Google.
Comment 3 Nathan 2020-05-12 19:15:33 UTC
This issue appears to persist in tensorflow 2.2.0_rc2. Reverting to:

net-libs/grpc-1.26.0-r1
dev-python/grpcio-tools-1.26.0
dev-libs/jsoncpp-1.9.2-r2 (custom ebuild as mentioned by Simon Detheridge)

seems to have fixed the problem.

Furthermore, when compiling with CUDA (dev-util/nvidia-cuda-toolkit), GCC <= 8.3 is required, which no longer seems to be a system default (17.1 profile). This creates its own set of problems; switching between GCC's makes reasoning about linking errors difficult.

I did not find the patch to be necessary in 2.2.0.
Comment 4 Nathan 2020-05-12 19:21:06 UTC
Could be related to bug 719274
Comment 5 Jason Zaman gentoo-dev 2020-10-09 03:50:47 UTC
This is fixed in TF-2.2 and 2.3 :)