{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/623","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/623/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/623/events","html_url":"https://github.com/bazelbuild/bazel/issues/623","id":117675319,"number":623,"title":"TensorFlow Build issue with Bazel (Error: cycle in dependency graph)","user":{"login":"srsaharoy","id":15898662,"avatar_url":"https://avatars.githubusercontent.com/u/15898662?v=3","gravatar_id":"","url":"https://api.github.com/users/srsaharoy","html_url":"https://github.com/srsaharoy","followers_url":"https://api.github.com/users/srsaharoy/followers","following_url":"https://api.github.com/users/srsaharoy/following{/other_user}","gists_url":"https://api.github.com/users/srsaharoy/gists{/gist_id}","starred_url":"https://api.github.com/users/srsaharoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srsaharoy/subscriptions","organizations_url":"https://api.github.com/users/srsaharoy/orgs","repos_url":"https://api.github.com/users/srsaharoy/repos","events_url":"https://api.github.com/users/srsaharoy/events{/privacy}","received_events_url":"https://api.github.com/users/srsaharoy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bazelbuild/bazel/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-11-18T20:33:02Z","updated_at":"2016-01-12T13:28:15Z","closed_at":"2015-11-20T03:18:48Z","body":"Hi,\r\n\r\nI am opening this as a new issue as suggested by damienmg - the same issue has also been reported as a comment in https://github.com/bazelbuild/bazel/issues/587 and also discussed in https://github.com/bazelbuild/bazel/issues/596\r\n\r\nI am building TensorFlow from source. I am using commit 916370e (as suggested in https://github.com/bazelbuild/bazel/issues/596) for Bazel build - Bazel build goes fine.\r\n\r\nFor building TensorFlow, I had to update the WORKSPACE file (attached) to work-around for known proxy issue (as described in https://github.com/bazelbuild/bazel/issues/587 ) to use \"local_repository\".\r\n\r\nI am using Ubuntu 14.04; From my root (~/tensorflow) I use the following commands to build TensorFlow:\r\n\r\nbazel clean --expunge\r\n\r\nbazel build -c opt //tensorflow/cc:tutorials_example_trainer\r\n\r\nThe error that I get from \"bazel build ...\" command is as follows:\r\n\r\n```\r\n$ bazel build -c opt //tensorflow/cc:tutorials_example_trainer\r\n......\r\nERROR: /home/ssaharo/.cache/bazel/_bazel_ssaharo/64bf5fcc928610d1fc32c86de697b420/external/png_archive/BUILD:23:1: in genrule rule @png_archive//:configure: cycle in dependency graph:\r\n    //tensorflow/cc:tutorials_example_trainer\r\n    //tensorflow/core:tensorflow\r\n    //tensorflow/core:tensorflow_opensource\r\n    //tensorflow/core:core\r\n    //tensorflow/core:core_cpu\r\n    //tensorflow/core:framework\r\n    //tensorflow/core:lib\r\n    //tensorflow/core/platform/default/build_config:platformlib\r\n    @png_archive//:png\r\n  * @png_archive//:configure [self-edge].\r\nERROR: Loading of target '//tensorflow/cc:tutorials_example_trainer' failed; build aborted.\r\nERROR: Loading failed; build aborted.\r\nINFO: Elapsed time: 5.852s\r\n============================================\r\n```\r\n\r\nAttached are the WORKSPACE file that I am using, and also png.BUILD and jpeg.BUILD files that I think are somehow related to this issue - both png.BUILD & jpeg.BUILD are original files that come with download of TensorFlow source.\r\n\r\nAny help/suggestion would be very much appreciated\r\n\r\nThanks\r\n[jpeg.BUILD.txt](https://github.com/bazelbuild/bazel/files/38300/jpeg.BUILD.txt)\r\n[png.BUILD.txt](https://github.com/bazelbuild/bazel/files/38299/png.BUILD.txt)\r\n[WORKSPACE.txt](https://github.com/bazelbuild/bazel/files/38298/WORKSPACE.txt)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/170911510","html_url":"https://github.com/bazelbuild/bazel/issues/623#issuecomment-170911510","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/623","id":170911510,"user":{"login":"jeandut","id":11030901,"avatar_url":"https://avatars.githubusercontent.com/u/11030901?v=3","gravatar_id":"","url":"https://api.github.com/users/jeandut","html_url":"https://github.com/jeandut","followers_url":"https://api.github.com/users/jeandut/followers","following_url":"https://api.github.com/users/jeandut/following{/other_user}","gists_url":"https://api.github.com/users/jeandut/gists{/gist_id}","starred_url":"https://api.github.com/users/jeandut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeandut/subscriptions","organizations_url":"https://api.github.com/users/jeandut/orgs","repos_url":"https://api.github.com/users/jeandut/repos","events_url":"https://api.github.com/users/jeandut/events{/privacy}","received_events_url":"https://api.github.com/users/jeandut/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T13:28:15Z","updated_at":"2016-01-12T13:28:15Z","body":"I created a folder named fix and inside a folder named files in which I put the unzipped file re2-master. Fix is at the same level as tensorflow and .BUILD files.\r\nSo I have\r\n `/path/tensorflow\r\n/path/fix/files/re2`\r\netc.\r\nand in the WORKSPACE file the same as you do I need to move them up not to be in subfolders ?\r\nIs it the file re2-master the right one ?\r\n"}}