GNU bug report logs - #36342
accept4 detection on illumos needs -lsocket -lnsl

Previous Next

Package: guile;

Reported by: Michal Nowak <mnowak <at> startmail.com>

Date: Sun, 23 Jun 2019 15:19:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Michal Nowak <mnowak <at> startmail.com>
To: 36342 <at> debbugs.gnu.org
Subject: bug#36342: accept4 detection on illumos needs -lsocket -lnsl
Date: Sun, 23 Jun 2019 14:18:10 +0200
Hello,

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:

   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




This bug report was last modified 6 years and 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.