Bug 230743 - sys-libs/pam-0.99.9.0 - pam_lastlog.c:333: error: 'S_IRUSR' undeclared (first use in this function)
Bug#: 230743 Product:  Gentoo Linux Version: unspecified Platform: MIPS
OS/Version: Linux Status: CLOSED Severity: normal Priority: P2
Resolution: FIXED Assigned To: mips@gentoo.org Reported By: jka@inthewings.net
Component: Core system
URL: 
Summary: sys-libs/pam-0.99.9.0 - pam_lastlog.c:333: error: 'S_IRUSR' undeclared (first use in this function)
Keywords:  
Status Whiteboard: 
Opened: 2008-07-04 15:55 0000
Description:   Opened: 2008-07-04 15:55 0000
pam_lastlog.c is failing to build with the following error report:

pam_lastlog.c: In function 'last_login_read':
pam_lastlog.c:199: warning: implicit declaration of function 'asprintf'
pam_lastlog.c: In function 'last_login_date':
pam_lastlog.c:333: error: 'S_IRUSR' undeclared (first use in this function)
pam_lastlog.c:333: error: (Each undeclared identifier is reported only once
pam_lastlog.c:333: error: for each function it appears in.)
pam_lastlog.c:333: error: 'S_IWUSR' undeclared (first use in this function)
pam_lastlog.c:333: error: 'S_IRGRP' undeclared (first use in this function)
pam_lastlog.c:333: error: 'S_IROTH' undeclared (first use in this function)
make[3]: *** [pam_lastlog.lo] Error 1

This is on a Lemote Fulong machine, so we are dealing with a Mips Loongson 2E
chipset.

Reproducible: Always

Steps to Reproduce:
1. emerge pam
2.
3.

Actual Results:  
Build fails

Expected Results:  
Build should succeed

Will submit full build log, ebuild environment file, and emerge --info output
as attachments.

------- Comment #1 From Jon Akers 2008-07-04 15:56:56 0000 -------
Created an attachment (id=159539) [details]
emerge --info output

------- Comment #2 From Jon Akers 2008-07-04 15:57:17 0000 -------
Created an attachment (id=159540) [details]
Build environment

------- Comment #3 From Jon Akers 2008-07-04 15:57:37 0000 -------
Created an attachment (id=159541) [details]
build log of failed build

------- Comment #4 From Diego E. 'Flameeyes' Pettenò 2008-07-04 16:37:34 0000 -------
Does 1.0.1 work?

------- Comment #5 From Jon Akers 2008-07-04 17:18:46 0000 -------
1.0.1 does compile and install without problems. Of course, now emerge world
wants to downgrade it, but I can deal with that.

------- Comment #6 From Diego E. 'Flameeyes' Pettenò 2008-07-04 17:25:13 0000 -------
MIPS team can you keyword a newer version please? Thanks.

------- Comment #7 From Ricardo Mendoza 2008-07-05 15:57:48 0000 -------
I have keyworded ~mips sys-libs/pam-1.0.1 and sys-auth/pambase-20080318.
Regarding the compile problem of 0.99.9.0... I tried with my O2 several times
and I couldnt trigger that bug you are finding in pam_lastlog.c, those defines
that seem to be missing come from sys/stat.h which clears correctly at
configure time in your bootlog, only difference with our env is that I am using
binutils 2.17. Therefore, might be related to bug #224237, try downgrading.

------- Comment #8 From Diego E. 'Flameeyes' Pettenò 2008-07-23 15:08:41 0000 -------
Considering fixed as 0.99.x is unsupported by now.

------- Comment #9 From Jon Akers 2008-07-23 15:39:36 0000 -------
Sounds good to me. Closing.