building from source, lldb only produces python2.7 module

56 views
Skip to first unread message

Gary Miguel

unread,
Aug 21, 2020, 1:35:44 AM8/21/20
to sw...@tensorflow.org
Hi,
I am trying to build from source using the instructions here.
I managed to produce a toolchain, but it only has a python2.7 version of the lldb module, whereas I'd like to use python3.
Any tips on how to resolve this?
I found that there's a CMake invocation for lldb, and it seems the tensorflow toolchain build script sets `-DLLDB_ENABLE_PYTHON=ON`. I'm not sure what controls which version of the python package gets produced.

I'm on Ubuntu 20.04:
$ python --version
Python 2.7.18rc1
$ python3 --version
Python 3.8.2

I tried invoking the build script  a venv such that "python" resolved to python3, but that broke the build script early on with:
```
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):                                                                                                                                                                                 Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter)
```

BTW, the reason I'm building from source is to build tensorflow with a CUDA compute capability that matches my GPU (6.1). If there's an easier way to do this (e.g. just build tensorflow without rebuilding the whole toolchain?) please let me know.

Thanks

Marc Rasi

unread,
Aug 21, 2020, 7:13:44 PM8/21/20
to Gary Miguel, Swift for TensorFlow
Hi!

I think I might know what's happening. tldr: Undo this commit in the llvm-project repo: https://github.com/apple/llvm-project/commit/79e225c96c4791ba32817f40ec41270fc546fc7a

Explanation: lldb searches for known python versions. Until recently, 3.8 wasn't in the list so it falls back to a python2 version that it knows. I added 3.8 but then something unrelated broke around the same time so we reverted that change to see if it was the problem. It wasn't the problem so I'll go unrevert the change now.

--
To unsubscribe from this group and stop receiving emails from it, send an email to swift+un...@tensorflow.org.

Gary Miguel

unread,
Aug 22, 2020, 6:30:37 PM8/22/20
to Marc Rasi, Swift for TensorFlow
Thanks. This worked.
Reply all
Reply to author
Forward
0 new messages