[CDRIVER-4249] Undeclared DNS constants and symbols when building with POSIX 2008 Created: 20/Dec/21 Updated: 28/Oct/23 Resolved: 05/Jan/22 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.21.0 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Jeremy Mikola | Assignee: | Ezra Chung |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
8d1af19 for
Seems relevant, but I'm not sure why libmongoc didn't require additional changes (mongodb/mongo-c-driver#910) when instituting that change. Build errors follow:
|
| Comments |
| Comment by Githook User [ 05/Jan/22 ] | |
|
Author: {'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}Message: This allows PHPC to defer entirely to libmongoc for cross-option URI validation Bump libmongoc to 1.21-dev Build changes are ported from upstream CMake changes (see: | |
| Comment by Githook User [ 05/Jan/22 ] | |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message:
| |
| Comment by Jeremy Mikola [ 20/Dec/21 ] | |
|
Just to follow-up, I did add #define _XOPEN_SOURCE 700 to PHPC's AC_LANG_PROGRAM prologues used to detect res_nsearch and res_search. That had no effect on the detection logic (testing locally on Ubuntu 20.04). That's not surprising, as the example programs for linker checks don't reference any of the constants/symbols from the OP. | |
| Comment by Jeremy Mikola [ 20/Dec/21 ] | |
|
Some of the undeclared constants were introduced in
The detection logic for MONGOC_HAVE_RES_NSEARCH and MONGOC_HAVE_RES_SEARCH dates back to build/cmake/FindResSearch.cmake, which has not been recently changed. I wonder if this is related to 1523c42 also adding -D_XOPEN_SOURCE=700 to CMAKE_REQUIRED_DEFINITIONS (not just the libmongoc build flags). The equivalent m4 scripts in PHPC for detecting these DNS APIs are in scripts/autotools/libmongoc/CheckResolv.m4. I'm not sure if there's an equivalent API for defining -D_XOPEN_SOURCE=700 for those Autotools checks, but I'll look into that. |