Tensorflow build "trick"

217 views
Skip to first unread message

mic...@google.com

unread,
Aug 21, 2016, 8:01:53 PM8/21/16
to bazel-discuss
Looking at

https://github.com/tensorflow/tensorflow/blob/master/boringssl.BUILD

I do not see where

# A trick to take the generated err_data.c from another package.
genrule(
name = "err_data_c",
srcs = ["//external:boringssl_err_data_c"],
outs = ["err_data.c"],
cmd = "cp $< $@",
)

sources err_data.c from. I see nothing (by bute force grep -r) that references boringssl_err_data_c. I don't see it in a bind or workspace. In fact, I only see boringssl being pulled in from tf_workspace() in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace.bzl

native.git_repository(
name = "boringssl_git",
remote = "https://github.com/google/boringssl.git",
commit = "bbcaa15b0647816b9a1a9b9e0d209cd6712f0105", # 2016-07-11
)

but as a git_repository, not a new_git_repository. So it this BUILD file used? If not, there seems to be no build file in the git pull at that commit.

I would like to learn how to add a file to a new_git_repository build which this seems to do but I am lost on what takes place. In the output from a build with -s I cannot see an cp but I do see the err_data.c being compiled. I would love a lesson:-)

Michiel.

Damien Martin-guillerez

unread,
Aug 22, 2016, 8:09:04 AM8/22/16
to mic...@google.com, bazel-discuss, wi...@google.com, v...@google.com
I believe there is an error in Tensorflow import of boringssl. Let's pull in some Tensorflow people to confirm, +Martin Wicke +Vijay Vasudevan

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/fa79e4fc-e1e6-4efd-b53a-43ecbb3778af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Johnston

unread,
Aug 22, 2016, 10:18:20 AM8/22/16
to bazel-discuss, mic...@google.com, wi...@google.com, v...@google.com
I'm not familiar with the tensorflow codebase, but there is a BUILD file and the err_data.c file in the repository at the referenced commit: https://github.com/google/boringssl/tree/bbcaa15b0647816b9a1a9b9e0d209cd6712f0105.  Since there is a BUILD file in the boringssl repository, it is correct to use git_repository and not new_git_repository.  Looks ok to me.  

Does not appear that boringssl.BUILD is being used in master though: https://github.com/tensorflow/tensorflow/search?utf8=%E2%9C%93&q=boringssl.BUILD

Maybe I missed something in your question though.  Hope it helps.

Vijay Vasudevan

unread,
Aug 22, 2016, 11:23:40 AM8/22/16
to Damien Martin-guillerez, Michiel Bacchiani, bazel-discuss, Martin Wicke, Derek Murray
+mrry

Derek Murray

unread,
Aug 22, 2016, 1:16:21 PM8/22/16
to Vijay Vasudevan, Damien Martin-guillerez, Michiel Bacchiani, bazel-discuss, Martin Wicke

On Mon, Aug 22, 2016 at 8:23 AM, Vijay Vasudevan <v...@google.com> wrote:
+mrry

On Mon, Aug 22, 2016, 5:09 AM Damien Martin-guillerez <dmar...@google.com> wrote:
I believe there is an error in Tensorflow import of boringssl. Let's pull in some Tensorflow people to confirm, +Martin Wicke +Vijay Vasudevan

On Mon, Aug 22, 2016 at 2:01 AM michiel via bazel-discuss <bazel-discuss@googlegroups.com> wrote:
Looking at

https://github.com/tensorflow/tensorflow/blob/master/boringssl.BUILD

I do not see where

# A trick to take the generated err_data.c from another package.
genrule(
    name = "err_data_c",
    srcs = ["//external:boringssl_err_data_c"],
    outs = ["err_data.c"],
    cmd = "cp $< $@",
)

sources err_data.c from. I see nothing (by bute force grep -r) that references boringssl_err_data_c. I don't see it in a bind or workspace. In fact, I only see boringssl being pulled in from tf_workspace() in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace.bzl

native.git_repository(
    name = "boringssl_git",
    remote = "https://github.com/google/boringssl.git",
    commit = "bbcaa15b0647816b9a1a9b9e0d209cd6712f0105",  # 2016-07-11
  )

but as a git_repository, not a new_git_repository. So it this BUILD file used? If not, there seems to be no build file in the git pull at that commit.

I would like to learn how to add a file to a new_git_repository build which this seems to do but I am lost on what takes place. In the output from a build with -s I cannot see an cp but I do see the err_data.c being compiled. I would love a lesson:-)

Michiel.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.

mic...@google.com

unread,
Aug 22, 2016, 1:26:22 PM8/22/16
to bazel-discuss, v...@google.com, dmar...@google.com, mic...@google.com, wi...@google.com, mr...@google.com
Thank you all, that clarifies things. I guess removing the unused boringssl.BUILD would help avoiding confusion on which SSL code is actually being used.

Michiel.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.

Martin Wicke

unread,
Aug 23, 2016, 1:22:39 PM8/23/16
to mic...@google.com, Damien Martin-guillerez, Derek Murray, Vijay Vasudevan, bazel-discuss
Is the file still there? It looks like it was deleted.

zhiwi...@gmail.com

unread,
Aug 31, 2016, 8:50:43 PM8/31/16
to bazel-discuss, mic...@google.com, dmar...@google.com, mr...@google.com, v...@google.com, wi...@google.com
I just downloaded latest tensorflow from https://github.com/tensorflow/tensorflow
I am using ubuntu 16.04, Cuda 7.5.18 Cudnn 5.0.5 with Nivdia GTX 1080.

I have to say it's really a bad experience to install tensorflow correctly. PIP doesn't work. Nvidia-Docker doesn't work. So I have to try to compile your source code exactly follow the steps on download and setup page.

Still fail!

WARNING: /home/oscargee/.cache/bazel/_bazel_oscargee/ebe04c2c209d8a23dec29074256d903e/external/boringssl_git/WORKSPACE:1: Workspace name in /home/oscargee/.cache/bazel/_bazel_oscargee/ebe04c2c209d8a23dec29074256d903e/external/boringssl_git/WORKSPACE (@boringssl) does not match the name given in the repository's definition (@boringssl_git); this will cause a build error in future versions.

What is this? And it does cause failure when I build it with bazel later. I don't see boringsll.BUILD but I did see boringsll folder and BUILD file inside it.

Please help!

or could you lease a read me for Ubuntu 16.04 + GTX1080? I am really tired to fight with those version conflicts. I don't need docker, don't need pip, don't need any other strange ways. Just give me a simple way to make it work. Thanks.

Reply all
Reply to author
Forward
0 new messages