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

Comments

@zlgonzalez
Copy link

commented Jul 31, 2017

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

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2017

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

This comment has been minimized.

Copy link
Author

commented Aug 2, 2017

Looks like that fixed it.

@zlgonzalez zlgonzalez closed this Aug 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.