-
Notifications
You must be signed in to change notification settings - Fork 122
Upgrade to MozillaBuild 4.0 #326
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
Conversation
The makefile seems to require being called from the mozilla-build terminal though ( Compiling mozjs_sys v0.68.2 (C:\Users\Redfire\software\github\mozjs\mozjs)
error: failed to run custom build command for `mozjs_sys v0.68.2 (C:\Users\Redfire\software\github\mozjs\mozjs)`
Caused by:
process didn't exit successfully: `C:\Users\Redfire\software\github\mozjs\target\debug\build\mozjs_sys-7183b162fa1fdf26\build-script-build` (exit code: 101)
--- stdout
cargo:outdir=C:\Users\Redfire\software\github\mozjs\target\debug\build\mozjs_sys-004ea0ad6a849248\out\build
[[ 'C:\Users\Redfire\software\github\mozjs\mozjs\mozjs'/js/src/configure -ot 'C:\Users\Redfire\software\github\mozjs\mozjs\mozjs'/js/src/configure.in ]] && touch 'C:\Users\Redfire\software\github\mozjs\mozjs\mozjs'/js/src/configure || true
--- stderr
"C:\\mozilla-build\\bin\\mozmake\\mozmake.exe"
'[[' is not recognized as an internal or external command,
operable program or batch file.
'true' is not recognized as an internal or external command,
operable program or batch file.
mozmake: *** [C:\Users\Redfire\software\github\mozjs\mozjs\makefile.cargo:191: maybe-configure] Error 1
thread 'main' panicked at 'assertion failed: result.success()', mozjs\build.rs:232:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
That's weird, it's a different error in CI than what I'm getting locally. |
It seems to work if you start the mozbuild shell before running |
Reticulating splines...
Finished reading 62 moz.build files in 0.14s
Read 0 gyp files in parallel contributing 0.00s to total wall time
Processed into 249 build config descriptors in 0.18s
RecursiveMake backend executed in 0.28s
173 total backend files; 173 created; 0 updated; 0 unchanged; 0 deleted; 6 -> 39 Makefile
Total wall time: 0.68s; CPU time: 0.58s; Efficiency: 86%; Untracked: 0.07s
config/autoconf.mk:117: *** missing separator. Stop.
mozmake: *** [D:\a\mozjs\mozjs\mozjs\makefile.cargo:184: all] Error 2
thread 'main' panicked at 'assertion failed: result.success()', mozjs\build.rs:225:5 Something's wrong with autoconf/make somewhere and I have no idea where. |
It seems that this is being generated in PATH = C:\mozilla-build\msys2\usr\bin;C:\mozilla-build\bin;D:\a\mozjs\mozjs\target\debug\deps;D:\a\mozjs\mozjs\target\debug;C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;C:\Program
Files\Git\usr\bin;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\python3;C:\mozilla-build\python3\Scripts;C:\mozilla-build\msys2\usr\local\bin;C:\mozilla-build\msys2\usr\bin;C:\mozilla-build\msys2\usr\bin;C:\mozilla-build\msys2\opt\bin;C:\ProgramData\scoop\shims;C:\Users\runneradmin\scoop\shims;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.9.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\tools\ghc-9.4.2\bin;C:\Program Files\dotnet;C:\mysql\bin;C:\Program Files\R\R-4.2.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.17.13\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.4\x64\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.352-8\x64\bin;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\ProgramData\Chocolatey\bin;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\OpenSSL\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.6\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\SeleniumWebDrivers\ChromeDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\mozilla-build\msys2\usr\bin\site_perl;C:\mozilla-build\msys2\usr\bin\vendor_perl;C:\mozilla-build\msys2\usr\bin\core_perl;C:\mozilla-build\bin\mozmake;C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/HostX64/x64 |
In the end, it was caused by the most mundane thing. FOR /F "tokens=* USEBACKQ" %%F IN (`where ssh 2^>NUL`) DO (
SET EXTERNAL_TO_MOZILLABUILD_SSH_DIR=%%~dpF
) Then in https://searchfox.org/mozilla-build/source/msys-config/profile-mozilla.sh#70, cygpath would return a multiline string. $ cygpath -u C:\\Program Files\\Git\\usr\\bin\\
/c/Program
Files/Git/usr/bin/ |
This requires a fix on the mozilla-build side so I've filed a bug. (https://bugzilla.mozilla.org/show_bug.cgi?id=1803269) |
Update: The bug has now been addressed and a fix has been merged. Once a new update is released, this can probably be merged. My only worry is the fact that I'm using |
Great work on finding that issue and getting it fixed! |
Thanks! Requiring the build to be run in the MozillaBuild shell isn't ideal, but this works for now at least. Do you have any suggestions regarding the Taskcluster issue? |
I guess we could pin it to the latest one at the time of the commit, which is d1109e59eddb6045f048bd31110ea80da4679f5a6637b44165e9c2523b58d28d |
Hmm, help me understand what's required here: is mozmake not part of mozbuild? Why do we need to install it separately? |
As of MozillaBuild 4.0, mozmake isn't automatically installed. It's bootstrapped by bootstrap.py.
|
Will it build successfully without mozmake? |
Given we use a In all seriousness, it doesn't work without some form of make, either make, gmake or mozmake. |
Oh, if there's no make included in MozillaBuild at all then that makes sense. I didn't think that was the case. |
After asking the devs a bit, it seems the next release will be in around a month or two, so this will remain a draft until then. |
I'm not sure about where this UWP error is coming from, anyone have any ideas? error: failed to add native library D:\a\mozjs\mozjs\target\aarch64-uwp-windows-msvc\debug\build\mozjs_sys-f75d1830bda12164\out\build/js/src/build\js_static.lib: Unsupported archive identifier |
59813fb
to
5caf1fd
Compare
Seems to be an unrelated issue. https://github.com/Redfire75369/mozjs/actions/runs/3617051242/jobs/6095562856 |
I've opened #327 about that. |
Should the |
Yep, that sounds reasonable. |
If you don't mind, I'd like to change (It doesn't work because it returns an exit code of 2 if there's no Makefile) |
Changed mozmake Installation to occur only on Windows Changed MozillaBuild detection and integration to occur only on Windows
b7a42ab
to
6ec783a
Compare
Added Checking for make and gmake on All Platforms Added Checking for mozmake on Windows
8b72081
to
43708c4
Compare
☔ The latest upstream changes (presumably #342) made this pull request unmergeable. Please resolve the merge conflicts. |
Switched to cygpath on MSVC Reformatted Makefile
Fixed Wording in ReadME
☔ The latest upstream changes (presumably #350) made this pull request unmergeable. Please resolve the merge conflicts. |
This was resolved with #392. |
Added Support for MozillaBuild 4.0 to build SpiderMonkey on Windows