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

Adding configure options for zstd, snappy, zlib? #1427

Closed
crazywhalecc opened this issue May 26, 2023 · 3 comments
Closed

Adding configure options for zstd, snappy, zlib? #1427

crazywhalecc opened this issue May 26, 2023 · 3 comments
Labels
tracked-in-jira Ticket filed in Mongo's Jira system

Comments

@crazywhalecc
Copy link

crazywhalecc commented May 26, 2023

Bug Report

I need to compile php with mongodb extension and make it statically linked. When I compile on MacOS, if I use Homebrew to install the dynamic link libraries for zstd and Snappy, and my pkg-config does not specify a system directory, it will also check for success during configure. But in the end, when executing the make command, it was prompted that the symbol could not be found.

Is there a way to add a few parameters here, such as --without-mongodb-zstd, --without-mongodb-snappy?

Environment

macOS Ventura, same as GitHub Action macOS Runner, and installed snappy,zstd,zlib.

Test Script

The project static-php-cli can compile a static binary of php, and I just found that mongodb cannot be compiled on macOS. Summary steps below:

  1. extract mongodb source code to php-src/ext/mongodb directory.
  2. ./buildconf --force
  3. ./configure --enable-mongodb --with-mongodb-system-libs=no --with-mongodb-sasl=no --with-mongodb-icu=no PKG_CONFIG="/custom/pkg-config" PKG_CONFIG_PATH="/custom/buildroot/lib/pkgconfig/"
  4. make -j8
@crazywhalecc crazywhalecc changed the title Adding configure options for zstd, snappy, capstone? Adding configure options for zstd, snappy, zlib? May 26, 2023
@jmikola
Copy link
Member

jmikola commented Jun 1, 2023

I don't see any reason we can't expose configure options for those libraries. I've created PHPC-2236 to track the request.

@jmikola jmikola added the tracked-in-jira Ticket filed in Mongo's Jira system label Jun 1, 2023
@jmikola
Copy link
Member

jmikola commented Jun 21, 2023

@crazywhalecc: #1438 adds configure options for the three compression libraries. If you're able to test that patch out locally and confirm it satisfies your needs that would be much appreciated.

@alcaeus
Copy link
Member

alcaeus commented Jun 22, 2023

PR was merged, this will be released in 1.16 shortly.

@alcaeus alcaeus closed this as completed Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked-in-jira Ticket filed in Mongo's Jira system
Projects
None yet
Development

No branches or pull requests

3 participants