-
Notifications
You must be signed in to change notification settings - Fork 138
Initial support for FreeBSD. #1362
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
| UseHardlinksIfPossible="$(UseHardlink)" /> | ||
|
|
||
| - <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OS)' != 'Windows_NT'"/> | ||
| + <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension) || true" Condition="'$(OS)' != 'Windows_NT'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has someone from corefx looked at this change? We are (or were) hitting this on Fedora 32 and Arch Linux as well: #1310 (comment). Maybe this should be merged into corefx if it's the correct general fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is my plan. but I'll do it after repo merge. I did testing and we don't need it at all any more. The dotnet is executable as it should on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the build work without this change? I wouldn't expect test code to be getting hit in our normal build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crummel The build fails here for Fedora 32 and Arch Linux too: #1310 (comment). This code path is definitely invoked in source-build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I think this is old time paranoia when we did not know how to set and preserve executable bits on Unix.
| UseHardlinksIfPossible="$(UseHardlink)" /> | ||
|
|
||
| - <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OS)' != 'Windows_NT'"/> | ||
| + <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension) || true" Condition="'$(OS)' != 'Windows_NT'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(In foreseeable future) Would it be possible to prepare TestHostRoot directory before executing the build.sh? How do the other platforms acquire it?
I had to figure out what constituents are required in this directory to execute corefx tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This normally comes from TestHost and matching runtime entry. The problem is that if you get standard package (or if it lives in your nuget cache) it does not have platform reference and then dotnet is not restored and chmod fails.
At this point you may not even want to run tests but it breaks build it self. Conceptually I feel that is not correct.
To get to point where you can run tests on FreeBSD, I copy bootstrap dotnet over. (and related native libraries) You can pass --buildtests to top level script to build but not run tests @am11. This will go away and everything will work as other platforms once we have builds and packages flowing.
|
OSX failures seems like infrastructure issue |
|
Yup, OSX failure is expected, I'm looking at it. |
crummel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question on the test change patch, but looks good to me overall.
| UseHardlinksIfPossible="$(UseHardlink)" /> | ||
|
|
||
| - <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OS)' != 'Windows_NT'"/> | ||
| + <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension) || true" Condition="'$(OS)' != 'Windows_NT'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the build work without this change? I wouldn't expect test code to be getting hit in our normal build.
|
@wfurt Is this ready to go in? |
|
|
||
| <PropertyGroup> | ||
| <OverrideTargetRid>$(TargetRid)</OverrideTargetRid> | ||
| <OverrideTargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-x64</OverrideTargetRid> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if this is already obvious to everyone else, but what is the original value of TargetRid here that's being overridden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generate this at the very beginning of the build here:
source-build/tools-local/init-build.proj
Line 111 in 8ebb121
| <Target Name="WriteDynamicPropsToStaticPropsFiles"> |
That calls into our task which in turn is calling into core-setup code to get the RID the same way the product does. This will by default be a non-portable RID but it looks like FreeBSD, like Windows and OSX, always uses a portable RID - @wfurt will have to be the one to explain if you're interested in why that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, so this is just forcing a portable RID instead of the non-portable RID? That answers my question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we decided that last year but that change never made it to all repose. Also repos now are inconsistent so source-build is the glue to force same and expect RID.
One day we should make it simpler but for now we do want portable RID as all versions are binary and API compatible. (at least for parts we need)
|
it would be great if anybody can confirm that this works. But this should be good to go as it works at least in cases I tested and it does not break other platforms. |
|
@dseefeld think we can go ahead with this? we can't verify that it remains working without CI but it doesn't seem to break anything else. |
Yes. I think we should merge this. |
contributes to #1139.
With limited ability to commit to repose, I focus on passing parameters to the build.
Using patches when necessary.
cc: @joperator @jasonpugsley @am11