-
Notifications
You must be signed in to change notification settings - Fork 546
CXX-3290 fix static pkgconfig requirements #1406
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
base: master
Are you sure you want to change the base?
Conversation
Restore behavior prior to 4.1.0: Have static libbsoncxx depend on static (not shared) libbson. Have static libmongocxx depend on static (not shared) libmongoc.
(pkg-config --print-requires libmongocxx-static | grep -- mongoc2-static || ( | ||
( | ||
echo "Expected mongoc2-static to be required" >&2 | ||
exit 1 | ||
) | ||
)) |
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.
(pkg-config --print-requires libmongocxx-static | grep -- mongoc2-static || ( | |
( | |
echo "Expected mongoc2-static to be required" >&2 | |
exit 1 | |
) | |
)) | |
if ! pkg-config --print-requires libmongocxx-static | grep -q "mongoc2-static"; then | |
echo "Expected mongoc2-static to be required" >&2 | |
exit 1 | |
fi |
Lot of subshells; this can be reduced to a straightforward conditional.
Use -q
to silence grep matches + per grep manpages:
If no
FILE
is given [...] nonrecursive searches read standard input.
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.
Thank you for the suggestion. Updated.
Restore behavior consistent with r4.0.0. The static bsoncxx / mongocxx pkgconfig file depends on the static bson / mongoc pkg-config files:
In r4.0.0:
In r4.1.0 (before this fix):
Related: This PR does not try to resolve a discovered pre-existing issue CXX-3293 (
BUILD_SHARED_LIBS_WITH_STATIC_MONGOC
appears to incorrectly apply to static libraries, and is not accounted for in pkg-config files).