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

Bazel ERROR #20

Open
smartvinnetou opened this issue Dec 18, 2023 · 3 comments
Open

Bazel ERROR #20

smartvinnetou opened this issue Dec 18, 2023 · 3 comments

Comments

@smartvinnetou
Copy link

Hello,

After following the instructions for compiling the C++ code in Docker, I get the following Bazel error:

`$ docker build -t qcc4cp:latest .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/

Sending build context to Docker daemon 220.1MB
Step 1/27 : FROM debian:11
---> 873181a41b99
Step 2/27 : LABEL maintainer="Abdolhamid Pourghazi [email protected]"
---> Using cache
---> 883cfe428df3
Step 3/27 : LABEL maintainer="Stefan Klessinger [email protected]"
---> Using cache
---> 1bba1a411a0b
Step 4/27 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> de5d6fb41216
Step 5/27 : ENV LANG="C.UTF-8"
---> Using cache
---> 1379171292b9
Step 6/27 : ENV LC_ALL="C.UTF-8"
---> Using cache
---> f3bd7ed972c8
Step 7/27 : RUN apt-get update && apt-get install -y --no-install-recommends build-essential git libpython3-dev python3 python3-pip wget
---> Using cache
---> c058f7ccc312
Step 8/27 : RUN python3 -m pip install absl-py numpy scipy
---> Using cache
---> 3ae8eb401763
Step 9/27 : RUN useradd -m -G sudo -s /bin/bash repro && echo "repro:repro" | chpasswd
---> Using cache
---> b6b00da09dd4
Step 10/27 : USER repro
---> Using cache
---> eb773b7aa90a
Step 11/27 : RUN mkdir -p /home/repro/bin/
---> Using cache
---> 5119a047c1a3
Step 12/27 : RUN wget -O /home/repro/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
---> Using cache
---> a7f664877276
Step 13/27 : RUN chmod +x /home/repro/bin/bazel
---> Using cache
---> 8c4c771990c8
Step 14/27 : ENV PATH="/home/repro/bin/:${PATH}"
---> Using cache
---> c51c34440086
Step 15/27 : RUN mkdir -p /home/repro/sources/
---> Using cache
---> 3a898b65d78f
Step 16/27 : WORKDIR /home/repro/sources/
---> Using cache
---> 8439b2897039
Step 17/27 : RUN git clone https://github.com/qcc4cp/qcc.git
---> Using cache
---> ba3894a520d1
Step 18/27 : WORKDIR /home/repro/sources/qcc
---> Using cache
---> 58b7d18fe6fb
Step 19/27 : RUN sed -i 's/python3.7/python3.9/g' WORKSPACE
---> Using cache
---> 67ee9c8e5681
Step 20/27 : WORKDIR /home/repro/sources/qcc/src/lib
---> Using cache
---> dfca1d6daa5d
Step 21/27 : RUN bazel build all
---> Running in d09b99177dde
2023/12/18 14:16:12 Downloading https://releases.bazel.build/7.0.0/release/bazel-7.0.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Computing main repo mapping:
WARNING: --enable_bzlmod is set, but no MODULE.bazel file was found at the workspace root. Bazel will create an empty MODULE.bazel file. Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. For more details, please refer to bazelbuild/bazel#18958.
Computing main repo mapping:
Computing main repo mapping:
ERROR: /home/repro/sources/qcc/WORKSPACE:1:21: //external:third_party_python: invalid label '/home/repro/sources/qcc/python.BUILD' in attribute 'build_file' in 'new_local_repository' rule: invalid target name '/home/repro/sources/qcc/python.BUILD': target names may not start with '/'
ERROR: /home/repro/sources/qcc/WORKSPACE:8:21: //external:third_party_numpy: invalid label '/home/repro/sources/qcc/numpy.BUILD' in attribute 'build_file' in 'new_local_repository' rule: invalid target name '/home/repro/sources/qcc/numpy.BUILD': target names may not start with '/'
ERROR: Error computing the main repository mapping: Encountered error while reading extension file 'toolchains/local_java_repository.bzl': no such package '@@rules_java_builtin//toolchains': error loading package 'external': Could not load //external package
The command '/bin/sh -c bazel build all' returned a non-zero code: 1
$ `

I get the exact same error when running the compilation outside of Docker following README.Linux.md. I am on Ubuntu 22.04.

I am not a Bazel user and Google so far didn't help.

@qcc4cp
Copy link
Owner

qcc4cp commented Dec 18, 2023 via email

@hundt98847
Copy link
Contributor

hundt98847 commented Dec 19, 2023 via email

@smartvinnetou
Copy link
Author

smartvinnetou commented Dec 20, 2023 via email

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

3 participants