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

FreeBSD Port Team: Volunteers needed #4039

Closed
janhenke opened this issue Mar 15, 2015 · 90 comments
Closed

FreeBSD Port Team: Volunteers needed #4039

janhenke opened this issue Mar 15, 2015 · 90 comments
Labels
os-freebsd FreeBSD OS

Comments

@janhenke
Copy link
Member

Following the discussion on the chat, I am looking for volunteers to start a FreeBSD port team.

The purpose is to have a group of people working together on making coreclr working well on FreeBSD. This includes having more people with FreeBSD experience for reviewing patches and keeping an eye on PRs.

This issue is intended to discuss this idea and as a means to get into contact with each other. Also technical discussions about porting to FreeBSD are possible.

@xied75
Copy link
Contributor

xied75 commented Mar 15, 2015

My experience with FreeBSD is making VM template for CloudStack, if this can qualify I would like to join the team and picking up this brilliant OS on the way. :)

@MattWhilden
Copy link
Contributor

it's likely that you're already aware of this fork but if not it's worth checking out: https://github.com/ajensenwaud/coreclr

@MattWhilden
Copy link
Contributor

Ugh. Was too fast on the comment button. Meant to attempt to summon @ajensenwaud to the thread.

@richlander
Copy link
Member

To provide some more context ... to make this project awesome, we'd want a core group of folks that felt ownership and accountability (in a good way) to make the project happen. In turn, the .NET Core team would be more compelled to invest in CI infrastructure for FreeBSD as a first class citizen.

I like the idea of "port team". Some of very best people the CLR team has ever had were on the "X64 port team", 10+ years ago. They simply referred to themselves as "the port team". Not the type of folks you'd want to meet in (technical) dark allies ;)

@kangaroo
Copy link
Contributor

While I don't have the time to contribute significant resources to this, given the familiarities with OS X, I'm happy to support with code review, direction and suggestions. Feel free to @kangaroo me on issues.

@ghuntley
Copy link
Member

Long time FreeBSD user/supporter.

I'd be keen to help out from an administrative/sysadmin/marketing/documentation role where needed.

@qbit (OpenBSD), @josteink (FreeBSD), @Aesthetikx (FreeBSD), @ajensenwaud (FreeBSD) and @kangaroo (OSX) have been involved in previous work to bring CoreCLR to BSD.

@richlander
Copy link
Member

These PRs are relevant to this discussion: dotnet/coreclr#453, dotnet/coreclr#470.

Nice to see that they have been merged.

@josteink
Copy link
Member

I mostly tried to help out in @ajensenwaud's repo as a sort of "challenge accepted" short-term project.

As I don't have any up-to-date FreeBSD production-systems, I doubt I'm a good candidate for a longer term FreeBSD "port team". I do agree about the name though. It has a nice ring to it. Go for it!

That said, I appreciate being summoned and namedropped in dotnet/coreclr. That's almost going on my resume ;)

@ajensenwaud
Copy link
Contributor

Hi all

Thanks Jostein, appreciate your help so far!

I am very keen to still assist with the porting and can also assist with test infrastructure, as required. How many are in for this?

Anders

On 18 Mar 2015, at 20:47, Jostein Kjønigsen [email protected] wrote:

I mostly tried to help out in @ajensenwaud's repo as a sort of "challenge accepted" short-term project.

As I don't have any up-to-date FreeBSD production-systems, I doubt I'm a good candidate for a longer term FreeBSD "port team". I do agree about the name though. It has a nice ring to it. Go for it!

That said, I appreciate being summoned and namedropped in dotnet/coreclr. That's almost going on my resume ;)


Reply to this email directly or view it on GitHub.

@qbit
Copy link
Contributor

qbit commented Mar 18, 2015

Maybe we should make a wiki with status of each port, next steps and hurdles? OpenBSD is stuck until libunwind is ready (unless coreclr people can confirm that isn't a hard dep?).

@janvorli
Copy link
Member

You can start porting without the libunwind. It is required for exception handling and GC. So as long as an application doesn't throw an exception or initiate a GC, everything should work without the libunwind.
That's the way we were bringing up coreclr on Linux, the exception and GC support came quite recently.

@qbit
Copy link
Contributor

qbit commented Mar 18, 2015

👍 - I will keep hacking away then!

@janhenke
Copy link
Member Author

Hi folks,

I did not answer earlier as I want to know how big the feedback is. So far I am happy to see quite some people eager to join this project.

One question we should answer though is whether we want separate *BSD teams (one for FreeBSD, one for OpenBSD, one for NetBSD) or one big BSD Port Team.
My experience is limited to FreeBSD so far, which by my understanding is also the most often used of the different *BSDs. But from what I read there seems quite some differences e.g. between OpenBSD and FreeBSD. So I have the tendency to limit the scope of the "FreeBSD Port Team" to FreeBSD only for the time being.

As @richlander proposed I would start a PR with a new Wiki page, describing the intention of the team, current members, agenda and way to participate. Currently I see as members:

Also @qbit for OpenBSD.
As a rought list of people interesting. Would be nice to get an answer to the FreeBSD <-> OpenBSD <-> NetBSD question and a ack/nak to team memebrship from everyone in the list. Then I can prepare the wiki page based on that outcome. Best reply until Friday noon UTC. :)

