When I build with command "bazel build --config=cuda -c opt tensorflow_serving/..." ,it takes error:
ERROR: /opt/serving/tensorflow_serving/util/net_http/client/testing/BUILD:12:1: Linking of rule '//tensorflow_serving/util/net_http/client/testing:evhttp_echo_client' failed (Exit 1)
/usr/bin/ld: bazel-out/k8-opt/bin/external/com_google_absl/absl/time/libtime.a(duration.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Can anyone help me!
there are devel gpu docker images available here:
https://hub.docker.com/r/tensorflow/serving/tags/
(try tensorflow/serving:latest-devel-gpu). this will allow you to quickly bootstrap you devel environment for gpus. if docker is not an option, you can see the dependencies and compile steps in the dockerfile here (and try and replicate that in your environment manually):
just realized latest-devel-gpu is not published yet. will have it out by EOD.
I need to build tensorflow serving which integrated tensorrt.
My environments: ubuntu16.04 cuda 8.0 cudnn 7.0.5 TensorFlow-serving 1.8.0 TensorFlow 1.9.0 TensorRT 4.0.3
i pulled in (https://github.com/tensorflow/serving/pull/974) bunch of docker fixes from master that should fix your build issue. specifically the change to libevent.BUILD:
https://github.com/tensorflow/serving/pull/974/commits/9b26b41793321bb5cd9a7684e8f9a10cbc3d0ebc#diff-6b0a1c1839d8d8718c94e015963e8320
please try building from tip of r1.8 branch
@infichen I was caught up with the same error. I found the cause was that libm.so.6 was not automatically linked in the compiling process, so I added an linkopt in tensorflow_serving/util/net_http/client/testing/BUILD:
cc_binary(
...
linkopts = ["-lm"],
).
@Bucca1992 tensorflow_serving/util/net_http/client/testing/BUILD looks like below, but I still get the error, could you help me out? I used tensorflow-serving(master) + tensorflow(r1.10).
```
package(
default_visibility = [
"//tensorflow_serving:internal",
],
features = ["-layering_check"],
)
licenses(["notice"]) # Apache 2.0
cc_binary(
name = "evhttp_echo_client",
srcs = ["evhttp_echo_client.cc"],
deps = [
"//tensorflow_serving/util/net_http/client:evhttp_client",
],
linkopts = ["-lm"],
)
'''
the error like this:
'''ERROR: /tensorflow-serving/serving-r1.10/serving-r1.10/tensorflow_serving/util/net_http/server/testing/BUILD:12:1: Linking of rule '//tensorflow_serving/util/net_http/server/testing:evhttp_echo_server' failed (Exit 1)
/usr/bin/ld: bazel-out/k8-opt/bin/external/com_google_absl/absl/time/libtime.a(duration.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 58.230s, Critical Path: 19.92s
INFO: 162 processes: 162 local.
FAILED: Build did NOT complete successfully
'''
@infichen have you yet fix your problem?
@CLIsVeryOK server BUILD file needs to be changed like client BUILD file: util/net_http/server/testing/BUILD
@Bucca1992 thanks, it works!
Hi!
I have the same error:
ERROR: /home/tmsadm/serving/tensorflow_serving/util/net_http/socket/testing/BUILD:12:1: Linking of rule
'//tensorflow_serving/util/net_http/socket/testing:ev_print_req_server' failed (Exit 1)
/usr/bin/ld: bazel-out/k8-opt/bin/external/com_google_absl/absl/strings/libstrings.a(charconv.o): undefined reference to symbol
'nan@@GLIBC_2.2.5'
//usr/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I tried to correct BUILD files, but this doesn't help.
Any recommendations is highly appreciated.
Thank you.
So it seems that
/util/net_http/socket/testing/BUILD
should be corrected too - as it uses math library...
Thank you!
After that build works OK!
/util/net_http/socket/testing/BUILD - two places to change...
@infichen Just wanted to follow up. Is this still an issue for you?
Issue, solved. Thank you!
I have updated into socket, server and client but still facing the issue.
Most helpful comment
Thank you!
After that build works OK!
/util/net_http/socket/testing/BUILD - two places to change...