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

Bump to libmongoc to 1.24-dev #1388

Merged
merged 4 commits into from Nov 30, 2022
Merged

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Nov 29, 2022

Will be required for PHPLIB-1042, among other issues.

Patch build: https://spruce.mongodb.com/version/6386decfe3c331496f01b0c2/tasks

@jmikola jmikola requested a review from alcaeus November 30, 2022 04:42
@jmikola jmikola marked this pull request as ready for review November 30, 2022 04:42
@@ -5,6 +5,13 @@ PHP_ARG_ENABLE([mongodb],
[Enable MongoDB support])])

if test "$PHP_MONGODB" != "no"; then
dnl Enable C99 (required for libmongoc 1.24+)
AC_PROG_CC_C99
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this was deprecated in autoconf-2.70 but is still usable. See autoconf-2.60 docs for details about how it works.


if test "$ac_cv_prog_cc_c99" = no; then
AC_MSG_ERROR([Compiler does not support C99])
fi
Copy link
Member Author

Choose a reason for hiding this comment

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

Similar to the approach taken in php/php-src#6317.

Note: C99 was added to php-src in php/php-src@b51a99a

@@ -537,6 +543,7 @@ if test "$PHP_MONGODB" != "no"; then
mongodb was configured with the following options:

Build configuration:
CC : $CC
Copy link
Member Author

Choose a reason for hiding this comment

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

This is helpful for debugging, as we'll see if -std=gnu99 (or something else) was added to the compiler command.

@@ -11,6 +11,10 @@ fi
AC_PROG_CC
AC_PROG_CXX

dnl AC_PROG_CC_C99 is previously called in config.m4, but AC_PROG_CC resets CC
dnl so call it once more to ensure C99 remains enabled
AC_PROG_CC_C99
Copy link
Member Author

Choose a reason for hiding this comment

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

This file dates back to libmongoc's old Autotools configs. I'm not sure that it's still necessary, since we do inherit some context from PHP's own Autotools configuration, but this didn't seem like the time to remove the file entirely.

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM!

@jmikola jmikola merged commit 6a7a2ba into mongodb:master Nov 30, 2022
@jmikola jmikola deleted the phpc-libmongoc-1.24 branch November 30, 2022 08:06
@jmikola
Copy link
Member Author

jmikola commented Nov 30, 2022

Note: this introduced a Windows build failure (shame on me for focusing on Evergreen and overlooking GitHub CI). After mongodb/mongo-c-driver#1154 is merged I'll open a new PR to bump the submodule and get that resolved.

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

Successfully merging this pull request may close these issues.

None yet

2 participants