Skip to content

Conversation

@BH4HPA
Copy link

@BH4HPA BH4HPA commented May 18, 2025

What problem does this PR solve?

Without these dependencies, the build fails at the CMake stage with errors indicating that snappy, lz4, and zstd could not be found.

CMake Error at /usr/local/lib/python3.8/dist-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find snappy (missing: snappy_LIBRARIES snappy_INCLUDE_DIRS)
CMake Error at /usr/local/lib/python3.8/dist-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find lz4 (missing: lz4_LIBRARIES lz4_INCLUDE_DIRS)
CMake Error at /usr/local/lib/python3.8/dist-packages/cmake/data/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find zstd (missing: zstd_LIBRARIES zstd_INCLUDE_DIRS)

What is changed and how does it work?

This commit adds the missing packages libsnappy-dev, liblz4-dev, and libzstd-dev to the official build Dockerfile. These libraries are required for building Pegasus 2.5.0 successfully, especially when compiling RocksDB dependencies.

Checklist

Tests
  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
Code changes
  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change
Side effects
  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility
Related changes
  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

This commit adds the missing packages `libsnappy-dev`, `liblz4-dev`, and `libzstd-dev` to the official build Dockerfile. These libraries are required for building Pegasus 2.5.0 successfully, especially when compiling RocksDB dependencies.

Without these dependencies, the build fails at the CMake stage with errors indicating that snappy, lz4, and zstd could not be found.
@BH4HPA
Copy link
Author

BH4HPA commented May 18, 2025

This happens repeatedly during tests:

$ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
           apache/pegasus:build-env-ubuntu2004-master \
           /bin/bash -c "cd /root/pegasus; ./run.sh test"
...
Wait cluster to become healthy...
Sleeped for 1 seconds
./pegasus_shell: error while loading shared libraries: libsnappy.so.1: cannot open shared object file: No such file or directory
Sleeped for 2 seconds
./pegasus_shell: error while loading shared libraries: libsnappy.so.1: cannot open shared object file: No such file or directory
...

Therefore, adding these packages is necessary not only for building but also for running and testing Pegasus.

After adding these packages, I successfully:

  • Built Pegasus 2.5.0
  • Ran test without runtime errors

Copy link
Member

@acelyc111 acelyc111 left a comment

Choose a reason for hiding this comment

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

@BH4HPA Thanks for the contribution!

@limowang
Copy link
Collaborator

limowang commented Jun 9, 2025

Hello, I compiled and tested pegasus2.5.0 according to https://pegasus.apache.org/zh/2.5.0/docs/build/compile-by-docker/, and the error you reported above did not occur. The 2.5.0 docker image should use apache/pegasus:build-env-ubuntu2004-v2.5 instead of apache/pegasus:build-env-ubuntu2004-master. You can refer to the above document and try again to see if there is still a problem. If there is still a problem, look forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants