From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 319C4203E2; Mon, 25 Jul 2016 21:04:39 +0000 (UTC) Date: Mon, 25 Jul 2016 21:04:39 +0000 From: Eric Wong To: Ben Armstrong Cc: clogger-public@bogomips.org Subject: Re: gem fails to build on Win 7 32 bit, DevKit 3.7.2 (rubyinstaller.org) Message-ID: <20160725210439.GA29810@starla> References: <230a2e9e-a0d3-2473-2cba-567eadc32c88@dymaxion.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <230a2e9e-a0d3-2473-2cba-567eadc32c88@dymaxion.ca> List-Id: Ben Armstrong wrote: > Hi, > > I want to use clogger on Windows with the rubyinstaller.org version of Ruby > 2.2.4. However, the native gem will not build. I have attached the > gem_make.out from my failed attempt. Please resolve or let me know if > there's anything else I can try to help solve this. Is the pure-Ruby version acceptable for you? I wonder if extconf.rb should just bail out with if RUBY_PLATFORM =~ /win32/i raise "C ext not supported on RUBY_PLATFORM=#{RUBY_PLATFORM}" end if this can't be fixed... More comments below... > current directory: c:/Ruby22/lib/ruby/gems/2.2.0/gems/clogger-2.0.2/ext/clogger_ext > c:/Ruby22/bin/ruby.exe -r ./siteconf20160725-8240-12azzw.rb extconf.rb > checking for ruby.h... yes > checking for fcntl.h... yes > checking for F_GETFL in fcntl.h... no > checking for O_NONBLOCK in unistd.h,fcntl.h... yes > checking for CLOCK_MONOTONIC in time.h... yes > checking for clockid_t in time.h... yes > checking for clock_gettime() in time.h... yes I guess ruby/win32.h defines clock_gettime... > checking for localtime_r() in time.h... yes > checking for gmtime_r() in time.h... yes > checking for struct tm.tm_gmtoff in time.h... no > checking for rb_str_set_len() in ruby.h... yes > checking for rb_thread_call_without_gvl() in ruby/thread.h... yes > checking for rb_thread_blocking_region() in ruby.h... no > checking for rb_thread_io_blocking_region() in ruby.h... yes > creating Makefile Can you share the generated Makefile and maybe mkmf.log, too? I can't do much to fix this problem since I don't use non-Free systems, but a non-intrusive patch would be acceptable (even if it's just bailing on the C extension build to force use of the pure Ruby version). > To see why this extension failed to compile, please check the mkmf.log which can be found here: > > c:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/clogger-2.0.2/mkmf.log > > current directory: c:/Ruby22/lib/ruby/gems/2.2.0/gems/clogger-2.0.2/ext/clogger_ext > make "DESTDIR=" clean > > current directory: c:/Ruby22/lib/ruby/gems/2.2.0/gems/clogger-2.0.2/ext/clogger_ext > make "DESTDIR=" > generating clogger_ext-i386-mingw32.def > compiling clogger.c > In file included from clogger.c:11:0: > c:\devkit4.7.2\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/include/sys/time.h:42:13: error: conflicting types for 'gettimeofday' Can you comment out sys/time.h? > In file included from c:/Ruby22/include/ruby-2.2.0/ruby/defines.h:163:0, > from c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:29, > from c:/Ruby22/include/ruby-2.2.0/ruby.h:33, > from clogger.c:1: > c:/Ruby22/include/ruby-2.2.0/ruby/win32.h:318:12: note: previous declaration of 'gettimeofday' was here > In file included from clogger.c:24:0: > blocking_helpers.h:57:0: warning: "stat" redefined [enabled by default] I might fix that aliasing independently in a few minutes... On a side note: I hope to drop the C extension if the pure Ruby version can offer acceptable performance nowadays. I'd be much happier if there's zero chance of somebody downloading an unauditable pre-compiled binary.