* error compiling shadow 4.1.5.1 @ 2013-05-21 0:17 Matias A. Fonzo 2013-05-21 2:58 ` Isaac Dunham 0 siblings, 1 reply; 6+ messages in thread From: Matias A. Fonzo @ 2013-05-21 0:17 UTC (permalink / raw) To: musl Hi there, I'm trying to compile shadow 4.1.5.1. I receive this error: http://pastebin.com/raw.php?i=9kzU9hfg It seems like some entries are missing in utmp.h: ut_host, ut_addr/ut_addr_v6, ... ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error compiling shadow 4.1.5.1 2013-05-21 0:17 error compiling shadow 4.1.5.1 Matias A. Fonzo @ 2013-05-21 2:58 ` Isaac Dunham 2013-05-21 3:14 ` Rich Felker 0 siblings, 1 reply; 6+ messages in thread From: Isaac Dunham @ 2013-05-21 2:58 UTC (permalink / raw) To: musl; +Cc: selk On Mon, 20 May 2013 21:17:20 -0300 "Matias A. Fonzo" <selk@dragora.org> wrote: > I'm trying to compile shadow 4.1.5.1. I receive this error: > http://pastebin.com/raw.php?i=9kzU9hfg > It seems like some entries are missing in utmp.h: > ut_host, ut_addr/ut_addr_v6, ... 1: musl does not support utmp. A public list of who's logged in is not desired. 2: Just looking at that error, I get the impression that someone either isn't defining a feature-test macro that they should or is omitting a header. AF_INET is defined in sys/socket.h 3: I see no indications that the errors are due to ut_* being absent. I'll see if I can find the problem. HTH, Isaac Dunham ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error compiling shadow 4.1.5.1 2013-05-21 2:58 ` Isaac Dunham @ 2013-05-21 3:14 ` Rich Felker 2013-05-21 4:49 ` Isaac Dunham 0 siblings, 1 reply; 6+ messages in thread From: Rich Felker @ 2013-05-21 3:14 UTC (permalink / raw) To: musl On Mon, May 20, 2013 at 07:58:44PM -0700, Isaac Dunham wrote: > On Mon, 20 May 2013 21:17:20 -0300 > "Matias A. Fonzo" <selk@dragora.org> wrote: > > I'm trying to compile shadow 4.1.5.1. I receive this error: > > > http://pastebin.com/raw.php?i=9kzU9hfg > > > It seems like some entries are missing in utmp.h: > > ut_host, ut_addr/ut_addr_v6, ... > > 1: musl does not support utmp. A public list of who's logged in is not > desired. Well the utmp functions are stubs that don't read or write any data, but the interfaces are there to facilitate compiling programs that expect them to exist. If there are build errors due to stuff being missing, we should add it. > 2: Just looking at that error, I get the impression that someone either > isn't defining a feature-test macro that they should or is omitting a > header. AF_INET is defined in sys/socket.h Indeed. glibc exposes socket stuff indirectly through some other headers, if I'm not mistaken. musl on the other hand avoids pulling in additional headers implicitly. If this is indeed the problem, I think just adding #include <sys/socket.h> to the file would fix it. > 3: I see no indications that the errors are due to ut_* being absent. Agreed. > I'll see if I can find the problem. Thanks for helping with support! Rich ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error compiling shadow 4.1.5.1 2013-05-21 3:14 ` Rich Felker @ 2013-05-21 4:49 ` Isaac Dunham 2013-05-21 12:36 ` John Spencer 0 siblings, 1 reply; 6+ messages in thread From: Isaac Dunham @ 2013-05-21 4:49 UTC (permalink / raw) To: musl On Mon, 20 May 2013 23:14:32 -0400 Rich Felker <dalias@aerifal.cx> wrote: > On Mon, May 20, 2013 at 07:58:44PM -0700, Isaac Dunham wrote: > > On Mon, 20 May 2013 21:17:20 -0300 > > "Matias A. Fonzo" <selk@dragora.org> wrote: > > > I'm trying to compile shadow 4.1.5.1. I receive this error: > > > > > http://pastebin.com/raw.php?i=9kzU9hfg > > > > > It seems like some entries are missing in utmp.h: > > > ut_host, ut_addr/ut_addr_v6, ... Could you please provide some clarification as to your configuration? Specifically, whether PAM is installed, if you disabled nscd (ISTR that being tied in with glibc), and whether musl is installed in parallel with glibc (it could be picking up stuff from /usr/include). I get the impression that the configure script is picking things up when it shouldn't. Specifically, it "detects" several features that may be from /usr. > > 1: musl does not support utmp. A public list of who's logged in is > > not desired. > > Well the utmp functions are stubs that don't read or write any data, > but the interfaces are there to facilitate compiling programs that > expect them to exist. If there are build errors due to stuff being > missing, we should add it. > > > 2: Just looking at that error, I get the impression that someone > > either isn't defining a feature-test macro that they should or is > > omitting a header. AF_INET is defined in sys/socket.h > > Indeed. glibc exposes socket stuff indirectly through some other > headers, if I'm not mistaken. musl on the other hand avoids pulling in > additional headers implicitly. If this is indeed the problem, I think > just adding #include <sys/socket.h> to the file would fix it. > > 3: I see no indications that the errors are due to ut_* being > > absent. > > Agreed. Adding <sys/socket.h> above <netdb.h> helps get it building. There are still issues...but they show up due to ut_addr_v6 being detected in struct utmp. The errors: utmp.c: In function 'prepare_utmp': utmp.c:267: error: dereferencing pointer to incomplete type utmp.c:268: error: dereferencing pointer to incomplete type utmp.c:268: error: dereferencing pointer to incomplete type utmp.c:274: error: dereferencing pointer to incomplete type utmp.c:275: error: dereferencing pointer to incomplete type utmp.c:275: error: dereferencing pointer to incomplete type make[2]: *** [utmp.o] Error 1 Lines 265-277: #ifdef HAVE_STRUCT_UTMP_UT_ADDR_V6 memcpy (utent->ut_addr_v6, &(sa->sin_addr), MIN (sizeof (utent->ut_addr_v6), sizeof (sa->sin_addr))); } else if (info->ai_family == AF_INET6) { struct sockaddr_in6 *sa = (struct sockaddr_in6 *)info->ai_addr; memcpy (utent->ut_addr_v6, &(sa->sin6_addr), MIN (sizeof (utent->ut_addr_v6), sizeof (sa->sin6_addr))); #endif /* HAVE_STRUCT_UTMP_UT_ADDR_V6 */ And config.h: /* Define to 1 if `ut_addr_v6' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_ADDR_V6 undefining this makes it build. But it seems that ut_addr_v6 is a member of struct utmpx, and that should be enough... Finally, there's an unconditional use of ruserok; of course they check whether it returns 0 or 1 on failure, but assume it's present! Welcome to autoconf, the build system that will make sure you have ANSI C89 headers, but won't make sure you have a function that never even made it into POSIX. And tcb.h is missing, which means shadow won't enable it. HTH, Isaac Dunham ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error compiling shadow 4.1.5.1 2013-05-21 4:49 ` Isaac Dunham @ 2013-05-21 12:36 ` John Spencer 2013-05-22 0:42 ` Isaac Dunham 0 siblings, 1 reply; 6+ messages in thread From: John Spencer @ 2013-05-21 12:36 UTC (permalink / raw) To: musl On 05/21/2013 06:49 AM, Isaac Dunham wrote: > Adding<sys/socket.h> above<netdb.h> helps get it building. [...] > undefining this makes it build. do you have a patch handy ? maybe we also should report the bugs upstream. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: error compiling shadow 4.1.5.1 2013-05-21 12:36 ` John Spencer @ 2013-05-22 0:42 ` Isaac Dunham 0 siblings, 0 replies; 6+ messages in thread From: Isaac Dunham @ 2013-05-22 0:42 UTC (permalink / raw) To: musl On Tue, 21 May 2013 14:36:26 +0200 John Spencer <maillist-musl@barfooze.de> wrote: > On 05/21/2013 06:49 AM, Isaac Dunham wrote: > > Adding<sys/socket.h> above<netdb.h> helps get it building. > [...] > > undefining this makes it build. In other words, use this command line: ac_cv_member_struct_utmp_ut_addr_v6=no \ ac_cv_member_struct_utmpx_ut_addr_v6=no \ /configure --without-nscd --without-libpam But "it" is "one particular file", not the whole package. login still FTBFS. ut_addr_v6 being detected breaks things for a completely unrelated reason, though: sizeof(sa->sin_addr) and sizeof(sa->sin6_addr) are failing. But what's a good replacement? Or shall we make it transparent? > do you have a patch handy ? See this part: > > Finally, there's an unconditional use of ruserok; of course they > > check whether it returns 0 or 1 on failure, but assume it's present! > maybe we also should report the bugs upstream. The status at present: -missing <sys/socket.h> in libmisc/utmp.c -need to make ruserok conditional. -(musl or upstream bug?) shadow assumes that members sin(6)_addr of struct sockaddr_in (type struct in(6)_addr) are completely defined. Do we want to implement ruserok? Here's a (public domain) ruserok stub conforming to the manual description: int ruserok(const char *rhost, int s, const char *ruser, const char *luser) { return -1; } Thanks, Isaac Dunham ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-22 0:42 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-21 0:17 error compiling shadow 4.1.5.1 Matias A. Fonzo 2013-05-21 2:58 ` Isaac Dunham 2013-05-21 3:14 ` Rich Felker 2013-05-21 4:49 ` Isaac Dunham 2013-05-21 12:36 ` John Spencer 2013-05-22 0:42 ` Isaac Dunham
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/musl/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).