Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Failure in Windows and MacOS CI #559

Open
Redfire75369 opened this issue Sep 9, 2022 · 10 comments
Open

Failure in Windows and MacOS CI #559

Redfire75369 opened this issue Sep 9, 2022 · 10 comments

Comments

@Redfire75369
Copy link
Contributor

Redfire75369 commented Sep 9, 2022

Currently, MacOS CI is failing. It seems to be due to an issue in configure.py but I have no idea what it could be.
Windows CI is also failing, which is very weird given it compiles just fine for me locally.
https://github.com/Redfire75369/rust-mozjs/runs/8271056707

@Redfire75369 Redfire75369 changed the title Failure in MacOS CI Failure in Windows and MacOS CI Sep 9, 2022
@jdm
Copy link
Member

jdm commented Sep 11, 2022

Ah, this is the same issue as servo/servo#28911 and needs to be addressed like servo/servo#28960.

@sagudev
Copy link
Member

sagudev commented Sep 11, 2022

I believe SM update might solve this issues.

@jdm
Copy link
Member

jdm commented Sep 11, 2022

The windows errors look a bit like we may need an LLVM upgrade.

  C:\Program Files\LLVM\lib\clang\14.0.6\include\emmintrin.h:2378:19: error: use of undeclared identifier '__builtin_elementwise_max', err: true

@jdm jdm mentioned this issue Sep 11, 2022
@Redfire75369
Copy link
Contributor Author

I see upgrading LLVM fixed the windows builds, but I'm just wondering how it requires an llvm update even though the code didn't change.
How did the currently used llvm version start to not work, if the code is just the same?

@jdm
Copy link
Member

jdm commented Sep 12, 2022

Because the MSVC installation in the CI environment is updated regularly, and those upgrades can include a new version of clang. However using bindgen in the build requires a full LLVM installation, which MSVC doesn't include, and so the version of LLVM that we install needs to remain in sync with the clang version that is present in MSVC.

@jdm
Copy link
Member

jdm commented Sep 12, 2022

I believe SM update might solve this issues.

I think you're right. It may be a similar problem to https://bugzilla.mozilla.org/show_bug.cgi?id=1657717

@Redfire75369
Copy link
Contributor Author

Redfire75369 commented Sep 15, 2022

On another note, thanks for the information about MSVC in the CI.
It helped me realise why spiderfire's CI was failing, I didn't peg the version so it just went to LLVM 15. 😅

It seems the Windows CI environment has LLVM already, would it be possible to use that instead of installing it with scoop?
(https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md)

@yvt
Copy link
Contributor

yvt commented Sep 19, 2022

I believe SM update might solve this issues.

I think you're right. It may be a similar problem to https://bugzilla.mozilla.org/show_bug.cgi?id=1657717

The symptom is similar, but I think it's a separate issue. I was able to reproduce the issue locally and found that the whole _virtualenvs/init_py3/bin directory (not just the bin/python file as indicated by https://bugzilla.mozilla.org/show_bug.cgi?id=1657717#c1) was missing. The Python binaries were instead placed in a different directory, _virtualenvs/init_py3/opt/homebrew/bin:

$ ls -R target/release/build/mozjs_sys-30b55714e66609b8/out/build/_virtualenvs/init_py3
 ...
target/release/build/mozjs_sys-30b55714e66609b8/out/build/_virtualenvs/init_py3/opt/homebrew/bin:
activate      activate.fish  activate.xsh      easy_install       easy_install3     pip       pip3     python   python3.10  wheel-3.10  wheel3.10
activate.csh  activate.ps1   activate_this.py  easy_install-3.10  easy_install3.10  pip-3.10  pip3.10  python3  wheel       wheel3

It appears to be the combination of the following factors that caused this issue:

Edit: Found the upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1766497

@Redfire75369
Copy link
Contributor Author

Redfire75369 commented Sep 19, 2022

From a first read through, I think this would require a patch to update virtualenv to 20.10.0?
At least until an update to SM97 or further.

I'm not sure if mozjs/python/mozbuild/mozbuild/virtualenv.py needs to be patched, but mozjs/third_party/python/virtualenv/ probably does.

@yvt
Copy link
Contributor

yvt commented Sep 20, 2022

Looks like they attempted to bump virtualenv to 20.15.0 in https://hg.mozilla.org/mozilla-central/rev/450e42238ace99a6e8ff5fc167b44c6a734e8e6d, although it was reverted later due to CI regressions. I think we can just incorporate this patch until a reliable solution is implemented in upstream.

Meanwhile, I think I've found the right upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1766497

Alternatively, we could temporarily downgrade Python to 3.9 in the CI environment.

bors-servo added a commit that referenced this issue Oct 28, 2022
chore(ci): relink `python3` to `python3.9` on Homebrew

Work around the other part of #559
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants