[Pkg-shadow-devel] [pkg-shadow-Bugs][314271] Shadow FTBFS with musl libc

pkg-shadow-bugs at alioth.debian.org pkg-shadow-bugs at alioth.debian.org
Thu May 23 01:27:51 UTC 2013


pkg-shadow-Bugs item #314271, was opened at 2013-05-23 01:27 by Isaac Dunham
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411478&aid=314271&group_id=30580

Status: Open
Priority: 3
Submitted By: Isaac Dunham (idunham-guest)
Assigned to: Nobody (None)
Summary: Shadow FTBFS with musl libc 
Category: None
Group: None
Resolution: None


Initial Comment:
I attempted to build shadow 4.1.5.1 with musl libc (http://www.musl-libc.org/), and ran into a few issues:
1: missing <sys/socket.h> in libmisc/utmp.c
glibc includes several headers from <netdb.h>; <sys/socket.h> is one of these.
2: libmisc/utmp.c assumes that member sin_addr of
struct sockaddr_in (type struct in_addr) is completely defined.

musl has a policy of not making implementation-specific details public unless necessary; this is the full definition:
struct sockaddr_in
{
	sa_family_t sin_family;
	in_port_t sin_port;
	struct in_addr sin_addr;
	uint8_t sin_zero[8];
};
However, upstream may be willing to change this.

WORKAROUND:
export ac_cv_member_struct_utmp_ut_addr_v6=no  ac_cv_member_struct_utmpx_ut_addr_v6=no
before running configure.


-need to make ruserok conditional.
ruserok is a nonstandard function, but it is not checked for, and musl does not currently implement it.
The proper solution would be to check for it in configure and either disable that codepath or else add a stub/alternate implementation.

There is no __MUSL__-type macro; upstream's view is that any implementation-specific details may be changed at any point so this is a short-term fix at best.

STEPS TO REPRODUCE:
git clone git://git.musl-libc.org/musl
cd musl
./configure --prefix=/opt/musl --bindir=/opt/musl/bin
make
su -c "make install" root
cd ..
#go to the shadow source directory.
CC=/opt/musl/bin/musl-gcc \
./configure --without-nscd --without-libpam
make

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411478&aid=314271&group_id=30580



More information about the Pkg-shadow-devel mailing list