Issue #15097 has been updated by nobu (Nobuyoshi Nakada).


I can't reproduce it, with the trunk and 2.5.2 in the repository, using

```
$ LANG=C i686-pc-cygwin-gcc -v
Using built-in specs.
COLLECT_GCC=i686-pc-cygwin-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/6.4.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /usr/src/ports/cygwin32-gcc/cygwin32-gcc-6.4.0-1.x86_64/src/gcc-6.4.0/configure --srcdir=/usr/src/ports/cygwin32-gcc/cygwin32-gcc-6.4.0-1.x86_64/src/gcc-6.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/cygwin32-gcc --htmldir=/usr/share/doc/cygwin32-gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-pc-cygwin/sys-root --with-build-sysroot=/usr/i686-pc-cygwin/sys-root --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=c,c++,fortran,lto --enable-graphite --enable-linker-build-id --enable-clocale=gnu --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable
 -libssp --disable-symvers --with-default-libstdcxx-abi=gcc4-compatible --with-gnu-ld --with-gnu-as --with-system-zlib
Thread model: posix
gcc version 6.4.0 (GCC) 
```

The last try for `GetNetworkParams` is:
```
"gcc -o conftest.exe -I../../../.ext/include/i386-cygwin -I../../../../src/include -I../../../../src/ext/win32/resolv -D_XOPEN_SOURCE -D_GNU_SOURCE   -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict conftest.c  -L. -L../../.. -L. -fstack-protector     -lruby250-static -liphlpapi  -lpthread -lgmp -ldl  "
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: extern void GetNetworkParams();
14: int t(void) { GetNetworkParams(); return 0; }
/* end */
```

and seems no significant differences than yours.

----------------------------------------
Bug #15097: Gem install fails on Ruby 2.5.1 with Cygwin (get_dns_server_list undefined)
https://bugs.ruby-lang.org/issues/15097#change-73970

* Author: caspercg (Casper G)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [i386-cygwin]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Compiled and installed Ruby 2.5.1 on Cygwin, and now gem install fails with:

~~~ ruby
ERROR:  While executing gem ... (NameError)
    undefined local variable or method `get_dns_server_list' for Win32::Resolv:Module

~~~

While building Ruby I got the following warning:

~~~ ruby
win32/resolv:
        Could not be configured. It will not be installed.
        Check ext/win32/resolv/mkmf.log for more details.
~~~

The error in mkmf.log is:

~~~ ruby
/ruby-2.5.1/ext/win32/resolv/conftest.c:14: undefined reference to `GetNetworkParams'
collect2: error: ld returned 1 exit status
~~~

The mkmf.log is also attached.

Could not figure out how to fix this problem. 
Is 2.5.1 not compatible with Cygwin?



---Files--------------------------------
mkmf.log (3.96 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>