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

Revive #48505 #54914

Merged
merged 7 commits into from
Jul 6, 2021
Merged

Revive #48505 #54914

merged 7 commits into from
Jul 6, 2021

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jun 29, 2021

Revive #48505 and try to find out why the change caused official builds to break.

I couldn't apply the patch in src/tests/build.sh as sources changed: https://github.com/dotnet/runtime/pull/48505/files#diff-056300437704f257a4c8567b61dfdb647da75c5ef93baefec47709796792f182.

cc @am11 @ericstj

Revive #48505 and try to find out why the change caused official builds to break.
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ViktorHofer
Copy link
Member Author

Internal build which should then contain the binlog: https://dnceng.visualstudio.com/internal/_build/results?buildId=1211606&view=results.

@ViktorHofer
Copy link
Member Author

@ericstj the binlog is available in case you want to take a look.

@am11
Copy link
Member

am11 commented Jun 29, 2021

Thanks @ViktorHofer!

Does it fix the official build issue which was encountered previously (#48647)?
Few things have changed since, I am looking into FreeBSD cross-build error:

/__w/1/s/.dotnet/sdk/6.0.100-preview.4.21255.9/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(101,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'freebsd-x64'. [/__w/1/s/Build.proj]

@ViktorHofer
Copy link
Member Author

Does it fix the official build issue which was encountered previously (#48647)?

Unfortunately not yet. I opened the PR so that we can take a look at the binlog that is produced in the internal build to figure out what went wrong. @ericstj mentioned that a binlog should tell.

@am11
Copy link
Member

am11 commented Jun 29, 2021

FreeBSD error is due to crossgen2's dependency on internal property, the one which starts with underscore (which as I understood it, is discouraged)

<AppHostRuntimeIdentifier>$(_runtimeOS)-$(TargetArchitectureAppHost)</AppHostRuntimeIdentifier>

changing this line to <AppHostRuntimeIdentifier>$(PackageRID)</AppHostRuntimeIdentifier> fixes the error on FreeBSD cross leg.

@ViktorHofer
Copy link
Member Author

Great observation. Feel free to push into the branch if you want to :)

@am11
Copy link
Member

am11 commented Jun 29, 2021

I do not have push access to this branch's remote, pushed to mine am11@f7a6ca2.

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
@am11
Copy link
Member

am11 commented Jun 30, 2021

I couldn't apply the patch in src/tests/build.sh as sources changed: https://github.com/dotnet/runtime/pull/48505/files#diff-056300437704f257a4c8567b61dfdb647da75c5ef93baefec47709796792f182.

To make the test legs green, we would still need to apply the modified form of that patch to make it propagate /p:CrossBuild which we set in top level shell script (eng/build.sh) and want it to be available in all child contexts:

--- a/src/tests/build.sh
+++ b/src/tests/build.sh
@@ -573,6 +573,10 @@ if [[ "${__BuildArch}" != "${__HostArch}" ]]; then
     __CrossBuild=1
 fi

+if (( __CrossBuild == 1 )); then
+    __UnprocessedBuildArgs+=("/p:CrossBuild=true")
+fi
+

@ViktorHofer
Copy link
Member Author

To make the test legs green, we would still need to apply the modified form of that patch to make it propagate /p:CrossBuild which we set in top level shell script (eng/build.sh) and want it to be available in all child contexts:

Applied a minor variation of your patch. Does that look right?

@am11
Copy link
Member

am11 commented Jun 30, 2021

Yup, yours is more consistent with the repo style 👍 (it was just numerical comparison instead of string-y one but consistency takes precedence)

src/tests/build.sh Outdated Show resolved Hide resolved
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
@am11
Copy link
Member

am11 commented Jul 2, 2021

Remaining failures are unrelated to PR changes. It also does not break the developer workflow, including Windows/VisualStudio and Alpine Linux.

Internal build which should then contain the binlog: https://dnceng.visualstudio.com/internal/_build/results?buildId=1211606&view=results.

@ViktorHofer, (since I cannot access this link) could you please paste the build command which fails on that leg? I will also have a look.

@am11
Copy link
Member

am11 commented Jul 4, 2021

One difference between public CI legs and internal build could be that public CI is passing OutputRid explicitly to the cross compilation legs, and perhaps the internal build is not? The reason why we can't rely on the "calculated OutputRid" is that it has two different meaning, which is what this change aims to align.

This change is:

  • PackageRID: used to restore packages; in cross compilation, its value is the RID of host (or build) machine.
  • OutputRid: used to "create" .nupkgs; in cross compilation, its value is the RID of target machine.

(without any weird exceptional cases, like we have in main branch..)

If you could cherry-pick am11@c01d07c commit on your PR's branch. that should fix the internal build without modifying its .yml file. If not, then I would need binlog / more info to understand the problem.

@ViktorHofer
Copy link
Member Author

Triggered a new internal build: https://dnceng.visualstudio.com/internal/_build/results?buildId=1220899&view=results.

I don't think sharing the internal binlog is a good idea because of potential secrets/env vars but will at least share the command output to let you know if the patch was successful.

Thanks @am11 for your continuous help :)

@ViktorHofer ViktorHofer closed this Jul 5, 2021
@ViktorHofer ViktorHofer reopened this Jul 5, 2021
@Thefrank
Copy link
Contributor

Thefrank commented Jul 6, 2021

Will this also resolve the issue of native builds (in my case FreeBSD) trying to restore Linux ILASM/ILDASM instead of FreeBSD?
The binlog that was generated seemed to indicate a similar (maybe exact?) RID/variable issue.

@am11
Copy link
Member

am11 commented Jul 6, 2021

@Thefrank, if you are referring to #55133, then yes. 🙂

@ViktorHofer
Copy link
Member Author

Awesome, the internal build succeeded 💯

@ViktorHofer ViktorHofer marked this pull request as ready for review July 6, 2021 06:45
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

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

Looks like a good step in the right direction, but would love to simplify it even more :)

Comment on lines +20 to +21
<_hostOS Condition="'$(TargetOS)' == 'Browser'">Browser</_hostOS>
<TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
Copy link
Member

Choose a reason for hiding this comment

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

from what I understood _hostOS is the OS where the build runs right? in that case Browser doesn't make sense here (I assume we have some other wrong assumption about this somewhere else so this is needed right now).

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense. Let's untangle this when we eliminate remaining properties which are conflicting with each other.

Copy link
Member

@am11 am11 Jul 6, 2021

Choose a reason for hiding this comment

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

I think in case of browser, value of _hostOS is used in PackageRID below. For other platforms, it is also used to calculate OutputRid (through _portableOS) and MicrosoftNetCoreIlasmPackageRuntimeId when cross-building.

@ViktorHofer
Copy link
Member Author

I see a lot work items stopping during execution and the console log doesn't tell what went wrong. @dotnet/dnceng can you please take a look?

I.e. https://dev.azure.com/dnceng/public/_build/results?buildId=1220900&view=ms.vss-test-web.build-test-results-tab&runId=36394826&resultId=176021&paneView=debug

@ViktorHofer ViktorHofer merged commit 566b53a into main Jul 6, 2021
@ViktorHofer ViktorHofer deleted the ViktorHofer-patch-1 branch July 6, 2021 09:39
@ilyas1974
Copy link

Thank you for letting us know. I have created https://github.com/dotnet/core-eng/issues/13596 to investigate this.

Comment on lines 8 to +10
<TargetArchitectureAppHost Condition="'$(TargetArchitectureAppHost)'=='armel'">arm</TargetArchitectureAppHost>

<AppHostRuntimeIdentifier>$(_runtimeOS)-$(TargetArchitectureAppHost)</AppHostRuntimeIdentifier>
<AppHostRuntimeIdentifier>$(PackageRID)</AppHostRuntimeIdentifier>
Copy link
Member

Choose a reason for hiding this comment

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

ARMEL build is broken because target architecture is not updated to arm for crossgen2.
Please fix it. Thank you.

Copy link
Member Author

Choose a reason for hiding this comment

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

@clamp03 can you please open a new issue for that? @am11 do you have time to look at the regression?

Copy link
Member

@am11 am11 Jul 7, 2021

Choose a reason for hiding this comment

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

armel is another community supported platform, which gets broken time to time. For community related things to sustain in the continuous development (for the busy repo like runtime), there should be a CI leg IMO (as we added one last year for GCC build validation). I have the next batch of changes in progress, and will fix it in in that batch soon. Meanwhile, you can apply a local patch and get by it (and please consider adding CI leg as it won't be the last armel breakage otherwise).

Copy link
Member Author

Choose a reason for hiding this comment

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

cc @jkotas @safern regarding the armel CI protection discussion above.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I think it is fine to add an armel CI build that just does a traversal build. Maybe in the dev-innerloop pipeline?

Copy link
Member

Choose a reason for hiding this comment

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

Adding armel + Tizen CI build leg is tracked by #2394

As @safern said, we are open to adding CI build legs to protect community supported configurations. We expect the community to set them up. The steps for how to do that are in #2394 (comment)

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants