[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#333141: pam: FTBFS on hurd-i386: Unconditional use of -DWITH_SELINUX



Hi,

I tried current svn (svn://svn.debian.org/pkg-pam/trunk/pam/), and the
following issues arose:

1) PATH_MAX usage in modules/pam_cracklib/pam_cracklib.c:

 gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libpam/include
-I../../libpamc/include -g -D_GNU_SOURCE -D_REENTRANT -fPIC -O2 -MT
pam_cracklib.lo -MD -MP -MF .deps/pam_cracklib.Tpo -c pam_cracklib.c
-fPIC -DPIC -o .libs/pam_cracklib.o
pam_cracklib.c:97: error: 'PATH_MAX' undeclared here (not in a function)
make[4]: *** [pam_cracklib.lo] Error 1

This is unfortunate as it is in a struct, so fixing this properly is
maybe not easy.  One possiblity is to just conditionalize the
libcracklib2-dev Build-Depends for hurd-i386 which makes the build
ignore pam_cracklib and continue successfully, however the build then
later aborts in binary-arch stage because the pam-cracklib package
cannot find its files.  I am not sure what to best do here, maybe a
Debian-specific #define PATH_MAX 4096 at the top of pam_cracklib.c is
easiest.

2) Various libpam source files #include <pthread.h> and use functions
like pthread_mutex_lock(), but libpam does not link to -lpthread.  This
works on GNU/Linux where libpthread is inside libc, but not on GNU/Hurd
where it is seperate:

gcc -I../../../libpam/include -I../../../libpamc/include -I./.. -fpie -g
-D_GNU_SOURCE -D_REENTRANT -fPIC -O2 -pie -Wl,--as-needed -Wl,-O1 -o
.libs/upperLOWER upperLOWER.o
-L/build/mbanck/pam-0.99.7.1/Linux-PAM/libpam
/build/mbanck/pam-0.99.7.1/Linux-PAM/libpam/.libs/libpam.so -ldl
/build/mbanck/pam-0.99.7.1/Linux-PAM/libpam/.libs/libpam.so: undefined
reference to `pthread_mutex_lock'
/build/mbanck/pam-0.99.7.1/Linux-PAM/libpam/.libs/libpam.so: undefined
reference to `pthread_mutex_unlock'
collect2: ld returned 1 exit status

When I add -lpthread to libpam_la_LINK in libpam/Makefile, this works
fine, but I believe this is a general problem in the build system which
should get fixed properly in configure.in and Makefile.am etc.

3) debian/patches-applied/038_support_hurd has a leftover hunk about
MAXPATHLEN for modules/pam_rhosts/pam_rhosts_auth.c which yields this
build error:

 gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libpam/include
-I../../libpamc/include -g -D_GNU_SOURCE -D_REENTRANT -fPIC -O2 -MT
pam_rhosts_auth.lo -MD -MP -MF .deps/pam_rhosts_auth.Tpo -c
pam_rhosts_auth.c  -fPIC -DPIC -o .libs/pam_rhosts_auth.o
pam_rhosts_auth.c: In function 'pam_iruserok':
pam_rhosts_auth.c:593: error: 'pbuf' undeclared (first use in this
function)
pam_rhosts_auth.c:593: error: (Each undeclared identifier is reported
only once
pam_rhosts_auth.c:593: error: for each function it appears in.)
make[4]: *** [pam_rhosts_auth.lo] Error 1

as pbuf got otherwise removed from this file, this hunk should get
removed as well (it seems the other MAXPATHLEN related hunks already got
removed from 038_support_hurd)

4) modules/pam_xauth/pam_xauth.c needs porting:

 gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libpam/include
-I../../libpamc/include -g -D_GNU_SOURCE -D_REENTRANT -fPIC -O2 -MT
pam_xauth.lo -MD -MP -MF .deps/pam_xauth.Tpo -c pam_xauth.c  -fPIC -DPIC
-o .libs/pam_xauth.o
pam_xauth.c:38:23: error: sys/fsuid.h: No such file or directory
pam_xauth.c: In function 'check_acl':
pam_xauth.c:203: error: 'PATH_MAX' undeclared (first use in this
function)
pam_xauth.c:203: error: (Each undeclared identifier is reported only
once
pam_xauth.c:203: error: for each function it appears in.)
make[4]: *** [pam_xauth.lo] Error 1

This doesn't look so bad, it can probably be easily fixed in a way
acceptable to upstream.

5) After hacking around the above issues I got

debian/tmp/usr/share/man/man5/namespace.conf.5: No such file or
directory at /usr/bin/dh_installman line 120, <IN> line 333.

which is pretty weird considering that this shouldn't be arch-specific
at all.  Maybe some bogus error from restarting dpkg-buildpackage too
much.


Michael



Reply to: