-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
A user in mongodb/mongo-php-driver#1381 reported the following build error when compiling PHPC with bundled libmongocrypt under Cygwin:
/cygdrive/d/workspace/php-src/ext/mongodb/src/libmongocrypt/src/os_posix/os_dll.c:130:2: error: #error "Don't know how to do mcr_dll_path() on this platform" 130 | #error "Don't know how to do mcr_dll_path() on this platform" | ^~~~~
This appears to be caused by libmongoc depending on `_WIN32` to Cygwin not defining `_WIN32`, which seems intentional per the following discussions:
- https://cygwin.com/pipermail/cygwin-developers/2012-July/010732.html
- https://cygwin.com/pipermail/cygwin/2019-May/241328.html
- https://stackoverflow.com/q/47150492/162228
I don't think the Linux implementation for mcr_dll_path() would work as dlinfo() is not available on Cygwin. Perhaps the _WIN32 check in os_posix/os_dll.c and os_win/os_dll.c could be amended to also consider __CYGWIN__ (per https://sourceforge.net/p/predef/wiki/OperatingSystems/). That would ensure that the Windows-specific implementations of the mcr_dll functions get compiled and used (assuming those APIs work fine under Cygwin).
- is related to
-
MONGOCRYPT-470 Build fails on FreeBSD. Error: Don't know how to get the module path on this platform
- Closed
- links to