servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Issue with Building in GitHub Actions CI #538

Closed Redfire75369 closed 3 years ago

Redfire75369 commented 3 years ago

I have started a new project embedding spidermonkey. Using the workflow in this project as a base, I created a GitHub workflow to test builds on 3 platforms.

However, of these three test builds, only the MacOS build completed successfully. The other two, Ubuntu and Windows builds failed.

According to the SpiderMonkey developers in the #spidermonkey:mozilla.org Matrix Channel, the issue with the Linux build should have been fixed in SpiderMonkey 74. As for the issue with the Windows build, I have no leads yet.

These issues with building are all the more perplexing as I have successfully compiled this project both on Windows, and WSL Debian. Some others, who have tried to clone my repository and compile it from source have also encountered similar issues to the GitHub Actions Linux build.

sagudev commented 3 years ago

Hm, your cargo.lock file says you are using old version of this repo. Try cargo update, and make sure workflow files are identical.

Redfire75369 commented 3 years ago

I am aware that the version in Cargo.lock is outdated. Those who have cloned my repository have experienced successful builds after running cargo update. However, I do not see any reason that using the same version of rust-mozjs could result in different build results.

sagudev commented 3 years ago

I did quick check and your rust-mozjs commit was from the time there was no workflow in this repo. Current workflows are meant to be for newer versions because of PYTHON2 and other deps. So use exact workflow and latest revision and it would work. You can check this repos actions for proof.

Redfire75369 commented 3 years ago

Ran cargo update and Windows build is failing locally now: https://gist.github.com/Redfire75369/6e801b7bbd3f477122438cbe28b00550

sagudev commented 3 years ago

I update in my fork: https://github.com/sagudev/spiderfire/runs/2121356009?check_suite_focus=true the only problem is different ModuleEvaluate function. Will send you PR.

jdm commented 3 years ago

Sounds like this is solved.

Redfire75369 commented 3 years ago

The issue with the workflows has been fixed, but the issue with a local windows build is still occuring. See: https://gist.githubusercontent.com/Redfire75369/0c0573d3aeb6d66afcd709b5d0d07f3d/raw/dd11757a5809e2856c7eb15a9bd7c3402e1f8c0b/output.log

sagudev commented 3 years ago

Something is wrong with your clang or vsbuild installation. Do you have both installed? Try to replicate workflow for windows on your pc.

Redfire75369 commented 3 years ago

I just updated VSBuild so i don't think it's that, i'll try reinstalling/updating Clang

sagudev commented 3 years ago

Do not forget MozillaBuild.

jdm commented 3 years ago

Set CXX and CC to clang-cl; building with cl directly is unsupported.

Redfire75369 commented 3 years ago

Might have to update this then? https://github.com/servo/mozjs/blob/master/README.md

Redfire75369 commented 3 years ago

Good News: Build works properly now