Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport building UWP app from mach #23753
Comments
|
I'm refining the scope of this work a bit. The CI work can happen separately; what I really would like is to make it as easy as possible to build the VS project as part of a single mach build command that also builds Servo. I'm imagining that |
|
Observations of Current Build Steps: Resolution: 1>c:\git-mozilla\servo-angelortiz1007\support\hololens\servoapp\browserpage.cpp(60): warning C4189: 'visible': local variable is initialized but not referenced This failure is due to the mach build -d --uwp link time error not building the simpleservo.dll.lib. However, the required libegl.lib is then created/downloaded and found at: Now the user can complete the mach build -d --uwp build where the simpleservo.dll.lib library is built. Summary:
During research it appears that nuget.exe can be used to download and place the libegl.lib into the packages directory for HoloLens using the following command: The above commands recreated the required packages directory for Angle without the need to open the ServoApp.sln and attempt a build. After the above nuget commands were executed, the mach -build -r --uwp succeeded without any Servoapp build. |
|
To automate the nuget work:
|
|
I performed the 1st and 3rd bullet item above. After running mach build -d --uwp, I get the following error: C:\git-mozilla\servo-angelortiz1007>mach build -d --uwp I looked in the .servo/msvc-dependecies directory and see a file 08-08-2019.zip.part under nuget. It appears that there is something wrong with the downloading portion. I suspect another file will need to be created/updated to specify nuget install ServoApp.sln. Am I correct? |
|
Oops. I didn't set the access permissions for the file correctly. It should work better now. |
|
:) C:\git-mozilla\servo-angelortiz1007>mach build -d --uwp
The error occurred in code that was called by the mach command. This is either You should consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error The details of the failure are as follows: WindowsError: [Error 2] The system cannot find the file specified File "C:\git-mozilla\servo-angelortiz1007\python\servo\build_commands.py", line 238, in build C:\git-mozilla\servo-angelortiz1007> |
|
Ok, I redid the archive to better fit the code's expectations about its contents. Try again? |
|
Outstanding!!! Success! I now have .servo\msvc-dependencies\nuget\08-08-2019\nuget.exe I got stumped initially and walked away and came back to it. After looking at the 403 message again I said there is something going on in the download. I'll call it quits for the day knowing I passed this hurdle.:) Thanks for the late night help! |
|
Additional fine tuning may be needed. I've noticed that "nuget.exe" also exists in ".servo\msvc-dependencies" in addition to ".servo\msvc-dependencies\nuget\08-08-2019" |
|
That may be leftover from the previous failure. |
|
I've created a python script to call nuget restore ServoApp.sln. My preliminary python script is: def angle_root(target):
The python function angle_root() may need to be called from build_commands.py around line 290...
|
I thought too, but I deleted it and reran mach build -d --uwp and after the download nuget.exe was observed. |
Just to confirm and document: def build(self, release=False, dev=False, jobs=None, params=None, dev specifies (Debug/Release) msbuild -p Configuration type (if dev == false implies Release, if dev == true implies a Debug) win_arm64 specifies x64 (target = "x86-64-pc-windows-msvc) or AARCH64 (target = "aarch64-pc-windows-msvc) |
|
Reference Link to resolve msbuild time error of missing certificate https://www.oipapio.com/question-1459134 snipet ..... |
|
got my python scripts working well. However, when I run msbuild for debug and x64, msbuild is building arm64 as well. Here is my command: The following is another article that discusses this same issue: |
The suggestion from the link above appears to work. The following msbuild command produces only the release|x64 target. Changing "Release" to "Debug" also works. |
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Added support to download nuget and added python code to automate the… … x64 and arm64 mach build -r/-d --uwp build process. <!-- Please describe your changes on the following line: --> Modified/added python code to: 1. Download nuget which is required for building support\HoloLens 2. added python code to perform a nuget install/restore ServoApp.sln which causes the Angle libraries to be installed so that mach build will succeed. 3. added python code to perform a MsBuild of the support\HoloLens\ServoApp.sln solution so that mach build will build ServoApp and create a ServoApp .appx install file. Note: The Msbuild path must be present otherwise the msbuild command will fail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #23753 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [x] These changes do not require tests because by performing python mach build -r/-d --uwp ---win-arm64 or mach build -r/-d --uwp <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23961) <!-- Reviewable:end -->
Our CI setup is dictated by https://github.com/servo/servo/blob/master/etc/taskcluster/decision_task.py . In particular, see the windows_unit and windows_arm64 functions which create tasks corresponding to https://tools.taskcluster.net/tasks/HtSwU2zzTdiC5wfpYIgLKg and https://tools.taskcluster.net/tasks/b6PRpaKmQ3GjcAkakQXXeg (chosen at random from https://treeherder.allizom.org/#/jobs?repo=servo-auto).
There are three main parts I expect to getting the UWP build to succeed:
MSBuild ServoApp.sln /p:Configuration=Debug /p:Platform=x64(example invocation to build the ServoApp solution in a particular configuration)Once that's working it would be great to create nightly builds as well (see windows_nightly function in decision_task.py).
Update: we have nuget package installation working on CI in the arm64 build, and we're building the --uwp configuration. The missing piece is the msbuild execution, and if we add that to the
mach buildcommand automatically then CI gets it for free.