|
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:
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).
|