Subject: Re: openpam build breaks on sgimips
To: None <rafal@pobox.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 01/31/2008 00:59:49
rafal@pobox.com wrote:
> all ===> libpam
> pam_ssh.c:(.text+0x938): multiple definition of `pam_sm_authenticate'
:
> Any clues appreciated... haven't had a chance to dig into it yet.. it does
> look like the same sources built fine for sparc64, however.
This is because src/dist/openpam/include/security/openpam.h
assumes __PIC__ means shlib targets but it is not true on mips.
(that's the reason why we have both CSHLIBFLAGS and CPICFLAG)
The attached patch works for me, but I wonder if we should remove
the !defined(__PIC__) check completely or not.
---
Izumi Tsutsui
Index: dist/openpam/include/security/openpam.h
===================================================================
RCS file: /cvsroot/src/dist/openpam/include/security/openpam.h,v
retrieving revision 1.9
diff -u -r1.9 openpam.h
--- dist/openpam/include/security/openpam.h 27 Jan 2008 01:22:58 -0000 1.9
+++ dist/openpam/include/security/openpam.h 30 Jan 2008 15:45:29 -0000
@@ -320,7 +320,7 @@
#define DATA_SET(a, b) __link_set_add_data(a, b)
#endif
-#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
+#if defined(__GNUC__) && (!defined(__PIC__) || defined(__mips__)) && !defined(NO_STATIC_MODULES)
/* gcc, static linking */
# include <sys/cdefs.h>
# ifdef __FreeBSD__