Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Compilation error in a container #2877

Closed
comes5 opened this issue May 1, 2018 · 12 comments
Closed

Compilation error in a container #2877

comes5 opened this issue May 1, 2018 · 12 comments

Comments

@comes5
Copy link

comes5 commented May 1, 2018

I am trying to build incubator-heron master in a container with Ubuntu, I managed to install everything but bazel when building the heron folder gives me an error, probably related to Python.
Can someone help me? I have attached all the output from the build comand, specifically bazel build --config=ubuntu heron/...

output.log

@kramasamy
Copy link
Contributor

@comes5 - can you include what error you are getting?

@kramasamy
Copy link
Contributor

kramasamy commented May 1, 2018

Alternatively you could use the docker image at

streamlio/build-ubuntu14.0:latest 

it has everything installed already.

@comes5
Copy link
Author

comes5 commented May 1, 2018

The error I am mentioning is in the log file I posted:

ERROR: /incubator-heron/heron/tools/admin/src/python/BUILD:22:1: PexPython heron/tools/admin/src/python/heron-admin.pex failed (Exit 1) **** Failed to install netifaces-0.10.6 (caused by: NonZeroExit("received exit code 1 during execution of ['/usr/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpwn7Syj']while trying to execute['/usr/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpwn7Syj']",) ):

The problem is that I want to use Dhalion to implement new policies for Heron so I need to modify the source code and doing some tests with it.

@tomncooper
Copy link
Contributor

Can you clarify if you are using the Docker containers defined in the Heron repo (docker/compile) or you are constructing your own?

@comes5
Copy link
Author

comes5 commented May 1, 2018

Just constructing it on my own using the ubuntu default container.
Here is my dockerfile:

Dockerfile.txt

@tomncooper
Copy link
Contributor

tomncooper commented May 1, 2018

I would recommend using the dockerfiles in the docker/compile directory they are used routinely for compilation so should work. Can you give the instructions in the docker/Readme.md a try?

@comes5
Copy link
Author

comes5 commented May 2, 2018

Ok tried to compile using the instructions in /docker/Readme.md but there seem to be another error:
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes. Creating packages INFO: Analysed target //scripts/packages:tarpkgs (240 packages loaded). INFO: Found 1 target... ERROR: /scratch/heron/metricsmgr/src/thrift/BUILD:3:1: error executing shell command: 'set -e rm -rf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs mkdir bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs...' failed (Segmentation fault): bash failed: error executing command (cd /root/.cache/bazel/_bazel_root/c481f31d0aff7f9fd86654fb84c9a629/execroot/org_apache_heron && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ /bin/bash -c 'set -e rm -rf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs mkdir bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs third_party/thrift/thrift-linux-x86_64.exe -r --gen java -o bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs heron/metricsmgr/src/thrift/scribe.thrift jar cMf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar -C bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs . rm -rf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs'): bash failed: error executing command (cd /root/.cache/bazel/_bazel_root/c481f31d0aff7f9fd86654fb84c9a629/execroot/org_apache_heron && \ exec env - \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ /bin/bash -c 'set -e rm -rf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs mkdir bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs third_party/thrift/thrift-linux-x86_64.exe -r --gen java -o bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs heron/metricsmgr/src/thrift/scribe.thrift jar cMf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar -C bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs . rm -rf bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs') /bin/bash: line 3: 2632 Segmentation fault (core dumped) third_party/thrift/thrift-linux-x86_64.exe -r --gen java -o bazel-out/k8-opt/genfiles/heron/metricsmgr/src/thrift/thrift_scribe_java_src.srcjar.srcs heron/metricsmgr/src/thrift/scribe.thrift Target //scripts/packages:tarpkgs failed to build INFO: Elapsed time: 168.796s, Critical Path: 115.46s FAILED: Build did NOT complete successfully Cleaning up scratch dir

@kramasamy
Copy link
Contributor

@comes5 - in the new PR #2879 - we are removing the scribe and the thrift executable. Once this is merged, this error will go away.

@comes5
Copy link
Author

comes5 commented May 2, 2018

So, I am trying with virtualbox now, following the heron documentation with ubuntu 16.04. So far no errors from thrift and scribe, but the build fails after a long time building:
ERROR: Process exited with status 1: Process exited with status 1 fatal: Not a git repository (or any of the parent directories): .git Failed to run command to check head: git rev-parse --abbrev-ref HEAD INFO: Elapsed time: 1525.185s, Critical Path: 69.10s INFO: 1914 processes: 1603 local, 311 worker. FAILED: Build did NOT complete successfully

@tomncooper
Copy link
Contributor

Have you checked out one of the release tags or are you building from the head of the master branch? Try checking out the latest tag, 0.17.8, and compiling from there?

@comes5
Copy link
Author

comes5 commented May 3, 2018

Solved, Bazel couldn't find the .git directory which I had removed. One question though: do I have to build everything if I modify only one component and I want to test it?

@nlu90
Copy link
Member

nlu90 commented May 8, 2018

@comes5 In short, Yes. You'll need to build the whole project to get the core jars for testing. But since bazel is smart enough to do the incremental building, it will only build targets affected by your changes after the initial full building.

@nlu90 nlu90 closed this as completed May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants