Skip to content
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

Link FrameworkList.xml to a place where MSBuild SDK actually expects it #10928

Merged
merged 6 commits into from
Mar 24, 2021

Conversation

filipnavara
Copy link
Member

@filipnavara filipnavara commented Mar 22, 2021

The SDK conflict resolution code expects the FrameworkList.xml file to be located in $(TargetFrameworkDirectory)/RedistList/FrameworkList.xml.

Should fix
dotnet/runtime#49211
dotnet/runtime#49940
dotnet/runtime#49477
#10912
#10839
#10548
#10592
mono/mono#20805
mono/mono#20894

@rolfbjarne
Copy link
Member

/azp run

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix community Community contribution ❤ labels Mar 22, 2021
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rolfbjarne rolfbjarne added the note-highlight Worth calling out specifically in release notes label Mar 22, 2021
@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

@rolfbjarne
Copy link
Member

This is the failure:

ln: /Users/builder/azdo/_work/1/s/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/RedistList/FrameworkList.xml: No such file or directory
make[1]: *** [/Users/builder/azdo/_work/1/s/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/RedistList/FrameworkList.xml] Error 1
make[1]: *** Waiting for unfinished jobs....

My guess is that the target directory doesn't exist.

You can probably repro this locally by doing this from the root directory (this will do a clean build):

make git-clean-all
make all -j8

@filipnavara
Copy link
Member Author

Thanks. I am doing the local build on clean machine now. I likely didn't notice it because I was testing the steps manually before and I created the directories and links by hand earlier.

Copy link
Contributor

@spouliot spouliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rolfbjarne
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rolfbjarne
Copy link
Member

I don't think we've had a PR that fixes that many issues before..

@filipnavara
Copy link
Member Author

filipnavara commented Mar 22, 2021

I'd like to at least manually verify the packages once they are built. I also have a build test written locally but I need to fix my Xcode installation first so I can run it.

Copy link
Contributor

@chamons chamons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@mandel-macaque
Copy link
Member

@filipnavara I'll make sure that pkgs are created and will post links here.

@mandel-macaque
Copy link
Member

@filipnavara FYI: ba7c837

@filipnavara
Copy link
Member Author

@mandel-macaque Thanks a lot.

I'm still playing with some trivial test to ensure that everything is working properly:
4af5fd5

@mandel-macaque
Copy link
Member

@filipnavara do you need that last commit too?

@filipnavara
Copy link
Member Author

@mandel-macaque Nah, just the first two.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

🎉 All 182 tests passed 🎉

Pipeline on Agent XAMBOT-1103'

@filipnavara
Copy link
Member Author

filipnavara commented Mar 23, 2021

Unfortunately the packaging fails [which I anticipated] by having the symlinks point to wrong location:

filipnavara@172-4-1-17 app % ls -l /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/
total 0
lrwxr-xr-x  1 root  wheel  161 Mar 23 07:57 FrameworkList.xml -> /Users/builder/azdo/_work/1/s/maccore/release/_mac-install/Library/Frameworks/Xamarin.Mac.framework/Versions/7.11.0.225/lib/mono/4.5/RedistList/FrameworkList.xml

I suppose I need to modify it to make the symlink with absolute path.

Is there any way to make the packages locally? Or can you give me pointer on how the other symlinks are handled? I also have an alternative solution without symlinks but I would like to understand the process nevertheless.

@rolfbjarne
Copy link
Member

Unfortunately the packaging fails [which I anticipated] by having the symlinks point to wrong location:

filipnavara@172-4-1-17 app % ls -l /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/
total 0
lrwxr-xr-x  1 root  wheel  161 Mar 23 07:57 FrameworkList.xml -> /Users/builder/azdo/_work/1/s/maccore/release/_mac-install/Library/Frameworks/Xamarin.Mac.framework/Versions/7.11.0.225/lib/mono/4.5/RedistList/FrameworkList.xml

I suppose I need to modify it to make the symlink with absolute path.

This is handled by using $(IOS_TARGETDIR) instead of $(IOS_DESTDIR): the former is empty when building a package, and the same as IOS_DESTDIR when building locally.

Example:

https://github.com/xamarin/xamarin-macios/blob/b2248993de13ab31d3c66b74820cb3f0077032c6/msbuild/Makefile#L247-L248

Is there any way to make the packages locally? Or can you give me pointer on how the other symlinks are handled? I also have an alternative solution without symlinks but I would like to understand the process nevertheless.

Unfortunately the code to build the package is not public.

@filipnavara
Copy link
Member Author

@rolfbjarne Thanks. Makes a lot more sense. Ready for take two on the package build :-)

@rolfbjarne
Copy link
Member

New build has been scheduled!

@rolfbjarne
Copy link
Member

Failure:

[...]
[BUILD] mlaunch
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(84,5): error MSB4184: The expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(Xamarin.Mac, v2.0, '', '', '', /Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild-frameworks;/Library/Frameworks/Mono.framework/External/xbuild-frameworks)" cannot be evaluated. There was an error reading the redist list file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml". Could not find file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml" [/Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj]
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(84,5): error MSB4184: The expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(Xamarin.Mac, v2.0, '', '', '', /Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild-frameworks;/Library/Frameworks/Mono.framework/External/xbuild-frameworks)" cannot be evaluated. There was an error reading the redist list file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml". Could not find file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml" [/Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Xamarin.Launcher.csproj]
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(84,5): error MSB4184: The expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(Xamarin.Mac, v2.0, '', '', '', /Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild-frameworks;/Library/Frameworks/Mono.framework/External/xbuild-frameworks)" cannot be evaluated. There was an error reading the redist list file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml". Could not find file "/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/Xamarin.Mac/RedistList/FrameworkList.xml" [/Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Localization.Mlaunch/Xamarin.Localization.Mlaunch.csproj]

This is in a private part of our build, so I'll have a look.

@filipnavara
Copy link
Member Author

This is in a private part of our build, so I'll have a look.

It's the symlinks pointing to non-existing file. Just fails at that particular point because it's the first task accessing the file through the symlink.

Sorry for the slow turn around, it's quite tricky for me to test these changes locally.

@filipnavara filipnavara marked this pull request as ready for review March 23, 2021 19:51
@filipnavara
Copy link
Member Author

I manually verified the latest package on my test case so dropping the draft status.

@dalexsoto
Copy link
Member

We should backport this to xcode12.5 and d16-9 once it is merged

@filipnavara
Copy link
Member Author

There's still some Mac Catalyst test failing. I'll try to see if I can reproduce it locally with the packages. If there's any more detailed error message it would be helpful.

@dalexsoto
Copy link
Member

@filipnavara I think your changes are ok and unrelated to the failure on device tests, the PR tests seems to be fine #10928 (comment) I'll let @rolfbjarne confirm and the merge decision.

@rolfbjarne
Copy link
Member

The only test result we care about at the moment is this one: #10928 (comment), and that's green.

@rolfbjarne rolfbjarne merged commit 85dd54d into dotnet:main Mar 24, 2021
@dalexsoto
Copy link
Member

/sudo backport d16-9

@dalexsoto
Copy link
Member

/sudo backport xcdoe12.5

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch d16-9 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch xcdoe12.5 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4587204 for more details.

@rolfbjarne
Copy link
Member

/sudo backport xcode12.5

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Backport Job to branch xcode12.5 Created! The magic is happening here

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4587227 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix community Community contribution ❤ note-highlight Worth calling out specifically in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants