[CDRIVER-2324] CMake config doesn't set MONGOC_ENABLE_COMPRESSION in mongoc-config.h Created: 12/Oct/17 Updated: 28/Oct/23 Resolved: 28/Oct/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build, cmake, libmongoc |
| Affects Version/s: | 1.8.0 |
| Fix Version/s: | 1.8.2, 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
In CMakeLists.txt for libmongoc, we first generate mongoc-config.h:
and then handle MONGOC_ENABLE_COMPRESSION:
The configure_file call must come after all the variables it needs are set. |
| Comments |
| Comment by Githook User [ 28/Oct/17 ] | |||||||||||
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: | |||||||||||
| Comment by Githook User [ 28/Oct/17 ] | |||||||||||
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: | |||||||||||
| Comment by Githook User [ 16/Oct/17 ] | |||||||||||
|
Author: {'email': 'github@derickrethans.nl', 'name': 'Derick Rethans', 'username': 'derickr'}Message: | |||||||||||
| Comment by Derick Rethans [ 13/Oct/17 ] | |||||||||||
|
I've added a PR for the latter part of this ticket: https://github.com/mongodb/mongo-c-driver/pull/457 | |||||||||||
| Comment by Derick Rethans [ 13/Oct/17 ] | |||||||||||
|
I have tried the suggestion to set -DENABLE_SNAPPY=no -DENABLE_ZLIB=no, but the result is still the same:
If I look at the test file (test-mongoc-topology.c), I actually see:
As you can see, there is no guard around the test for compressors - assuming that it always exists, whereas the definition in mongoc/mongoc-server-description-private.h looks like:
I believe this guard should be around the use in the test file (tests\test-mongoc-topology.c) too. | |||||||||||
| Comment by A. Jesse Jiryu Davis [ 12/Oct/17 ] | |||||||||||
|
derick this will break C++ builds on platforms with neither snappy or zlib available on the system, I believe. |