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

docs: Edits to BUILD.md #4155

Closed
wants to merge 9 commits into from
Closed

docs: Edits to BUILD.md #4155

wants to merge 9 commits into from

Conversation

kagarmoe
Copy link
Collaborator

Description of changes:

Edits the BUILD.md and organizes it more to the existing template.

Call-outs:

  1. How do we want to discuss what we do (and don't) support?
  2. Aside from mlock memory management, are there any more issues that we should add to the build troubleshooting section?

@kagarmoe kagarmoe marked this pull request as draft August 18, 2023 18:05
@kagarmoe kagarmoe self-assigned this Aug 18, 2023
@kagarmoe kagarmoe marked this pull request as ready for review September 18, 2023 20:02
@kagarmoe kagarmoe requested a review from goatgoose September 18, 2023 20:02
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated

### System requirements

* 20GB RAM available
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is a requirement. Was disk space meant rather than RAM? Even so, I'm not sure 20 GB is needed. Some additional space is needed when building, but the last release was only ~43 MB.

@goatgoose goatgoose requested a review from lrstewart September 19, 2023 02:44
docs/BUILD.md Outdated

<!-- We may want to move in this direction:
| Distro | Support | Supported Versions |
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dougch This could use more refinement, but what do you think of it as a direction?

@dougch dougch added the s2n-core team label Sep 28, 2023
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Show resolved Hide resolved

### System requirements

* 20GB RAM available, recommended.
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, this requirement/recommendation sounds extreme. Building s2n-tls should require such a small amount of RAM that I'm not sure it makes sense to specify a requirement for it.

#4155 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

I've compiled it on a RaspberryPi with 4GB RAM; considering we have IoT uses, one could argue this is relevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Giving system requirements is a normal piece of information. It a good thing to to have for everbody, but it is especially important for edge devices. I need a size for the recommended available RAM.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would maybe go with 4GB then, since that's probably the least amount of RAM that we know has been tested.

Copy link
Contributor

@lrstewart lrstewart Oct 24, 2023

Choose a reason for hiding this comment

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

If we're going to document requirements, we shouldn't be guessing at those requirements. They need to be accurate. And are we intending this as build requirements or runtime requirements?

docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Outdated Show resolved Hide resolved
docs/BUILD.md Show resolved Hide resolved

### System requirements

* 20GB RAM available, recommended.
Copy link
Contributor

Choose a reason for hiding this comment

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

I've compiled it on a RaspberryPi with 4GB RAM; considering we have IoT uses, one could argue this is relevant.

docs/BUILD.md Show resolved Hide resolved
docs/BUILD.md Show resolved Hide resolved

### System requirements

* 20GB RAM available, recommended.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would maybe go with 4GB then, since that's probably the least amount of RAM that we know has been tested.

@@ -1,6 +1,36 @@
# Building s2n-tls

s2n-tls can be built as follows:
To use s2n-tls, you must build the library from the source and then include it in your program.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Could "from source" be used here? It reads a bit better to me.

Suggested change
To use s2n-tls, you must build the library from the source and then include it in your program.
To use s2n-tls, you must build the library from source and then include it in your program.

1. Libcrypto, such as AWS-LC or OpenSSL
1. Platform-specific build tools

## Building s2n-tls from the source
Copy link
Contributor

Choose a reason for hiding this comment

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

Same nit:

Suggested change
## Building s2n-tls from the source
## Building s2n-tls from source

Comment on lines +68 to +49
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=./s2n-tls-install
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never seen cmake -D with a space like that. It somehow looks very wrong lol. I'd prefer we follow the more common cmake conventions and not put a space after -D.

s2n-tls can be built as follows:
To use s2n-tls, you must build the library from the source and then include it in your program.
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't feel correct to say that you must build s2n-tls from source to use it. We don't know how customers are consuming s2n-tls-- they could already have a binary. I don't think this wording change is an improvement.

Comment on lines +101 to 102
> See the [s2n-tls usage guide](USAGE-GUIDE.md#consuming-s2n-tls-via-cmake) for instructions on how to include s2n-tls in your CMake project.

Copy link
Contributor

@lrstewart lrstewart Oct 24, 2023

Choose a reason for hiding this comment

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

Nit: Why is this a block quote now?

Comment on lines +107 to +108
- [**`CMAKE_BUILD_TYPE`**](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html): Sets the build type.
- `Release`: Produce an optimized s2n-tls library artifact without debug info. Use this option to build s2n-tls for use in production.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's clear that your nested bullets are possible values

Comment on lines -109 to -110
The `CMAKE_INSTALL_PREFIX` option can be provided when building AWS-LC to specify where AWS-LC will be installed. The install path for AWS-LC should be provided when building s2n-tls, via the `CMAKE_PREFIX_PATH` option. This will ensure that s2n-tls is able to find the AWS-LC library artifact to link with.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I'm guessing you removed this because aws-lc should own its own build instructions. But since we're specifically calling out aws-lc as our recommended option, maybe we want to keep these quick / easy access instructions on building the two libraries together.

Copy link

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@dougch
Copy link
Contributor

dougch commented Mar 14, 2024

partially superseded by #4343

@dougch dougch closed this Mar 14, 2024
@jmayclin jmayclin deleted the kgarmoe/build-doc branch August 13, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants