-
Notifications
You must be signed in to change notification settings - Fork 201
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
Compilation error under cygwin #1381
Comments
Regarding the Regarding the build error in
Using the Linux implementation of I think the correct fix here would be to amend the If you don't actually needed libmongocrypt, you can specify |
Thanks. After specifying the /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: ext/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-client.o: in function `_mongoc_get_rr_search':
/cygdrive/d/workspace/php-src/ext/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-client.c:499: undefined reference to `__ns_initparse'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/d/workspace/php-src/ext/mongodb/src/libmongoc/src/libmongoc/src/mongoc/mongoc-client.c:511: undefined reference to `__ns_parserr'
collect2: error: ld returned 1 exit status
make: *** [Makefile:291: bin/php] Error 1 |
That last error matches what was originally reported in #848 (older issue from 2018). Based on https://bugs.bitlbee.org/ticket/1098, it looks like these APIs aren't available under Cygwin at all. I expect the fix for this issue would require a similar patch for libmongoc; however, libmongoc does not support or test on Cygwin (it's only mentioned in passing in the install docs). The closest environment in their CI matrix appears to be MinGW. As for the PHP driver, our Windows builds are only tested with the standard PHP SDK, which uses Visual Studio and the Is there any reason you can't use Visual Studio and the PHP SDK to compile the driver and/or just use a DLL? I realize those were unavailable for the past few months after PECL stopped building them, but we recently started attaching DLLs for various Windows environments to our GitHub releases as a work around. |
@jmikola Best regards. |
Bug Report
Compilation error under cygwin
Environment
CYGWIN_NT-10.0-19042 pc-08 3.3.6-341.x86_64 2022-09-05 11:15 UTC x86_64 Cygwin
Cygwin Packages
Test Script
Configure
Build
Expected and Actual Behavior
successfully compiled
Debug Log
The text was updated successfully, but these errors were encountered: