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

Executing genrule @com_github_libevent_libevent #906

Closed
mshahriarinia opened this Issue Jun 1, 2018 · 11 comments

Comments

Projects
None yet
6 participants
@mshahriarinia
Copy link

mshahriarinia commented Jun 1, 2018

Creating a Tensorflow serving in docker according to Serving Inception Model with TensorFlow Serving and Kubernetes:

  • I use Dockerfile
  • Get and run the docker container:
$ docker build --pull -t $USER/tensorflow-serving-devel -f tensorflow_serving/tools/docker/Dockerfile.devel .
$ docker run --name=inception_container -it $USER/tensorflow-serving-devel
  • Get Tensorflow serving
$ git clone --recurse-submodules https://github.com/tensorflow/serving
  • Get Tensroflow
$ cd serving && git clone --recursive https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
$  ./configure

This complains that

You have bazel 0.5.4 installed.
Please upgrade your bazel installation to version 0.10.0 or higher to build TensorFlow!

So in the Dockerfile I modify ENV BAZEL_VERSION 0.5.4 to ENV BAZEL_VERSION 0.10.0 and redo the process, and configure according to all default values. Then

bazel test tensorflow_serving/...

and I get the error

ERROR: /root/.cache/bazel/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/external/com_github_libevent_libevent/BUILD.bazel:52:1: Executing genrule @com_github_libevent_libevent//:libevent-srcs failed (Exit 127)
./autogen.sh: 18: ./autogen.sh: aclocal: not found
INFO: Elapsed time: 4282.912s, Critical Path: 153.66s
FAILED: Build did NOT complete successfully

I haven't found anything regarding com_github_libevent_libevent Any suggestions?

@eurus-yu

This comment has been minimized.

Copy link

eurus-yu commented Jun 2, 2018

I have same problem!

@netfs

This comment has been minimized.

Copy link
Collaborator

netfs commented Jun 4, 2018

The Dockerfile does not have 'automake' and 'libtool' deb packages listed.

I will update the master branch with these shortly, until then you can add these two packages locally in the Dockerfile config and rebuild the image.

@mshahriarinia

This comment has been minimized.

Copy link
Author

mshahriarinia commented Jun 5, 2018

@netfs That was indeed the case as adding those two dependencies made the process keep going further. But I observe another strange error later on:

The process finishes by "Executed 2 out of 71 tests: 69 tests pass and 2 fail locally."

FAIL: //tensorflow_serving/util/net_http/server/internal:evhttp_request_test (see /root/.cache/bazel/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/execroot/tf_serving/bazel-out/k8-fastbuild/testlogs/tensorflow_serving/util/net_http/server/internal/evhttp_request_test/test.log)
FAIL: //tensorflow_serving/util/net_http/server/internal:evhttp_server_test (see /root/.cache/bazel/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/execroot/tf_serving/bazel-out/k8-fastbuild/testlogs/tensorflow_serving/util/net_http/server/internal/evhttp_server_test/test.log)

The two logs show:

root@5647334d48f9:~/serving# cat /root/.cache/bazel/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/execroot/tf_serving/bazel-out/k8-fastbuild/testlogs/tensorflow_serving/util/net_http/server/internal/evhttp_request_test/test.log
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
Running main() from test_main.cc
[==========] Running 5 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 5 tests from EvHTTPRequestTest
[ RUN      ] EvHTTPRequestTest.SimpleGETNotFound
[warn] getaddrinfo: address family for nodename not supported
[evhttp_server.cc : 217] RAW: Couldn't bind to port 0
Aborted

and

root@5647334d48f9:~/serving# cat /root/.cache/bazel/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/execroot/tf_serving/bazel-out/k8-fastbuild/testlogs/tensorflow_serving/util/net_http/server/internal/evhttp_server_test/test.log
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
-----------------------------------------------------------------------------
Running main() from test_main.cc
[==========] Running 6 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 6 tests from EvHTTPServerTest
[ RUN      ] EvHTTPServerTest.AcceptingTerminating
[warn] getaddrinfo: address family for nodename not supported
[evhttp_server.cc : 217] RAW: Couldn't bind to port 0
Aborted

I made sure the container can ping outside websites and get replies

apt-get update
apt-get install iputils-ping
ping www.google.com

So what could be causing Couldn't bind to port 0?

@netfs

This comment has been minimized.

Copy link
Collaborator

netfs commented Jun 5, 2018

thanks for reporting the test failures. this is due to our attempt to listen on ipv6:

in docker container that does not have ipv6 enabled. we should update
the code to not do that and work equally well in ipv4-only environment.

while we get the docker image/build issues resolved in this issue, can
you please file a separate issue for test failures (for better tracking).
will submit fixes against that issue, and have the tests pass.

netfs added a commit to netfs/serving that referenced this issue Jun 5, 2018

Fixes for tensorflow#906
  - Set Bazel min ver to 0.10.0 (matches with TensorFlow).
  - Add additional pkgs to Docker images to fix broken build.

PiperOrigin-RevId: 199304103
@netfs

This comment has been minimized.

Copy link
Collaborator

netfs commented Jun 5, 2018

fixed docker+bazel issues in master by:
daea4ec

feel free to reopen if the issue still persists

@netfs netfs closed this Jun 5, 2018

@Debasish-Das-CK

This comment has been minimized.

Copy link

Debasish-Das-CK commented Jun 11, 2018

Looks like my mac compilation is failing on this as well...Is it not suppose to work in mac ?

@lkluo

This comment has been minimized.

Copy link

lkluo commented Jun 12, 2018

same error with bazel 0.11.1

@Debasish-Das-CK

This comment has been minimized.

Copy link

Debasish-Das-CK commented Jun 12, 2018

are u building on mac OR through docker ?

@lkluo

This comment has been minimized.

Copy link

lkluo commented Jun 12, 2018

@Debasish-Das-CK: Neither, I am using CentOS.

@jiangcore

This comment has been minimized.

Copy link

jiangcore commented Jun 13, 2018

@netfs I met the same problem in Bazel 0.14 under Ubuntu.

ERROR: /home/shaozhi/.cache/bazel/_bazel_shaozhi/0dd579deea072292803a0dc9d494ddde/external/com_github_libevent_libevent/BUILD.bazel:52:1: Executing genrule @com_github_libevent_libevent//:libevent-srcs failed (Exit 127)
./autogen.sh: 18: ./autogen.sh: aclocal: not found

@netfs

This comment has been minimized.

Copy link
Collaborator

netfs commented Jun 13, 2018

since new release 1.8.0 (and this applies to master too), you need automake and libtool packages to build. see the complete dependencies here:

https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/setup.md

OR here:

RUN apt-get update && apt-get install -y \

(and if feasible, build using docker, so you dont have to worry about deps and bazel version).

liuqun pushed a commit to liuqun/tensorflow_serving_tools_docker that referenced this issue Jul 16, 2018

(split)Fixes for tensorflow/serving#906
  - Set Bazel min ver to 0.10.0 (matches with TensorFlow).
  - Add additional pkgs to Docker images to fix broken build.

PiperOrigin-RevId: 199304103

simon-mo pushed a commit to simon-mo/serving that referenced this issue Sep 2, 2018

Fixes for tensorflow#906
  - Set Bazel min ver to 0.10.0 (matches with TensorFlow).
  - Add additional pkgs to Docker images to fix broken build.

PiperOrigin-RevId: 199304103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.