From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: raindrops-public@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BC4DE20317; Tue, 14 Jul 2015 20:18:09 +0000 (UTC) Date: Tue, 14 Jul 2015 20:18:14 +0000 From: Eric Wong To: Doug Forster Cc: raindrops-public@bogomips.org Subject: Re: raindrops fails to install with ruby 2.2.2 Message-ID: <20150714201814.GA31981@dcvr.yhbt.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: Please don't send HTML portions in email, it is bloated and spammy and incompatible with lists we may Cc: ...And I expect musl users to care about bloat like that :> Doug Forster wrote: > Problem seems to be the removal of rb_thread_blocking_region in ruby. Actually, that's a red herring, raindrops 0.13.0 onwards accounts for that. > System Info: > ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-musl] > alpine linux > make "DESTDIR=" > compiling linux_tcp_info.c > linux_tcp_info.c:5:23: fatal error: linux/tcp.h: No such file or directory > #include > ^ > compilation terminated. > Makefile:237: recipe for target 'linux_tcp_info.o' failed > make: *** [linux_tcp_info.o] Error 1 > > make failed, exit code 2 This is the problem, raindrops blindly assumed Linux machines all have linux/tcp.h header. I've added a check for that. I'll push out the patch below and release 0.14.1 final soon. I've pushed out raindrops 0.14.0.1.g8177 with the patch below. You should be able to install it using: gem install --pre raindrops -v 0.14.0.1.g8177 If possible, can you test and make sure there's no other issues? Thanks. ------------------------------ 8< ---------------------------- From: Eric Wong Date: Tue, 14 Jul 2015 20:08:49 +0000 Subject: [PATCH] check for the existence of linux/tcp.h The linux/tcp.h header may not exist on alternative libc implementations such as musl. Noticed-by: Doug Forster --- ext/raindrops/extconf.rb | 1 + ext/raindrops/linux_tcp_info.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb index f012808..74ed8f9 100644 --- a/ext/raindrops/extconf.rb +++ b/ext/raindrops/extconf.rb @@ -6,6 +6,7 @@ $CPPFLAGS += " -D_GNU_SOURCE " have_func('mremap', 'sys/mman.h') +have_header('linux/tcp.h') $CPPFLAGS += " -D_BSD_SOURCE " have_func("getpagesize", "unistd.h") diff --git a/ext/raindrops/linux_tcp_info.c b/ext/raindrops/linux_tcp_info.c index dcdb153..5e25d4d 100644 --- a/ext/raindrops/linux_tcp_info.c +++ b/ext/raindrops/linux_tcp_info.c @@ -1,4 +1,4 @@ -#ifdef __linux__ +#if defined(__linux__) && defined(HAVE_LINUX_TCP_H) #include #include #include @@ -170,4 +170,4 @@ void Init_raindrops_linux_tcp_info(void) TCPI_DEFINE_METHOD(total_retrans); } #endif /* TCP_INFO */ -#endif /* __linux__ */ +#endif /* defined(__linux__) && defined(HAVE_LINUX_TCP_H) */ -- EW