-
Notifications
You must be signed in to change notification settings - Fork 208
Update submodule sources when building driver #1520
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
Update submodule sources when building driver #1520
Conversation
210a907
to
b50a11b
Compare
# If we're testing a specific version of libmongoc, update submodule sources | ||
if [ -n "$LIBMONGOC_VERSION" ]; then | ||
php scripts/update-submodule-sources.php | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below we have a conditional for make libmongoc-version-current
. I suppose that still needs to remain separate because phpize
is what builds Makefile
from Makefile.frag
. So, at best, we could move that between the phpize
and ./configure
lines below.
And on a related note: the LIBMONGOC_VERSION_CURRENT
file is actually referenced during ./configure
to create the substitutions, so shouldn't we be running make libmongoc-version-current
before ./configure
? As-is, I don't think the compiled driver reports the correct version info.
Do you want to handle that in this same PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point: LIBMONGOC_VERSION_CURRENT
is indeed referenced during ./configure
, but we have to run ./configure
in order to have the Makefile
generated. To avoid that conundrum, I now call phpize
and ./configure
, then run make libmongoc-version-current
before running ./configure
again to generate the final Makefile
that we're building with. It's a little messy but the only way to work around the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't complain if you want to just manually run:
cd src/libmongoc/ && python build/calc_release_version.py > ../LIBMONGOC_VERSION_CURRENT
And then you can leave a comment in both places (the Evergreen config and Makefile.frag) indicating that we should update both instances if it needs to change down the line.
e39a388
to
73ea471
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll defer to you if you'd rather avoid the extra ./configure
call.
Noted after merging that this takes care of PHPC-2006, so I'm linking that here. |
This PR adds a call to update-submodule-sources.php when compiling against a different version of libmongoc than the bundled one. This helps avoid "symbol not found" errors when compiling with libmongoc latest with new files not included in the bundled stable release.