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

Build failed from source with bazel #4853

Closed
zhongchun opened this issue May 24, 2019 · 10 comments
Closed

Build failed from source with bazel #4853

zhongchun opened this issue May 24, 2019 · 10 comments

Comments

@zhongchun
Copy link
Contributor

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Mojave 10.14.2
  • Ray installed from (source or binary): source
  • Ray version: master
  • Python version: Python 3.7.3
  • Exact command to reproduce: ./build.sh -l java

Describe the problem

Failed to build Ray

Source code / logs

+ popd
~/Projects/git/ray
+ BUILD_DIR=/Users/atom/Projects/git/ray/build/
+ '[' '!' -d /Users/atom/Projects/git/ray/build/ ']'
+ pushd /Users/atom/Projects/git/ray/build/
~/Projects/git/ray/build ~/Projects/git/ray
+ /Users/atom/Tools/ray_env/bin/python -m pip install --target=/Users/atom/Projects/git/ray/python/ray/pyarrow_files pyarrow==0.12.0.RAY --find-links https://s3-us-west-2.amazonaws.com/arrow-wheels/ca1fa51f0901f5a4298f0e4faea00f24e5dd7bb7/index.html
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Looking in links: https://s3-us-west-2.amazonaws.com/arrow-wheels/ca1fa51f0901f5a4298f0e4faea00f24e5dd7bb7/index.html
Collecting pyarrow==0.12.0.RAY
  Using cached https://s3-us-west-2.amazonaws.com/arrow-wheels/ca1fa51f0901f5a4298f0e4faea00f24e5dd7bb7/pyarrow-0.12.0.RAY-cp37-cp37m-macosx_10_6_intel.whl
Collecting numpy>=1.14 (from pyarrow==0.12.0.RAY)
  Using cached https://mirrors.aliyun.com/pypi/packages/43/6e/71a3af8680a159a141fab5b4d19988111a09c02ffbfdeb42175cca0fa341/numpy-1.16.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting six>=1.0.0 (from pyarrow==0.12.0.RAY)
  Using cached https://mirrors.aliyun.com/pypi/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, pyarrow
Successfully installed numpy-1.16.3 pyarrow-0.12.0.RAY six-1.12.0
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/__pycache__ already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/numpy already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/six.py already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/six-1.12.0.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/numpy-1.16.3.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/pyarrow-0.12.0.RAY.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/pyarrow already exists. Specify --upgrade to force replacement.
WARNING: Target directory /Users/atom/Projects/git/ray/python/ray/pyarrow_files/bin already exists. Specify --upgrade to force replacement.
+ export PYTHON_BIN_PATH=/Users/atom/Tools/ray_env/bin/python
+ PYTHON_BIN_PATH=/Users/atom/Tools/ray_env/bin/python
+ '[' YES == YES ']'
+ /usr/local/bin/bazel build //java:all --verbose_failures
INFO: An error occurred during the fetch of repository 'boost'
INFO: Call stack for the definition of repository 'boost':
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/com_github_nelhage_rules_boost/boost/boost.bzl:125:9
 - /Users/atom/Projects/git/ray/bazel/ray_deps_build_all.bzl:10:3
 - /Users/atom/Projects/git/ray/WORKSPACE:9:1
INFO: An error occurred during the fetch of repository 'maven'
INFO: Call stack for the definition of repository 'maven':
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/rules_jvm_external/defs.bzl:59:5
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/com_github_ray_project_ray/java/dependencies.bzl:4:5
 - /Users/atom/Projects/git/ray/bazel/ray_deps_build_all.bzl:8:3
 - /Users/atom/Projects/git/ray/WORKSPACE:9:1
INFO: An error occurred during the fetch of repository 'remotejdk11_macos'
INFO: Call stack for the definition of repository 'remotejdk11_macos':
 - /DEFAULT.WORKSPACE.SUFFIX:188:1