@ghuntley
Copy link
Member

Alright, have created an Azure virtual machine (2 cores, 3.5GB memory) running FreeBSD 10.1-RELEASE which @josteink (and the others above) can call home for the foreseeable future whilst this issue is open. There's no NetBSD/OpenBSD images available in VMDepot, they were to magically appear then I would create another VMs for them as well.

Post a public ssh-key here and I will create you an account on portteam.cloudapp.net that has sudo access. Treat it with respect but don't be afraid to break it as it can be recreated as needed with a simple shell script.

@josteink
Copy link
Member

I'm pretty busy these days, so I'm definitely not making any promises.

Anyway, I appreciate @ghuntley's initiative, and to show that, here's an SSH-key which means that in theory I can contribute should I ever get the time:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDMaGl5KG5P6fogg5B5tY9K26X2rx0d7MZg7x28TYxICZGK1aHCODylNy3WfnBFvQ5hRsrf0kCT2u36JUmgJzXTBx6Vc3AchrEOMJLRl3KvJfsbpANrymkW666sDgQW6PyqXSZ8f17vREGZrvFa41/dwAxMvxlQELwS8HRgNzY8GoZBP9BTm6qqZFozBf25nZLN/p3/X3w3GxW4USJutnH5T2oBJc3TqVnBFSgrsnHMMlmV+Xj0EMBy4di+JoNBm78hCDwt1QVMJ+NDOH224LuWgTlhOIRRDZfNee3qGHOB1llI78BZkc4x/9SJR8Fiv13pUINHc1zfLBzmB1PPLztLS2j8kOTh/ymr3Gc5+8iGgPX9ZideNLoTjD9necwQ+GhPdys/DkU8idYkCJnVPv6il+OOwk55xopyyfs11660xlAxJKdNy8D3lbSBSQQCGMRKAXhXxUsQr1R64fScZ0NejmpXwYR+9vybymKbiMWizxYQ8ap/KxOAs3znPWYpu2mjldkHqKd0Wc5z4/pgZS/m2KVHr95oy1Lx/O77x6QSy9h7Wu1xIcayV5R+wIvfz6BhQ7Hpr2Lu2MHpNQr2T4UzIodfSJ/LWp/xo37Fl7Bg9SntEC4NepSW9FFSJ0q48/CfcTJYMvLTvqGYn85Y8PnlrKsr295RiRyMiD3Ys4RNtw== jostein@irssi

Anyone else?

@josteink
Copy link
Member

But from what I read there seems quite some differences e.g. between OpenBSD and FreeBSD.

From what I can tell, coreclr is pretty well abstracted and most (everything?) platform-specific goes through the Platform Abstraction Layer (PAL). If that builds cleanly, the build as a whole goes quite a bit further without too much trouble.

The PAL seems focused on underlying implementations rather than platform (see context.cpp): That checks if this architecture has BSD regs, PT regs, GREG-sets, what register-mapping etc.

Since I'm not sure if this is a problem at all, the best plan I can think of is to closely collaborate with the OpenBSD team (@qbit. anyone else?) and make sure the commited changes are mutually compatible.

If we later discover there's any substantial difference between FreeBSD and OpenBSD (or for instance Darwin), we might need more differentiation between the platforms than just saying "it's BSD", but let's save that for later, if for nothing else, just to get something going.

Alright, have created an Azure virtual machine ... Treat it with respect but don't be afraid to break it as it can be recreated as needed with a simple shell script.

If there's any global prerequisites/requirements will they be embedded in this script? According to the best of my knowledge @kangaroo's changes to support Darwin means clang3.7 (which of we will be cherry picking some) will be required to build this. Clang3.7 is not installed by default in FreeBSD 10.1, nor is it the default c-compiler.

It would be nice to have stuff like this (and other things we may add incrementally) available to everyone. Basically a public build-script for the machine. Sounds doable?

Which leads us to the next issue. Where do we work?

Since I doubt we'll be given commit rights into coreclr directly, or have PR's accepted before we have something to show for, should we have a place of sorts to work where we can commit incremental improvements? If so @ajensenwaud already has something going.

Should the work be based on that, or should we "start over", based on the current coreclr and just port the fixes we have so far?

@janhenke
Copy link
Member Author

