google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.18k stars 173 forks source link

Bazel dependency on XLS fails to build xls_pip_deps #1067

Closed j2kun closed 1 year ago

j2kun commented 1 year ago

An empty bazel project with XLS as a dependency (minimal repro WORKSPACE file: https://gist.github.com/j2kun/f369293656434bb153d910090b8a2346#file-workspace) cannot build @xls_pip_deps

Error message: https://gist.github.com/j2kun/f369293656434bb153d910090b8a2346#file-error-txt

This was tested on XLS at head (dce44c5c896773c85c2b8078f9d38d7b8b39912e), but it also fails for the version of XLS that https://github.com/google/fully-homomorphic-encryption was using for a while, 2a613724dd84e891f7536ca81a5e0a960c21b447. I don't have an exact date when this issue started happening.

j2kun commented 1 year ago

This particular issue was reproduced with a system python of Python 3.11.4, but I'm not sure if the XLS repo uses the system python or a hermetic python. I have seen similar issues with Python 3.10 (though I believe it was a failed numpy installation in that case... I can try to repro that as well if needed)

tcal-x commented 1 year ago

I've had various numpy/python issues, and sometimes completely removing the bazel cache (not just doing bazel clean) fixed it.

j2kun commented 1 year ago

I got the same issue as above after running rm -r $(bazel info repository_cache)

asraa commented 1 year ago

It seems related to https://github.com/yaml/pyyaml/issues/601

j2kun commented 1 year ago

Correction: pyyaml issue is still there

I think the numpy issue was that we are adding a hermetic python runtime that differs from XLS, which uses the native python runtime. This is a bit problematic because it prevents us from using a hermetic python runtime in our project.

proppy commented 1 year ago

Fixed with https://github.com/google/xls/commit/26a8b5cf394165b08150a27f3a29990ca92067c9

Janmajayamall commented 1 year ago

I happen to be facing same issue on Python 3.10.7 when trying to run https://github.com/google/fully-homomorphic-encryption. Any suggestion on fixing it ?

asraa commented 1 year ago

I happen to be facing same issue on Python 3.10.7 when trying to run https://github.com/google/fully-homomorphic-encryption. Any suggestion on fixing it ?

Is the issue still happening if you bump to head to include the XLS update?