Skip to content

./configure.py --backend=CPU does not setup all required packages #36692

@samuela

Description

@samuela
> ./configure.py \
      --backend=CPU \
      --host_compiler=GCC \
      --gcc_path=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}gcc
INFO:root:Writing bazelrc to /build/source/xla_configure.bazelrc...

> bazel build \
    -c opt \
    --spawn_strategy=sandboxed \
    --noenable_bzlmod \
    --cxxopt=-include \
    --cxxopt=cstdint \
    --host_cxxopt=-include \
    --host_cxxopt=cstdint \
    --build_tag_filters=-mobile,-ios \
    //xla/service:service
...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=0
INFO: Reading rc options for 'build' from /build/source/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /nix/store/fy9zhbqs56gijhqf8gwj6gwqcvg2ns6c-bazel-rc:
  'build' options: --extra_toolchains=@bazel_tools//tools/jdk:all --tool_java_runtime_version=local_jdk --java_runtime_version=local_jdk
INFO: Reading rc options for 'build' from /build/source/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --features=-force_no_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /build/source/xla_configure.bazelrc:
  'build' options: --action_env GCC_HOST_COMPILER_PATH=/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0/bin/gcc --action_env PYTHON_BIN_PATH=/nix/store/gw5biql7l9fs6dmrpwmcld1rlzixwp6m-python3-3.13.11-env/bin/python --python_path /nix/store/gw5biql7l9fs6dmrpwmcld1rlzixwp6m-python3-3.13.11-env/bin/python --copt -Wno-sign-compare --build_tag_filters -no_oss,-gpu --test_tag_filters -no_oss,-gpu
INFO: Found applicable config definition build:short_logs in file /build/source/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /build/source/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:linux in file /build/source/.bazelrc: --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /build/source/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
Computing main repo mapping: 
DEBUG: /build/source/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'llvm-raw' because it already exists.
DEBUG: /build/output/external/tsl/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'nvtx_archive' because it already exists.
DEBUG: /build/source/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'jsoncpp_git' because it already exists.
Loading: 
Loading: 0 packages loaded
WARNING: Target pattern parsing failed.
ERROR: Skipping '//xla/service:service': error loading package 'xla/service': Every .bzl file must have a corresponding package, but '@@local_config_rocm//rocm:build_defs.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
ERROR: error loading package 'xla/service': Every .bzl file must have a corresponding package, but '@@local_config_rocm//rocm:build_defs.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
INFO: Elapsed time: 2.134s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
FAILED: 

Am I missing something here? My understanding based on https://github.com/openxla/xla/blob/main/docs/developer_guide.md was that this ought to work.

cc @Awayfaring are you also facing this issue?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions