Error in `bazel test -c opt -- //xls/...`

35 views
Skip to first unread message

Farzaneh Rabiei Kashanaki

unread,
Jul 21, 2023, 1:59:46 PM7/21/23
to xls-dev
Hi , I am very new to XLS HLS and trying out these tools,
Command I ran: bazel test -c opt -- //xls/...

I got the error:

```ERROR: An error occurred during the fetch of repository 'xls_pip_deps':

   Traceback (most recent call last):

File "/home/farzaneh/.cache/bazel/_bazel_farzaneh/934a2aa5a5e569ef55f18b51a9dd7716/external/rules_python/python/pip_install/pip_repository.bzl", line 195, column 13, in _pip_repository_impl

fail("rules_python failed: %s (%s)" % (result.stdout, result.stderr))

Error in fail: rules_python failed: Collecting Flask==2.3.2

I have VM, Ubuntu 22.04,
bazel --version: bazel 6.2.1
And I have 2 cores in my machine.

How can I fix the error?


 

  × Getting requirements to build wheel did not run successfully.

  │ exit code: 1

  ╰─> [68 lines of output]

Leary, Chris

unread,
Jul 21, 2023, 2:13:07 PM7/21/23
to Farzaneh Rabiei Kashanaki, xls-dev
Did you maybe forget to run the package installation instructions listed in the readme?

~/xls$ sudo apt install python3-distutils python3-dev libtinfo5 python-is-python3


And out of curiosity did you install Ubuntu server or Ubuntu desktop image into your VM?

--
You received this message because you are subscribed to the Google Groups "xls-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xls-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xls-dev/ea50ecfe-df8c-4173-8846-1197ff7c10f7n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

andyandy

unread,
Jul 22, 2023, 2:34:54 AM7/22/23
to xls-dev
Hey team

Also got the same error as OP when runing (made sure i've installed the packages) : bazel build -c opt xls/...
The full output can be found here: https://pastebin.com/nSqSW24f
I'm currently running Ubuntu server 22.04.2 LTS

Robert Hundt

unread,
Jul 22, 2023, 4:27:16 PM7/22/23
to andyandy, xls-dev
The way I naively read the error message it looks like the flask 2.3.2 package cannot be found. Perhaps try to install that manually?
   R

Leary, Chris

unread,
Jul 22, 2023, 5:43:48 PM7/22/23
to Robert Hundt, andyandy, xls-dev
I don't think installing manually will work in this case since it's a hermetic python environment inside of Bazel. I'm just confused why the CI is still working if this is happening pervasively... I'll try on a fresh VM and see if I can repro. Thanks for confirming it was happening in multiple environments / on multiple machines, that's always helpful.

Henner Zeller

unread,
Jul 22, 2023, 5:54:09 PM7/22/23
to Leary, Chris, Robert Hundt, andyandy, xls-dev
On Sat, 22 Jul 2023 at 14:43, 'Leary, Chris' via xls-dev
<xls...@googlegroups.com> wrote:
>
> I don't think installing manually will work in this case since it's a hermetic python environment inside of Bazel. I'm just confused why the CI is still working if this is happening pervasively... I'll try on a fresh VM and see if I can repro. Thanks for confirming it was happening in multiple environments / on multiple machines, that's always helpful.

All the python packages are not hermetic but come from pip, so there
might be some distribution-specific preference (
./dependency_support/pip_requirements.txt ) - maybe it is sufficient
to widen the range of known working versions ?
Maybe also setting the binary that uses Flask to 'manual' to not
require it to have that dependency be available unless explicitly
compiled.

-h

Leary, Chris

unread,
Jul 22, 2023, 6:16:15 PM7/22/23
to Henner Zeller, Robert Hundt, andyandy, xls-dev
Looks like PyYaml 5.4.1 had some cython_sources field that's incompatible with new setuptools API or something. If you change this line to >= instead of == you should be able to get past this (at least it did in my VM, now it's chugging along):

Leary, Chris

unread,
Jul 22, 2023, 6:43:48 PM7/22/23
to Henner Zeller, Robert Hundt, andyandy, xls-dev
Just an archeological aside: bunch of related sounding activity on https://github.com/yaml/pyyaml/issues/601 in the past few days.

Leary, Chris

unread,
Jul 22, 2023, 7:13:40 PM7/22/23
to Henner Zeller, Robert Hundt, andyandy, xls-dev
Thanks for reporting! Let us know if https://github.com/google/xls/commit/26a8b5cf394165b08150a27f3a29990ca92067c9 doesn't fix it when you sync past there.

andyandy

unread,
Jul 22, 2023, 10:33:16 PM7/22/23
to xls-dev
Looks like its progressing further now, i'll report back on how it goes with

bazel test -c opt -- //xls/...

Cheers team!

andyandy

unread,
Jul 23, 2023, 7:13:38 AM7/23/23
to xls-dev
Cheers team, few hours later got passing tests. Appreciate the quick fix!
Reply all
Reply to author
Forward
0 new messages