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

How to build the nginx-otel module on a RHEL / CentOS based system #50

Open
royteeuwen opened this issue Apr 4, 2024 · 8 comments
Open

Comments

@royteeuwen
Copy link

Describe the bug

I am trying to build the nginx-otel module by first building nginx from source with ./configure --with-compat and then executing the commands in the README.md, but they fail because a lot of the packages mentioned are not available:

Error: Unable to find a match: build-essential libssl-dev zlib1g-dev libpcre3-dev libc-ares-dev libre2-dev

Is there a guide somewhere on how to build this for CentOS based servers?

@mtbChef
Copy link
Collaborator

mtbChef commented Apr 9, 2024

Hello, those are 3rd-party dependency libraries that will need to be installed or built from source. The README contains instructions for installing these libraries on Ubuntu/Debian systems. You will need to alter these commands slightly in order to use a package manager that's available on your CentOS system. This is likely to be yum.

@royteeuwen
Copy link
Author

@mtbChef cant you give the 3rd party deps? You distribute a rhel based version as stated in the readme, so you must have a list for it ?

@mtbChef
Copy link
Collaborator

mtbChef commented Apr 10, 2024

@royteeuwen can you clarify? We don't distribute 3rd-party dependencies. They can be installed via apt/yum directly from the 3rd parties. We provide a list in the README:

sudo apt install cmake build-essential libssl-dev zlib1g-dev libpcre3-dev
sudo apt install pkg-config libc-ares-dev libre2-dev # for gRPC

@royteeuwen
Copy link
Author

@mtbChef you distribute the nginx-otel-module compiled on a rhel based system via yum. So could you give the instructions / a list of yum deps that you used to build that module. The list you give is for ubuntu based systems, which doesnt work on rhel based systems

@royteeuwen
Copy link
Author

@mtbChef any possible help with this? Or anyone else who could provide the list of yum dependencies required to build this module on a RHEL based system? It must be available somewhere, else you wouldn't have been able to distribute it as built yum package yourselves...

@p-pautov
Copy link
Contributor

If you are building Nginx from source, then you should have most of these packages already installed. CentOS equivalents of last two seem to be "c-ares-devel" and "re2-devel" and if you are building from latest commit RE2 is not required.

@thresheek
Copy link

Hi @royteeuwen ! The packaging sources for our packages are available at https://hg.nginx.org/pkg-oss/file/26ae41eb0f32/rpm/SPECS/Makefile.module-otel - it's somewhat convoluted though for a first-time looker :)

We ship and build most of dependencies of the module in the packaging. From the OS, we only rely on cmake, re2 and c-ares libraries:

BuildRequires: cmake
BuildRequires: pkgconfig(re2) pkgconfig(libcares)

Everything else (protobuf, abseil, grpc and opentelemetry-cpp) are built from source w/o relying on distro-provided packages - which are not there for a majority of OSes we support - which is why we have to build them from source.

Hope this help!

@thresheek
Copy link

That means is that you probably just need a dnf install cmake pkgconfig(re2) pkgconfig(libcares) to bootstrap the build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants