Issue #12663 has been reported by Martin Drst. ---------------------------------------- Bug #12663: Compilation error on cygwin https://bugs.ruby-lang.org/issues/12663 * Author: Martin Drst * Status: Open * Priority: Normal * Assignee: Nobuyoshi Nakada * ruby -v: ruby 2.4.0dev (2016-07-30 trunk 55776) [x86_64-cygwin] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- I get the errors below when compiling on cygwin. The problem may already be two or three days old; I'm sorry I overlooked it. ``` make[2]: Entering directory '/cygdrive/c/Data/ruby/ext/win32/resolv' compiling resolv.c In file included from /usr/include/w32api/ras.h:15:0, from /usr/include/w32api/mprapi.h:10, from /usr/include/w32api/iprtrmib.h:9, from /usr/include/w32api/iphlpapi.h:17, from resolv.c:3: /usr/include/w32api/_bsd_types.h:30:27: error: expected ¡Æ=¡Ç, ¡Æ,¡Ç, ¡Æ;¡Ç, ¡Æasm¡Ç or ¡Æ__attribute__¡Ç before ¡Æ__ms_u_long¡Ç typedef unsigned __LONG32 u_long; ^ /usr/include/w32api/inaddr.h:21:5: error: unknown type name ¡Æ__ms_u_long¡Ç u_long S_addr; ^ In file included from /usr/include/w32api/ras.h:16:0, from /usr/include/w32api/mprapi.h:10, from /usr/include/w32api/iprtrmib.h:9, from /usr/include/w32api/iphlpapi.h:17, from resolv.c:3: /usr/include/w32api/_bsd_types.h:30:27: error: expected ¡Æ=¡Ç, ¡Æ,¡Ç, ¡Æ;¡Ç, ¡Æasm¡Ç or ¡Æ__attribute__¡Ç before ¡Æ__ms_u_long¡Ç typedef unsigned __LONG32 u_long; ^ In file included from ../../.././include/ruby/ruby.h:36:0, from ../../.././include/ruby.h:33, from resolv.c:1: resolv.c: In function ¡Æw32error_init¡Ç: resolv.c:8:33: warning: implicit declaration of function ¡Ærb_w32_strerror¡Ç [-Wimplicit-function-declaration] VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ ../../.././include/ruby/defines.h:88:53: note: in definition of macro ¡ÆRB_GNUC_EXTENSION_BLOCK¡Ç #define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) ^ resolv.c:8:17: note: in expansion of macro ¡Ærb_str_new_cstr¡Ç VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ resolv.c:8:33: warning: passing argument 1 of ¡Æstrlen¡Ç makes pointer from integer without a cast [-Wint-conversion] VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ ../../.././include/ruby/defines.h:88:53: note: in definition of macro ¡ÆRB_GNUC_EXTENSION_BLOCK¡Ç #define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) ^ resolv.c:8:17: note: in expansion of macro ¡Ærb_str_new_cstr¡Ç VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ In file included from /usr/include/stdio.h:29:0, from ../../.././include/ruby/defines.h:95, from ../../.././include/ruby/ruby.h:36, from ../../.././include/ruby.h:33, from resolv.c:1: /usr/include/string.h:33:9: note: expected ¡Æconst char *¡Ç but argument is of type ¡Æint¡Ç size_t _EXFUN(strlen,(const char *)); ^ In file included from ../../.././include/ruby/ruby.h:36:0, from ../../.././include/ruby.h:33, from resolv.c:1: ../../.././include/ruby/intern.h:801:20: warning: passing argument 1 of ¡Ærb_str_new_static¡Ç makes pointer from integer without a cast [-Wint-conversion] rb_str_new_static((str), (long)strlen(str)) : \ ^ ../../.././include/ruby/defines.h:88:53: note: in definition of macro ¡ÆRB_GNUC_EXTENSION_BLOCK¡Ç #define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) ^ resolv.c:8:17: note: in expansion of macro ¡Ærb_str_new_cstr¡Ç VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ In file included from ../../.././include/ruby/ruby.h:1980:0, from ../../.././include/ruby.h:33, from resolv.c:1: ../../.././include/ruby/intern.h:726:7: note: expected ¡Æconst char *¡Ç but argument is of type ¡Æint¡Ç VALUE rb_str_new_static(const char *, long); ^ In file included from ../../.././include/ruby/ruby.h:36:0, from ../../.././include/ruby.h:33, from resolv.c:1: resolv.c:8:33: warning: passing argument 1 of ¡Ærb_str_new_cstr¡Ç makes pointer from integer without a cast [-Wint-conversion] VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ ../../.././include/ruby/defines.h:88:53: note: in definition of macro ¡ÆRB_GNUC_EXTENSION_BLOCK¡Ç #define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; }) ^ resolv.c:8:17: note: in expansion of macro ¡Ærb_str_new_cstr¡Ç VALUE str = rb_str_new_cstr(rb_w32_strerror(NUM2INT(code))); ^ In file included from ../../.././include/ruby/ruby.h:1980:0, from ../../.././include/ruby.h:33, from resolv.c:1: ../../.././include/ruby/intern.h:706:7: note: expected ¡Æconst char *¡Ç but argument is of type ¡Æint¡Ç VALUE rb_str_new_cstr(const char*); ^ resolv.c: At top level: cc1: warning: unrecognized command line option ¡Æ-Wno-self-assign¡Ç cc1: warning: unrecognized command line option ¡Æ-Wno-constant-logical-operand¡Ç cc1: warning: unrecognized command line option ¡Æ-Wno-parentheses-equality¡Ç cc1: warning: unrecognized command line option ¡Æ-Wno-tautological-compare¡Ç make[2]: *** [Makefile:247: resolv.o] Error 1 make[2]: Leaving directory '/cygdrive/c/Data/ruby/ext/win32/resolv' make[1]: *** [exts.mk:257: ext/win32/resolv/all] Error 2 make[1]: Leaving directory '/cygdrive/c/Data/ruby' make: *** [uncommon.mk:217: build-ext] Error 2 CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -fno-fast-math -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 -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_GNU_SOURCE -I. -I.ext/include/x86_64-cygwin -I./include -I. -I./enc/unicode/data/8.0.0 DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libruby240.dll.a cygruby240.def -fstack-protector -Wl,--stack,0x00200000,--enable-auto-import SOLIBS = cygruby240.res.o -lpthread -ldl Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible Thread model: posix gcc version 5.4.0 (GCC) generating prelude.c prelude.c unchanged ``` -- 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>