Thanks @ghuntley for the sponsoring of a porting machine. My SSH pub key is

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDEhh5lz6n4LN6S9McCGCrDrr+rZNtY4PqMc0aRK2hND14UrZo0tfO9nPY9rZMhnJ8GUdOWbcX79l1IkEMZTI62rPP4TL65hhLDQBD6WeXy4ib8VFFwOjjmHt8BOctAAsaWQOich3kLcigMCyvn7HA4YXTvqwfY2M5AK6yCrBcWdfAcAaSv45uX7XCwg4xWd/xrwV6aE+rFPsbZCEcb0s/5MQ+/exILHuLMXxgJfUC7a+3HkJLyUZWWLt1JfVAz67/xPe5Z2P+eYF98Xq21T2Ptl2p8HFDgV6OpqfOkVYJrjriUxd4OABFPzsh63qaOmtvTT5VAMED/Z7+5nt7TY+lCLpYTt8ncAoIXoqbu0St1E121ZChsw9Y2Ltuj3Z9FSP69x9jogREJnC5TyTZOxNjoIVKD4o6zFYlls9fqqXC8tynJT6vrn0GxfC9ew4lD/Nin+97vwbZAJZVHqLBNpcDLCMIR3PTgc7TsUDrTUce6vsigczbp/69rJPpRqkPZcKPXT5kokW8z4gEE1/iICsZouoaVcZNCRiLt+PJO2nUlnYJQ5dIWOCJivxSAmZgk7RyHsc8zvLunrhVnse4tF+pTfa8pc5BJ23E2VIeVUbtwqrd2IwcuRoJy0E8yz/lJrZAVffGcXSOty6MM3fd68QeekbZpy/lT5FN73O6oU4TFGy+yVL368yFXXIjcfSQSG0sMaZFGXHdJwfJnJEdZgxuOCqaA3SooC5pnuC5pOF2Mt95RgahYPFo4GMU17AhpOSrJBz1zo94FCHcKUdsF4P9+GE6810q/uw8QwLOniw8IoBUP04ikbBSa95C2Qx6t1ygujrAxb+LJTtJ/X619t2CuCrHnMf2Vh+UNWtRbjuof5QWbO0GI97zt46vJifJC0w8fmuvOxP7bDdEITSWztPTgXftt0X7EVYXnf6dg2mGE/JWOZEfnspvbuYetkqCI+dqVWfuVodHGZ8H7nJr2XfEwxs+NLSOZkLu9v0EuJF/lviFbmpedBhCmfiqjo8POWU7jZ1MFSYGxqGsXHbL2b2/xr92aRqo3ZkX9NsqA4ofINePeGwuFMTpDMq0VWWW6V2Y5E3t8Noje8TRnN9uIZjLjLhBSVcwcmQivwF+GF6yi/osHnSHXYvajFQdkYuxRUlUeOh0MJIPExOs//jZ65srTL5yjEx4zkBn6Qsy4EPUGdchB8gPsZEtRt8zMGCPuoCL+3G4UOrjAxnLbbxb/PrIqvWKeFgvYnFMZSONA3BAYiAHKy67EqWq1yYttCyLQUT9R2R+wfMLlgCeWP9YGBDY8ArxUpPQzJZPJtnIo0ny+Sd0JFemql07jT7KTKlNL0vKaOpiGpBP11D7KHbKtIxI3 JanHenke_BSD_Port_Team

@josteink the major difference that came to my mind is the focus of OpenBSD on security. I read they introduced their own special APIs to make software more secure and less vulnerable to security related bugs. Admittedly though I do not know any details and just read that.

If it works from a compatibility side, it certainly would be nice to see all three BSDs supported. Though I think at the beginning FreeBSD should be the priority in case something does not work on all three the same way.
We could also organize it in a way that we all are the BSD Port Team and we assign people according to their preference to one or more "subteams", one for each BSD flavour.

Clang 3.7 is the current development IIRC. Clang 3.5 should be fine for the moment.

For the work, I was thinking about creating a Github "Organization", which could host our fork of the coreclr tree. @richlander how is your feeling about this? Also given that it would need a matching name with CoreCLR or dotnet in it. Maybe one member of the DotNet Foundation or Microsoft can set that up so it is guaranteed there also someone with administrative access at hand?

In any way I think it would be better to have central tree somewhere and not everybody having their private trees.

@josteink
Copy link
Member

Clang 3.7 is the current development IIRC. Clang 3.5 should be fine for the moment.

Fair enough. We'll stay on 3.5 unless it causes issues.

I was thinking about creating a Github "Organization"

Seconding this. How about just "DotnetBSD"? What I'm not sure about is if we really do need central support for the DotNet Foundation or Microsoft to do this? What do we stand to gain? I'm not against it per se, but if it causes us delays or to lose momentum, that would be a shame.

But then again this issue has @richlander's attention so it might be a non-issue altogether.

In any way I think it would be better to have central tree somewhere and not everybody having their private trees.

Absolutely positively agreed.

@qbit
Copy link
Contributor

qbit commented Mar 19, 2015

Thanks @ghuntley !

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNLvc26CLuM48MI0V6jQQVYZ5f3nMMPcX1iQPjfnHf9Wp9qlHaRUKYyveh4qcrfpVObvHfHbFZwyNQ+Ri7xfs0AFJLNiATKd50ditWT9FZ//xiGBuhpn2UwiYYTuCywkVuXbEdZXQesq9BrHhNn8ifmhPseKoMGOEil+eJGvxXnR3thiWGwuNSZ4D24brbVz3Hm/Fv9Gnbe3flui4jf73OxCyAT82NZ2FzbKCms5Q2QptwoAoDVTqgOar4lWX+vsZvs08EJ/HIRGTeHF/Yk9j8azJFHYxm6ao4eeQ9fHg5vXpsc/NX0VDm4ncfeuP/yVkxo7ZQC8yW+SkMlnj05CK9 [email protected]

Since I'm not sure if this is a problem at all, the best plan I can think of is to closely collaborate with the OpenBSD team (@qbit. anyone else?) and make sure the commited changes are mutually compatible.

This works for me. Also trying to recruit other OpenBSD devs.

the major difference that came to my mind is the focus of OpenBSD on security.

This isn't so much of an issue - most of the changes have "standard" counterparts that give you stern warnings when using them. The bigger difference will be availability of ports / required things (libunwind..) / location of installed ports.

@richlander
Copy link
Member

My morning now, so time to reply.

I'd be happy to setup a coreclr-freebsd (or some similar name) repo as a fork of coreclr within the dotnet org and give the port team commit rights to it. To my mind, that provide the following:

  • Unfettered development process (you control merging PRs).
  • High discoverability of the repo (good to get more people involved).
  • It's easy to setup the CLA and CI process on the repo.
  • .NET Core team has access to the repo should that be needed.

PRing your changes to upstream on a regular basis would still be a good idea, but I think that is your plan, anyway.

I haven't asked anyone else's opinion on this, like @jkotas or @martinwoodward, but this is my proposal, and I think its a good one.

@jkotas
Copy link
Member

jkotas commented Mar 19, 2015

I do not think we need a fork for the FreeBSD port. I expect that the changes for the FreeBSD port are going to non-controversial, and they can be submitted to master as they are made.

@kangaroo
Copy link
Contributor

I agree with @jkotas -- I expect the FreeBSD port will be far less invasive than the OS X one was.

@richlander
Copy link
Member

What do you think about @janhenke?

@janhenke
Copy link
Member Author

My idea was a bit different. I thought about having a Port Team Organization and repo primarily to directly work in it. So I would no longer have my private janhenke/coreclr tree, but there would some dotnetbsdteam/coreclr, where I can commit code to and open feature branches. In that way someone else in the team can work together with me on a feature without needing PRs for every commit.

PRs would only be used once we think a certain feature is ready so I can merged into the main sources.

So I do not want to have "parallel tree" here, but I rather thought a working place where we can work cooperatively in feature branches until they are ready to be merged. So by definition all changes this tree has from upstream is consider unstable until a PR is opened.

I also would not accept any PR into that tree, all PRs should go directly into dotnet/coreclr. Also the CI is only needed on the main dotnet repo, expanding the current bot simply with FreeBSD/OpenBSD/NetBSD instances.

@kangaroo
Copy link
Contributor

I'm pretty strongly against this direction, as I can see it spiraling out of control quickly. Having a separate tree per os? Per platform?

Is there a compelling reason for the primary maintainer to not just have it on their personal fork, and accept PRs themselves and push to coreclr as needed? You can also give individuals push access to your tree.

@janhenke
Copy link
Member Author

More centralization and overview what is being done. I do agree that it seems a matter of which kind of work flow we want to establish with this team.

If the majority does not like the idea, it is fine too. As I said I just want us to agree one common procedure to organize the work flow and also somehow make it possible to create a team where we can recognize each other and issues that affect us more easily. In the end it would also be good to have one easy way to summon the team as a whole to an issue or PR if the opinion of a BSD porter is needed.

@kangaroo
Copy link
Contributor

I'm not sure why we're focusing on centralization outside the canonical repo. MS has made it clear they'd be happy to upstream the patches, so lets just centralize here like for all other OSs.

In terms of having people recognize the issues, that seems like an easy candidate for a label?

@xied75
Copy link
Contributor

xied75 commented Mar 19, 2015

Dear all,

Here is my ssh key:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyVtbcfl/UqP8syjU0aEKRxr3+EOkmFWMZcR/xTSDo5unAqp3QX6G0qEp7upcQdvIrr7YUAkS3JupxRuaTQtSpb/qbP+Zy9bN2ktaylLg2LycyT5NKS2V5gDrO98ekM7/fxIICX+JShbT54IUReE7IwC5HlW0QNLOV2lkCt5BQoYKukqfs3t2J5OCuUuitmVugJ0QPtBhOVWdtvk48YiTlmS+NTWCoF/O9SxnctKTW4Fi90jIpfO7s/Onw/dD6GF+cxBykQRXiW6ukj4HY+oqzCkHvwzgfsS2NfnLZCE2q9lYvwLKTfOWca5C+fKf5/JCn7D8X9I+m7wxWeEwXk2KQQ== [email protected]

Please somebody kindly advise what shall I need to do/read to prepare for this project: e.g. read about FreeBSD, LLVM, Clang, or the source code, etc.

Thanks all.

@ajensenwaud
Copy link
Contributor

Great idea with the VM on Azure!

Here is my ssh key:

ssh-dss
AAAAB3NzaC1kc3MAAACBAI0brhrRR9wMD9xm62O7MkQBpX2ASl0lGue4L+y2KFptZmfoioQt
ZjPoBgjhKaG64uPH6V3MLzHGJn2iiSHHWxyA+2WHK1K3rQt6mEiIiU4N3PmI140wKJpuoyoCnKwScTGC
P7VYT5nJH5yKTz/nRNmS1llFkfaSfSxEXhgT0MYHAAAAFQDG6uDfY9dUBFYiPPLtV/7yCG4+owAAAIEA
iYVmRHXgBE6jiQ7GogQ/3ZqdoSu6bufyIN1kG7p9xEgFHeH8V+wPczb/RmS47X39qNraI3RcZ+zIaSrF
s1M9uyhA1MIYGQ4P3kXS+H+4Wydq3SUCINfO7oGEgxsLCnDo6gdz1//HZqaWRiazM7mtpBzeO1rP0W5e
o5BJyW2L1EsAAACAKgo7Kz2EL993yXFJJGFNWomZiYviwMCxSGF/zrjF3vJt8QrUJyvBfDosD6HUcfok
qdUBd4ztOOPT6fHVE1Oa1lOCQe5731+sk1Zq5bA4BDnOmhfu/LZHAH6GctPOegb9U0QHcVrhzt6okMtB
8yiFrFiX/TiixXORHnQGt4HKQWs= [email protected]

On Fri, Mar 20, 2015 at 8:21 AM, Dong Xie [email protected] wrote:

Dear all,

Here is my ssh key:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyVtbcfl/UqP8syjU0aEKRxr3+EOkmFWMZcR/xTSDo5unAqp3QX6G0qEp7upcQdvIrr7YUAkS3JupxRuaTQtSpb/qbP+Zy9bN2ktaylLg2LycyT5NKS2V5gDrO98ekM7/fxIICX+JShbT54IUReE7IwC5HlW0QNLOV2lkCt5BQoYKukqfs3t2J5OCuUuitmVugJ0QPtBhOVWdtvk48YiTlmS+NTWCoF/O9SxnctKTW4Fi90jIpfO7s/Onw/dD6GF+cxBykQRXiW6ukj4HY+oqzCkHvwzgfsS2NfnLZCE2q9lYvwLKTfOWca5C+fKf5/JCn7D8X9I+m7wxWeEwXk2KQQ== [email protected]

Please somebody kindly advise what shall I need to do/read to prepare for
this project: e.g. read about FreeBSD, LLVM, Clang, or the source code, etc.

Thanks all.


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-83763746.

@ajensenwaud
Copy link
Contributor

On Fri, Mar 20, 2015 at 7:46 AM, Geoff Norton [email protected]
wrote:

I'm not sure why we're focusing on centralization outside the canonical
repo. MS has made it clear they'd be happy to upstream the patches, so lets
just centralize here like for all other OSs.

In terms of having people recognize the issues, that seems like an easy
candidate for a label?

Agree, but unless all of us get commit access to coreclr, we are not going
to be able to consolidate our patches before submitting them to upstream?

For sake of separation, I suggest building out github.com/dotnetbsd unless
we can all work out of the coreclr repo.


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-83756136.

@josteink
Copy link
Member

Created seperate issue to discuss FPREGs, with some preliminary code.

https://github.com/dotnet/coreclr/issues/594

Can you guys take a look, and provide feedback if you feel capable?

@ajensenwaud
Copy link
Contributor

Well done, Jostein.

I will have a look at the FPREGs now, I don't know yet how we can tackle
them.

For other *BSDs I will spin up VMs up now to see how well it compiles on
NetBSD and OpenBSD (amd64). I will see if I can find some time to test it
on Darwin as well.

Cheers

Anders

On Sat, Mar 28, 2015 at 9:56 PM, Jostein Kjønigsen <[email protected]

wrote:

Ok. So I've gotten most, but not all of the BSD-registers fixed.

Unfortunately I'll be "off" for the Easter and wont be around to hack on
this material. Anyone else feel like taking over for now to keep the
momentum up? @janhenke https://github.com/janhenke ? @ajensenwaud
https://github.com/ajensenwaud ?

The registers remaining weren't around last time we tried to get this
thing ported, basically just the FPREGs
https://github.com/dotnet/coreclr/blob/master/src/pal/src/arch/i386/context.cpp#L78-L90,
so I didn't have any quick-fixes to transfer.

As far as I can tell this is defined in /usr/include/sys/ucontext.h. We
just need to find a proper trap for our #define entries, if there isn't
already a good one. Or do we? If we do, see my earlier commit here
dotnet/coreclr@869e47a
for an example.

What I'm also interested in is how are our FreeBSD-fixes so far playing
out with the rest of the BSD-verse? Have things improved? Are the Darwin
and OpenBSD builds also benefiting from these commits? Or are we creating a
conflict of sorts?

I would love to get some feedback on this. @kangaroo
https://github.com/kangaroo ? @qbit https://github.com/qbit ?

Anyhow to everyone: Happy easter!


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-87208483.

@josteink
Copy link
Member

Sounds great!

When you first have VMs up and running, I would love it if you could also verify my preliminary work on fpregs other places than freebsd.

Would be neat if we didn't have to do this messy register-work more than once :)

@phillipkent
Copy link

Hello @janhenke and others...

A number of developers here at http://www.interoute.com in London are interested in FreeBSD and your .NET port project.

Our company would like to help out by offering free use of virtual machines in our cloud platform, Interoute VDC [http://cloudstore.interoute.com/main/WhatInterouteVDC].

We have a FreeBSD template already installed, and you can upload other templates as you require them (you need an OVA based on VMware vmdk image, or an ISO source).

Can one of you get in touch with me directly [[email protected]] and we can discuss how much resources to set up....

Regards from London.
Phillip

@ajensenwaud
Copy link
Contributor

OK, I have been working on setting up a NetBSD VM -- more work is required
on my part to adjust the build scripts to NetBSD first as NetBSD/amd64 is
not picked up by build.sh. Will let you know once I have progressed with
this.

On Mon, Mar 30, 2015 at 5:27 PM, Jostein Kjønigsen <[email protected]

wrote:

Sounds great!

When you first have VMs up and running, I would love it if you could also
verify my preliminary work on fpregs other places than freebsd.

Would be neat if we didn't have to do this messy register-work more than
once :)


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-87567940.

@josteink
Copy link
Member

josteink commented Apr 2, 2015

@phillipkent Thanks for the offer. Right now @ghuntley has our back covered as far as FreeBSD-instances go. We've also been offered Azure resources from @MattWhilden at Microsoft.

OpenBSD and NetBSD is currently not able to run on Azure, so if you could host VMs for those instances, that might be useful.

@ajensenwaud : Once "done" with your machines, do you think it would be possible to have them uploaded to interroute? That way others could help out testing/porting.

@josteink
Copy link
Member

josteink commented Apr 2, 2015

Out of curiousity, I decided to cheat on the FPU registers, and just commented out the lines involving the remaing two (XMM etc). Basically just tosee what the next hurdle in the build is.

Disappointingly so, I discovered that just like the FPU registers, other parts of coreclr is progressing faster than we're able to port it. PAL's context2.S (mostly assembly + macros) which used to build is now complaining about basic assembly instructions being invalid.

I suspect some of the macros defined might be messing up evaluation on FreeBSD. Any assembly guys around wanting to take a look? Should we create a seperate issue for this as well?

@phillipkent
Copy link

@josteink Great. I will create a user account, and my colleague @xied75 is looking into running OpenBSD and NetBSD VMs on our platform.

@josteink
Copy link
Member

josteink commented Apr 2, 2015

I made a separate issue for the assembly failing the build. I think it makes sense to allow discussion on a per bug basis, and it probably makes it easier to track if we're getting anywhere and at what speed.

Assembly issue: https://github.com/dotnet/coreclr/issues/615

@MattWhilden
Copy link
Contributor

Highly recommend breaking these into separate issues. Smaller increments helps two ways:

  1. We can better understand the work that's outstanding.
  2. It's easier to point to the work already done and get the warm and fuzzy feels.

Joking aside, it's really nice internally to MS to be able to easily articulate the work that y'all have undertaken. #everyonehasaboss #yallareawesome

@josteink
Copy link
Member

josteink commented Apr 3, 2015

I agree with @MattWhilden and have created new issues ongoing as I've made further progress.

@janhenke This issue seems to have managed to summon a team of sorts, and gotten ourselves bootstrapped. And as such this issue has achieved its mission, right? I think it's time to close it at this point. Agreed?

@janhenke
Copy link
Member Author

janhenke commented Apr 3, 2015

@josteink For the initial mission I agree. Before it is closed though, I want to remark for any potential future reader that this is by no means a closed group. Any volunteer is welcome to continue making CoreCLR run smoothly on FreeBSD as well as the other BSDs.

@MattWhilden
Copy link
Contributor

Yep. I'll try to keep things tagged appropriately so that new folks can know where to help out. Great start!

@ajensenwaud
Copy link
Contributor

Hi Jan,

I am getting a hard error when trying to compile on OpenBSD because
libunwind is not available (and not available from the ports tree either).

Commencing CoreCLR Repo build
Setting up directories for build
Checking pre-requisites...
Commencing build of native components for OpenBSD.x64.Debug
Invoking cmake with arguments: "/home/aj/coreclr" DEBUG
which: clang++-3.5: Command not found.
CMake Warning at src/ToolBox/SOS/lldbplugin/CMakeLists.txt:26 (message):
Cannot find lldb-3.5 or lldb-3.6. Try installing lldb-3.6-dev (or the
appropriate package for your platform)

-- Looking for include file libunwind.h
-- Looking for include file libunwind.h - not found
CMake Error at src/pal/src/configure.cmake:886 (message):
Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or
the appropriate packages for your platform)
Call Stack (most recent call first):
src/pal/src/CMakeLists.txt:3 (include)

-- Configuring incomplete, errors occurred!
See also
"/home/aj/coreclr/bin/obj/OpenBSD.x64.Debug/CMakeFiles/CMakeOutput.log".
See also
"/home/aj/coreclr/bin/obj/OpenBSD.x64.Debug/CMakeFiles/CMakeError.log".
Failed to generate native component build project!

On Thu, Mar 19, 2015 at 12:33 AM, Jan Vorlicek [email protected]
wrote:

You can start porting without the libunwind. It is required for exception
handling and GC. So as long as an application doesn't throw an exception or
initiate a GC, everything should work without the libunwind.
That's the way we were bringing up coreclr on Linux, the exception and GC
support came quite recently.


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-82972504.

@ajensenwaud
Copy link
Contributor

@qbit, I have set up an account for your on our new OpenBSD instance in
Hong Kong:

IP: 103.232.35.201 (port 2201)
User: qbit

With the SSH key above.

Others -- please let me know if you would like access as well.

cheers

Anders

On Fri, Mar 20, 2015 at 1:54 AM, Aaron Bieber [email protected]
wrote:

Thanks @ghuntley https://github.com/ghuntley !

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNLvc26CLuM48MI0V6jQQVYZ5f3nMMPcX1iQPjfnHf9Wp9qlHaRUKYyveh4qcrfpVObvHfHbFZwyNQ+Ri7xfs0AFJLNiATKd50ditWT9FZ//xiGBuhpn2UwiYYTuCywkVuXbEdZXQesq9BrHhNn8ifmhPseKoMGOEil+eJGvxXnR3thiWGwuNSZ4D24brbVz3Hm/Fv9Gnbe3flui4jf73OxCyAT82NZ2FzbKCms5Q2QptwoAoDVTqgOar4lWX+vsZvs08EJ/HIRGTeHF/Yk9j8azJFHYxm6ao4eeQ9fHg5vXpsc/NX0VDm4ncfeuP/yVkxo7ZQC8yW+SkMlnj05CK9 [email protected]

Since I'm not sure if this is a problem at all, the best plan I can
think of is to closely collaborate with the OpenBSD team (@qbit
https://github.com/qbit. anyone else?) and make sure the commited
changes are mutually compatible.

This works for me. Also trying to recruit other OpenBSD devs.

the major difference that came to my mind is the focus of OpenBSD on
security.

This isn't so much of an issue - most of the changes have "standard"
counterparts that give you stern warnings when using them. The bigger
difference will be availability of ports / required things (libunwind..) /
location of installed ports.


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-83614941.

@janhenke
Copy link
Member Author

I think the first step for OpenBSD is to have Clang 3.5 (or 3.6) and libunwind. libunwind is necessary for the exception handling afaik (stack unwinding to find the exception handler).

How is the current status of LLVM/Clang on OpenBSD?

@ajensenwaud
Copy link
Contributor

LLVM/Clang can be installed as a binary package or from the Ports
collection.

On Sun, Apr 19, 2015 at 8:58 PM, Jan Henke [email protected] wrote:

I think the first step for OpenBSD is to have Clang 3.5 (or 3.6) and
libunwind. libunwind is necessary for the exception handling afaik (stack
unwinding to find the exception handler).

How is the current status of LLVM/Clang on OpenBSD?


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-94264382.

@janhenke
Copy link
Member Author

Which versions? CoreCLR currently compiles with 3.5. Is lldb available too? If yes we would need lldb 3.6.

@ajensenwaud
Copy link
Contributor

$ clang -v
clang version 3.5 (trunk)
Target: amd64-unknown-openbsd5.6
Thread model: posix

lldb is not in ports, but I will see if it builds manually.

On Sun, Apr 19, 2015 at 9:24 PM, Jan Henke [email protected] wrote:

Which versions? CoreCLR currently compiles with 3.5. Is lldb available
too? If yes we would need lldb 3.6.


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-94267389.

@josteink
Copy link
Member

Looks like openbsd work is progressing nicely. Which is good news indeed.

But I think it would be better if you created a separate issue for this, like "openbsd build-machine must be configured" or something similar.

Sounds OK?

@qbit
Copy link
Contributor

qbit commented Apr 24, 2015

Thanks @ajensenwaud ! I seem to be unable to access said machine.

ssh: connect to host 103.232.35.201 port 2201: Connection timed ou

@ajensenwaud
Copy link
Contributor

Hi Aaron, not sure what the issue was -- can you please try again, this
time just on port 22? I added an A record for the host so you can access it
via freebsd-hk.zbsd.org (yes, we have to change that to something more
descriptive, but it will take you to the OpenBSD machine).

On Fri, Apr 24, 2015 at 11:42 PM, Aaron Bieber [email protected]
wrote:

Thanks @ajensenwaud https://github.com/ajensenwaud ! I seem to be
unable to access said machine.

ssh: connect to host 103.232.35.201 port 2201: Connection timed ou


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/455#issuecomment-95935954.

@RussellHaley
Copy link

Hi There,

Just starting to play with the new drop of Core 1.0. I don't see a lot of FreeBSD support in the documentation other than a port of the CLR, but maybe that's not significant as once the CLR is built the rest is managed code?

@josteink
Copy link
Member

It's not as simple as we'd like it to be.

Initially coreclr (and corefx) on non-Windows platforms was mostly bootstrapped using mono.

So when we did the original FreeBSD port (and I guess we got to around 98% or something like that, just a few platform-specific bits of corefx missing), we could basically leverage mono which was already available and working.

At that point we kind of lost momentum for a variety of reasons and that's a shame. But .NET itself kept on moving (adding awesome things like the Dotnet CLI which is a massive improvement).

Part of that process involved the .NET system to be rewritten to be self-bootstrapped. And with that it drew in lots of common .NET ecosystem dependencies: nuget, roslyn, etc.

This has pros and cons. The pros are obvious: We no longer depend on mono to build .NET.

The cons is that to build .NET Core from source, smoothy, without too much nonsense, you now need to download a prebuilt .NET Core SDK (including its own functional coreclr runner) to run the .NET toolchain used to build .NET.

And that .NET toolchain is only available for already fully supported platforms (which does not include FreeBSD).

Building this SDK chain yourself can be done, but it's not trivial. Some people are working on it here: https://github.com/dotnet/corefx/issues/10610

Others are trying to piece together what we have to create a proper FreeBSD ports package: https://github.com/dotnet/coreclr/issues/6115

From those 2 issues, you should be able to find references to other issues and leads which may get you the whole way through. But that's not exactly a as smooth ride as anyone should have to suffer.

Basically this whole self-bootstrapping for everything good it does, has (for now) inadvertently set back a working FreeBSD-ports quite a bit.

So that's the bad news. The good news is that any PR which improves the situation quickly gets accepted.

If someone wants to pick up all the code we ported, and help finally land the thing, I'm sure everyone is going to be grateful about that. I'll be more than willing to assist with code-review and other non-intensive stuff.

@RussellHaley
Copy link

Thanks @josteink that brings me up to speed. I'll review everything carefully. As a curiosity, would it be possible to go back to bootstrapping with mono (no need to get too detailed in your answer)?

@josteink
Copy link
Member

josteink commented Aug 20, 2016

It might be. It could definitely be worth testing and trying, although you'll probably end up hav ing to write mono wrapper-scripts for the entire SDK tool chain (Dotnet CLI, nuget, Roslyn, msbuild, etc).

In a sense that would be creating a new SDK platform package, except the platform is mono, not a specific OS. That would probably be useful for all the platforms which aren't already bootstrapped.

If that could be made, that might make an interesting fallback on currently "unsupported OSes".

If that's more work or less than just getting a FreeBSD SDK building, I don't know. It would be starting from scratch, as opposed to finishing something already started.

On the flip side, you would probably be able to get going at it without having to wait for anyone else to do work for you.

Whatever you decide to do, I hope it works out :)

@janvorli: do you think such a mono-based fallback approach and initiative would be something Microsoft could consider supporting at this stage?

While it might seem like a step backwards, it would certainly assist putting up initial ports on new platforms.

@RussellHaley
Copy link

Ha, I just got Monodevelop 6.1 going on freebsd again. :P

I need to get my head around the build toolchain first so let me go back over all the comments...

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
os-freebsd FreeBSD OS
Projects
None yet
Development

No branches or pull requests