INFO: An error occurred during the fetch of repository 'net_sf_saxon_Saxon_HE'
INFO: Call stack for the definition of repository 'net_sf_saxon_Saxon_HE':
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/com_github_checkstyle_java/third_party/workspace.bzl:57:5
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/com_github_checkstyle_java/third_party/workspace.bzl:89:9
 - /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/com_github_checkstyle_java/repo.bzl:17:5
 - /Users/atom/Projects/git/ray/bazel/ray_deps_build_all.bzl:9:3
 - /Users/atom/Projects/git/ray/WORKSPACE:9:1
INFO: Repository 'net_sf_saxon_Saxon_HE' used the following cache hits instead of downloading the corresponding file.
 * Hash '34661e9c6dd69caff14ec31e3ec47a9e7dbbc08be9da2c6326daf4e0038ed97c' for https://repo.maven.apache.org/maven2/net/sf/saxon/Saxon-HE/9.9.0-2/Saxon-HE-9.9.0-2.jar
If the definition of 'net_sf_saxon_Saxon_HE' was updated, verify that the hashes were also updated.
ERROR: /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/io_opencensus_cpp/opencensus/copts.bzl:24:1: file '@com_google_absl//absl:copts/configure_copts.bzl' does not contain symbol 'GCC_FLAGS'
ERROR: /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/io_opencensus_cpp/opencensus/copts.bzl:37:35: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/io_opencensus_cpp/opencensus/copts.bzl", line 36
		select({"//opencensus:llvm_compiler": (...)})
	File "/private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/io_opencensus_cpp/opencensus/copts.bzl", line 37, in select
		LLVM_FLAGS
global variable 'LLVM_FLAGS' is referenced before assignment.
ERROR: /private/var/tmp/_bazel_atom/8c386109c84eca664da58fc03518da58/external/io_opencensus_cpp/opencensus/copts.bzl:42:14: global variable 'DEFAULT_COPTS' is referenced before assignment.
ERROR: /Users/atom/Projects/git/ray/BUILD.bazel:70:1: error loading package '@io_opencensus_cpp//opencensus/stats': Extension file 'opencensus/copts.bzl' has errors and referenced by '//:raylet_lib'
ERROR: Analysis of target '//java:gen_maven_deps' failed; build aborted: error loading package '@io_opencensus_cpp//opencensus/stats': Extension file 'opencensus/copts.bzl' has errors
INFO: Elapsed time: 0.494s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 3 targets configured)
    currently loading: @io_opencensus_cpp//opencensus/stats
@jovany-wang
Copy link
Contributor

@zhongchun What's the version of bazel you have installed?

@zhongchun
Copy link
Contributor Author

@jovany-wang
Build label: 0.25.3-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu May 23 23:11:40 2019 (1558653100)
Build timestamp: 1558653100
Build timestamp as int: 1558653100

@jovany-wang
Copy link
Contributor

@zhongchun Thanks for your information.
I think there're some issues when building Ray with the latest version. I'm taking looks into it.

And if you need build Ray right now, you could install bazel with another version.
This command sh scripts/install-bazel.sh may help you install 0.21.0.

@jovany-wang
Copy link
Contributor

jovany-wang commented May 24, 2019

Also, the approach in this issue #4810 may work fine.

@jovany-wang
Copy link
Contributor

jovany-wang commented May 24, 2019

I think upgrade the opencensus and absl can fix this and #4810, but I'm not sure it can work fine in bazel 2.1.0.
I'll request a PR to try to fix them and test it tomorrow.

@zhongchun
Copy link
Contributor Author

Also, the approach in this issue #4810 may work fine.

Ok, I'll try it, thank you!

@jovany-wang
Copy link
Contributor

@zhongchun Could you please try to use this change #4862 to build?

@zhongchun zhongchun reopened this May 25, 2019
@zhongchun
Copy link
Contributor Author

@jovany-wang

@zhongchun Could you please try to use this change #4862 to build?

I have build success as follow steps:

  1. brew uninstall bazel
  2. ci/travis/install-bazel.sh
  3. modify bazel/ray_deps_setup.bzl by the approach in the issue ray installation broke with bazel 0.25.x #4810

Thank you very much!

@jovany-wang
Copy link
Contributor

jovany-wang commented May 25, 2019

I think you should not do the step 3 if you did the step 2. :)

@jovany-wang
Copy link
Contributor

Close this in #4862

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