From: duerst@... Date: 2016-08-10T09:52:20+00:00 Subject: [ruby-core:76816] [Ruby trunk Bug#12663][Open] Compilation error on cygwin Issue #12663 has been updated by Martin D��rst. File mkmf.log added File Makefile added File extconf.h added Status changed from Closed to Open I'm sorry, but r55849 did not fix this at all. I still get exactly the same error messages. I'm attaching various files that have been created in ext/win32/resolv. ---------------------------------------- Bug #12663: Compilation error on cygwin https://bugs.ruby-lang.org/issues/12663#change-60043 * Author: Martin D��rst * 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 ``` ---Files-------------------------------- mkmf.log (89 Bytes) Makefile (8.37 KB) extconf.h (43 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: