tensorflow Fail in configuration due to different CUDA libraries path - Cplusplus

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 17.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 49f9c6f890c938955fa2d448ac5b556b9a6d9aa0
  • Python version: Python 3.5.3
  • Bazel version (if compiling from source): bazel release 0.6.1
  • CUDA/cuDNN version: CUDA 8, cuDNN 7
  • GPU model and memory: GeForce GTX 1080

Describe the problem

As for now, TF assumes that CUDA liibs are located at CUDA_PATH/lib64/, however Ubuntu installs CUDA to /usr/lib/x86_64-linux-gnu/, which makes configuration impossible: I can't specify cuda path such that it'll find /usr/lib/x86_64-linux-gnu/libcudart.so.8.0

Asked Oct 15 '21 12:10
avatar Randl
Randl

9 Answer:

Is the CUDA install path different in 17.04 vs. earlier versions of Ubuntu? It seems like if this affected all versions it wouldn't have gone unnoticed until now.

Another workaround is installing CUDA from the NVIDIA installer rather than using Ubuntu; then it will be installed into the correct location.

1
Answered Oct 24 '17 at 16:19
avatar  of ekelsen
ekelsen

I believe it is, because there were no problem with earlier versions of Ubuntu (I haven't tried 16.10 though) .

1
Answered Oct 24 '17 at 16:55
avatar  of Randl
Randl

Another option would be just to remove lib64 at configuration script ( https://github.com/tensorflow/tensorflow/blob/master/configure.py#L617 ) and to ask users give a full path to libcudart

1
Answered Nov 07 '17 at 08:11
avatar  of Randl
Randl

However, the nvcc isn't install to the same dir anymore too (it sits at /usr/bin/nvcc)

1
Answered Nov 07 '17 at 08:17
avatar  of Randl
Randl

It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

1
Answered Dec 20 '17 at 01:30
avatar  of tensorflowbutler
tensorflowbutler

It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

1
Answered Jan 03 '18 at 19:05
avatar  of tensorflowbutler
tensorflowbutler

@drpngx Well yeah, libcudart is still in /usr/lib/x86_64-linux-gnu/ and Tensorflow still wants /lib64/libcudart.so, which isn't generic enough IMHO

1
Answered Jan 07 '18 at 08:45
avatar  of Randl
Randl

@drpngx I don't have a clean fix, which probably should be allowing user to give full pathes to everything. However, I'm not familiar enough with the building system to make it work cleanly

1
Answered Jan 09 '18 at 06:09
avatar  of Randl
Randl

A member of the TensorFlow organization has replied after the stat:awaiting tensorflower label was applied.

1
Answered Jan 23 '18 at 23:17
avatar  of tensorflowbutler
tensorflowbutler