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

Issue compiling tensorflow serving in Docker in Mac OS Sierra #542

Closed
zlgonzalez opened this issue Jul 31, 2017 · 2 comments
Closed

Issue compiling tensorflow serving in Docker in Mac OS Sierra #542

zlgonzalez opened this issue Jul 31, 2017 · 2 comments

Comments

@zlgonzalez
Copy link

I'm getting a compilation error when compiling tensorflow serving on Mac OS Sierra docker:

C++ compilation of rule '@org_tensorflow//tensorflow/core/kernels:svd_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 107 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4
t
Any tips so I can get past this?

I've attached BUILD.txt file.
BUILD.txt

@mountaintom
Copy link
Contributor

This frequently turns out to be related to insufficient memory to compile the code. The following should help, in the memory cases.

Look for the text “gcc: internal compiler error: Killed (program cc1plus)” in your error output. When the memory is exhausted during a compile phase, this error is often found in the error text.

Someone just had a similar issue. They were able to successfully compile with 4GB of RAM. Which seems to be an improvement over what has been needed in similar past issues.

#534

You could try replacing this line in the Dockerfile:

“RUN bazel build -c opt tensorflow_serving/... && \”

With:

“RUN bazel build -c opt --jobs 1 --local_resources 5000,1.0,1.0 --verbose_failures tensorflow_serving/... && \”

This forces Bazel to reduce the resources it will try to use during the build. If the build is now requiring less RAM than in the past, the 5000 value may be able to be decreased. The —jobs 1, in my case, has helped when the build fails in the linking phase.

@zlgonzalez
Copy link
Author

Looks like that fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants