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

Provide step-by-step instructions to compile and install Protobuf #12787

Closed
coryan opened this issue May 13, 2023 · 8 comments
Closed

Provide step-by-step instructions to compile and install Protobuf #12787

coryan opened this issue May 13, 2023 · 8 comments
Assignees
Labels
documentation inactive Denotes the issue/PR has not seen activity in the last 90 days.

Comments

@coryan
Copy link
Contributor

coryan commented May 13, 2023

What language does this apply to?

C++

Describe the problem you are trying to solve.

Developers trying to install Protobuf from source may miss critical dependencies and/or fail to notice that some dependencies need to be installed too. The top-level instructions redirect to the src directory which redirect to the cmake directory.

The instructions there are a bit scattered. They mention Abseil being installed in passing. And they mention -Dprotobuf_ABSL_PROVIDER=package only for Windows. The instructions for Linux are near the bottom and one needs to skip stuff about running unit tests, getting submodules, DLLs, compiler warnings, etc.

It is too easy for developers on other platforms to miss the Abseil flags, and get confused using Abseil as a submodule.

Describe the solution you'd like

I think you should break your build instructions into separate use-cases. The instructions to compile Protobuf as a contributor (with the intention of running tests and sending patches) should be separate from the instructions to compile the code as a consumer (with the intention of just using Protobuf).

For example, the how-to guides for contributors could start with:

**ATTENTION:** These are instructions to compile Protobuf as a contributor to the project.
If you want to use Abseil in your own project use [these instructions](/path/to/doc.md) instead.

while the instructions for consumers of the library could start with:

**ATTENTION:** These are instructions to compile Protobuf as a consumer of the libraries.
If you want to contribute to the project use [these instructions](/path/to/doc.md) instead.

The instructions for each platform should be complete. Ideally tested, I have used Docker scripts to test the instructions and then treat the Dockerfiles as the source of truth to ensure they stay in sync. They should say something like:

## Linux

To compile and install Protobuf on Linux you must have Abseil installed.  Follow [Abseil's instructions](link here) to do so.

Then compile the project with

    cmake -S . -B .build -D...<all necessary flags here>
    cmake --build .build
    cmake --install .build

## Windows

<repeat for windows with whatever variations>

## macOS

<again>

Only once you have completed the instructions for the easy case you may want to discuss variations (using ZLIB, using DLLs, etc.)

Describe alternatives you've considered

Additional context

N/A

@coryan coryan added the untriaged auto added to all issues by default when created. label May 13, 2023
@fowles fowles added documentation and removed untriaged auto added to all issues by default when created. labels May 13, 2023
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Nov 12, 2023
@coryan
Copy link
Contributor Author

coryan commented Nov 13, 2023

AFAICT this is still not resolved.

@Logofile
Copy link
Member

That's correct. The inactive label was applied by a bot, but I still have this on my to-do list.

@github-actions github-actions bot removed the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Nov 24, 2023
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Feb 23, 2024
Copy link

github-actions bot commented Mar 8, 2024

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
@Logofile
Copy link
Member

Logofile commented Mar 8, 2024

I still plan to work on this.

@Logofile Logofile reopened this Mar 8, 2024
@github-actions github-actions bot removed the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Mar 9, 2024
Copy link

github-actions bot commented Jun 7, 2024

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Jun 7, 2024
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation inactive Denotes the issue/PR has not seen activity in the last 90 days.
Projects
None yet
Development

No branches or pull requests

3 participants