Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing libtensorflow*.so.MAJOR links. #5435

Merged
merged 3 commits into from
Dec 17, 2019

Conversation

riga
Copy link
Contributor

@riga riga commented Dec 17, 2019

I noticed that the tests in PhysicsTools/TensorFlow are automatically linked to various libtensorflow*.so.MAJOR libs which appear to be missing in #5427 .
This PR adds them through new links, e.g.

libtensorflow_cc.so.2.0.0  # installed lib
libtensorflow_cc.so.2 -> libtensorflow_cc.so.2.0.0
libtensorflow_cc.so -> libtensorflow_cc.so.2

if [ ! -e $libdir/lib${l}.so ] ; then
[ -e $libdir/lib${l}.so.%{realversion} ] || exit 1
ln -s lib${l}.so.%{realversion} $libdir/lib${l}.so
Copy link
Contributor

@smuzaffar smuzaffar Dec 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you are at it, may be delete $libdir/lib${l}.so.%{majorversion} and always create symlink to lib${l}.so.%{realversion}. This will avoid duplicate files [a]

By the way, there is no need to do cd $libdir ; ln ... , ln -s lib${l}.so.%{realversion} $libdir/lib${l}.so should work :-)

[a]

-r-xr-xr-x 1 cmsbld cmsbld      7664 Dec 16 15:15 libcpu_function_runtime.so
-r-xr-xr-x 1 cmsbld cmsbld       112 Dec 16 15:15 libcpu_function_runtime.so-2.params
lrwxrwxrwx 1 cmsbld cmsbld        25 Dec 16 15:26 libtensorflow_cc.so -> libtensorflow_cc.so.2.0.0
-r-xr-xr-x 1 cmsbld cmsbld 161379080 Dec 16 15:02 libtensorflow_cc.so.2.0.0
-r-xr-xr-x 1 cmsbld cmsbld    312319 Dec 16 15:02 libtensorflow_cc.so.2.0.0-2.params
-r-xr-xr-x 1 cmsbld cmsbld  36165184 Dec 16 14:46 libtensorflow_framework.so
-r-xr-xr-x 1 cmsbld cmsbld  36165184 Dec 16 14:46 libtensorflow_framework.so.2
-r-xr-xr-x 1 cmsbld cmsbld  36165184 Dec 16 14:46 libtensorflow_framework.so.2.0.0
-r-xr-xr-x 1 cmsbld cmsbld    169854 Dec 16 14:35 libtensorflow_framework.so.2.0.0-2.params
lrwxrwxrwx 1 cmsbld cmsbld        22 Dec 16 15:26 libtensorflow.so -> libtensorflow.so.2.0.0
-r-xr-xr-x 1 cmsbld cmsbld 139098128 Dec 16 15:01 libtensorflow.so.2.0.0
-r-xr-xr-x 1 cmsbld cmsbld    311082 Dec 16 15:01 libtensorflow.so.2.0.0-2.params
-r-xr-xr-x 1 cmsbld cmsbld    107112 Dec 16 15:13 libtf2xla.so
-r-xr-xr-x 1 cmsbld cmsbld        87 Dec 16 15:12 libtf2xla.so-2.params
-r-xr-xr-x 1 cmsbld cmsbld     13696 Dec 16 15:15 libxla_compiled_cpu_function.so
-r-xr-xr-x 1 cmsbld cmsbld       125 Dec 16 15:15 libxla_compiled_cpu_function.so-2.params

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

[ -e $libdir/lib${l}.so.%{realversion} ] || exit 1
ln -s lib${l}.so.%{realversion} $libdir/lib${l}.so
fi
# link from majorversion to realversion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add the following here. Just to make sure that full version library exists and it is a file

[ -f  $libdir/lib${l}.so.%{realversion} ] || exit 1

@smuzaffar
Copy link
Contributor

looks good, thanks @riga

@smuzaffar smuzaffar merged commit 21cd559 into cms-sw:tensorflow-2.0 Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants