Skip to content

add instructions for running on FreeBSD #63417

Merged
wfurt merged 1 commit intodotnet:mainfrom
Thefrank:Thefrank-FreeBSD-instructions
Jan 8, 2022
Merged

add instructions for running on FreeBSD #63417
wfurt merged 1 commit intodotnet:mainfrom
Thefrank:Thefrank-FreeBSD-instructions

Conversation

@Thefrank
Copy link
Contributor

@Thefrank Thefrank commented Jan 5, 2022

There is currently no official package for FreeBSD, I have added a section to "docs/workflow/requirements/freebsd-requirements.md" that covers how to run the SDK under FreeBSD.

This is a frequently asked question from those that are new to FreeBSD, those familiar with FreeBSD but not dotnet, and in #14537

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jan 5, 2022
@ghost
Copy link

ghost commented Jan 5, 2022

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.

@am11
Copy link
Member

am11 commented Jan 6, 2022

Looks great, thanks!

Side note, (inspired by how CI does it to keep logs slightly tidier and comparable) I personally mount the volume with fixed path at root of container's FS:

- docker run --rm --volume $(pwd):$(pwd) --workdir $(pwd) --env ROOTFS_DIR=/crossrootfs/x64 -ti  $TAG ./build.sh -cross -os FreeBSD
+ docker run --rm --volume $(pwd):/runtime --env ROOTFS_DIR=/crossrootfs/x64 -ti "$TAG" \
+   /runtime/build.sh -cross -os FreeBSD

- libunwind
- lttng-ust (optional, debug support)
- krb5
- openssl (optional, SSL support)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't openssl part of base OS?

furt@d13:~ $ which openssl
/usr/bin/openssl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"yes but"
Yes! But that version is for the OS and things from ports should use other things from ports.

Which can be confusing but generally...

If it ships with the base OS its for the base only (e.g., openssl, llvm/clang, libunwind) or for building the OS. If it comes from ports (something external from the base OS) , it should use programs from ports

Copy link
Member

Choose a reason for hiding this comment

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

oh, well. I'm not going to argue.

@wfurt wfurt merged commit bc7f6c2 into dotnet:main Jan 8, 2022
@Thefrank
Copy link
Contributor Author

Thefrank commented Jan 8, 2022

@am11 I do something similar for that too as it keeps things cleaner for runs :)

I decided to leave it for now, if the syntax ends up being confusing or more people raise "build not working with docker" questions then I will change that to be a bit more clear.

@Thefrank Thefrank deleted the Thefrank-FreeBSD-instructions branch January 8, 2022 04:51
@wfurt
Copy link
Member

wfurt commented Jan 8, 2022

BTW it seems like we need python to build. I just bump to this while finally getting my build working again on fresh system

@wfurt
Copy link
Member

wfurt commented Jan 8, 2022

Hmm. actually building is here: https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/freebsd-instructions.md

May need some updates as well. It may be better to point at the cross-building scripts instead of my old binary snapshot.

@Thefrank
Copy link
Contributor Author

Thefrank commented Jan 8, 2022

Those build instructions should be updated at some point. They also seem to duplicate the building instructions under https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/freebsd-requirements.md

How should they be reworked/changed? Change docs/workflow/building/libraries/freebsd-instructions.md to point to docs/workflow/requirements/freebsd-requirements.md? This would be the easiest/laziest(?) way as the later includes building instructions using both Linux docker and native FreeBSD toolchain.

The docker instructions are fine for now but if I am updating the doc more I will update the container referenced and fix up the command as per @am11 's suggestion.

Native FreeBSD toolchain will need a dependency addition of python3 which both net6 and net7 now need. Currently, using a community built net6 SDK as a bootstrap, it will build the current dotnet/runtime/HEAD with only 4 lines of changes to /eng/Versions.props. These will need to be added too.

I am fine with any of the above but also open to other ideas

@wfurt
Copy link
Member

wfurt commented Jan 8, 2022

Yes, I'm on similar path. And https://lists.freebsd.org/pipermail/freebsd-current/2020-May/076043.html
Had to add it from ports.

I think freebsd-requirements.md should have instructions how to install/run runtime. The building document can reference it or duplicate the package for convenience. I like the one where you can select & paste commands to the shell and that makes it work.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants