From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 9D5D21F461 for ; Sat, 29 Jun 2019 00:06:30 +0000 (UTC) Received: from localhost ([::1]:37090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hh0su-00086f-Jt for normalperson@yhbt.net; Fri, 28 Jun 2019 20:06:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59489) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hh0sr-00086Z-0b for bug-gnulib@gnu.org; Fri, 28 Jun 2019 20:06:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hh0sp-0000Aj-4R for bug-gnulib@gnu.org; Fri, 28 Jun 2019 20:06:24 -0400 Received: from mo6-p01-ob.smtp.rzone.de ([2a01:238:20a:202:5301::6]:24546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hh0sn-000070-KS for bug-gnulib@gnu.org; Fri, 28 Jun 2019 20:06:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1561766778; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=M5zOMF/X/aI3ThABGBwiXhA8mmegZnqdB2E/9UcWT40=; b=Ki2B0kaRSC7+bgpxQCzIo6J5p5CtXdvenaM+CAUrslDWipJtgskBfvO5HByaEmJReL 5py8I9RjFccEmmKxvSpSgrOTQp8vjusMPUSV32G4KhayYBTu4jeSd9GyJEWBTDLem8cw g3tFy2B1ROFL5AoXdOZkbZlc/taJiOfuXm3jIX2RNrjBOZVDMB+pHozem1qvTX5JP8Mq lrHqH+9XrdGdtogjqmUcUqrpK7nFTP4xPhPr8Pe20BZGeBUfXVPX3feLixM6s/7YysJa R9hEw5sSo740RFy2APQj8bPR0LROK0tkcNdHmixVM/HYCuqsNpLLo6FshBNuV/TtvXOy DJTQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0zJZW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id v018bcv5T066kYx (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 29 Jun 2019 02:06:06 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: bug#36342: accept4 detection on illumos needs -lsocket -lnsl Date: Sat, 29 Jun 2019 02:06:05 +0200 Message-ID: <3505782.aKLV2fzV26@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <87sgrtfied.fsf@netris.org> References: <2f3c5921-d3e9-4c06-4a21-826d7ba58bcf@startmail.com> <87sgrtfied.fsf@netris.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5301::6 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark H Weaver , 36342@debbugs.gnu.org, Michal Nowak Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Michal and Mark, > > GNU Guile 2.2.5 build fails because accept4 detection on OpenIndiana > > 2019.04 (illumos distribution) [1] fails due to "-lsocket -lnsl" not > > being part of the linking process and the build system then tries to > > build it's vendored accept4: > > I believe this is an issue in gnulib, because the relevant autoconf > detection code, as well as the replacement implementation that fails to > compile on OpenIndiana, are imported from gnulib. > > I've CC'd the bug-gnulib@gnu.org mailing list, for input from the gnulib > developers. > > Thanks for this report, > > Mark > > > > CC accept4.lo > > In file included from /usr/include/sys/time.h:462:0, > > from ./sys/time.h:39, > > from /usr/include/sys/select.h:53, > > from ./sys/select.h:36, > > from /usr/include/sys/types.h:640, > > from ./sys/types.h:28, > > from ./sys/socket.h:51, > > from accept4.c:20: > > ./sys/socket.h:1034:1: error: conflicting types for 'accept4' > > _GL_FUNCDECL_SYS (accept4, int, > > ^ > > In file included from ./sys/socket.h:58:0, > > from accept4.c:20: > > /usr/include/sys/socket.h:540:12: note: previous declaration of > > 'accept4' was here > > extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, > > int); > > ^~~~~~~ > > accept4.c:32:1: error: conflicting types for 'accept4' > > accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int > > flags) > > ^~~~~~~ > > In file included from ./sys/socket.h:58:0, > > from accept4.c:20: > > /usr/include/sys/socket.h:540:12: note: previous declaration of > > 'accept4' was here > > extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, > > int); > > ^~~~~~~ > > > > This is fixed by LIBS="-lsocket -lnsl" in the build environment. > > > > This was in the past reported both on the guile-user [2] and > > openindiana-discuss [3] mailing lists, where you also can see the > > build error in full. > > > > Thanks, > > Michal > > > > [1] https://illumos.org/man/3socket/accept4 > > [2] https://lists.gnu.org/archive/html/guile-user/2018-03/msg00006.html > > [3] > > https://openindiana.org/pipermail/openindiana-discuss/2018-March/021931.html Thanks for the report. This patch fixes it. Pushed. Now, guile needs to pick it up. 2019-06-28 Bruno Haible accept4: Fix compilation error on OpenIndiana. Reported by Michal Nowak via Mark H Weaver . * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not whether it exists as a function. diff --git a/m4/accept4.m4 b/m4/accept4.m4 index b38ce30..9b976fb 100644 --- a/m4/accept4.m4 +++ b/m4/accept4.m4 @@ -1,4 +1,4 @@ -# accept4.m4 serial 2 +# accept4.m4 serial 3 dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,8 +11,11 @@ AC_DEFUN([gl_FUNC_ACCEPT4], dnl Persuade glibc to declare accept4(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([accept4]) - if test $ac_cv_func_accept4 != yes; then + AC_CHECK_DECLS([accept4], , , [[ +#include +#include +]]) + if test $ac_cv_have_decl_accept4 != yes; then HAVE_ACCEPT4=0 fi ])