Subject: Re: 2007Q1 -> security/pam-pwauth_suid build failed on
To: Blair Sadewitz <blair.sadewitz@gmail.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: pkgsrc-users
Date: 06/14/2007 18:41:21
This is a multipart MIME message.

--==_Exmh_2704371186390
Content-Type: text/plain; charset=us-ascii


blair.sadewitz@gmail.com said:
> you just have to add -fPIC to your CFLAGS

Ah yes -- I thought I had committed this or at least posted a patch.
Can you try the appended patch?

> this package should probably be built with libtool

Probably... It would be more portable, but otoh there are
more OS specifics as the shlib major version and the install
location.

best regards
Matthias



--==_Exmh_2704371186390
Content-Type: text/plain ; name="pam.txt"; charset=us-ascii
Content-Description: pam.txt
Content-Disposition: attachment; filename="pam.txt"

Index: security/pam-pwauth_suid/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/pam-pwauth_suid/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- security/pam-pwauth_suid/Makefile	24 Mar 2007 19:21:31 -0000	1.2
+++ security/pam-pwauth_suid/Makefile	14 Jun 2007 16:29:05 -0000
@@ -9,7 +9,8 @@
 
 NO_CHECKSUM=	yes
 WRKSRC=		${WRKDIR}
-CFLAGS+=	-DPATH_HELPER=\"${PREFIX}/libexec/pwauth_suid_helper\"
+
+HLPDEF+=	-DPATH_HELPER=\"${PREFIX}/libexec/pwauth_suid_helper\"
 
 INSTALLATION_DIRS=	lib/security libexec
 
@@ -19,7 +20,8 @@
 
 do-build:
 	(cd ${WRKSRC} && \
-	 ${CC} ${CFLAGS} -shared pam_pwauth_suid.c -o pam_pwauth_suid.so.0 && \
+	 ${CC} ${CFLAGS} -c -fPIC ${HLPDEF} pam_pwauth_suid.c && \
+	 ${LD} -shared pam_pwauth_suid.o -o pam_pwauth_suid.so.0 && \
 	 ${CC} ${CFLAGS} pwauth_suid_helper.c -o pwauth_suid_helper -lcrypt)
 
 do-install:

--==_Exmh_2704371186390--