Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 213165

Summary: sys-auth/pam_passwdqc-1.0.5 fails compilation on g/fbsd
Product: Gentoo Linux Reporter: MT <toffanin.mauro>
Component: Current packagesAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 2007.0   
Hardware: AMD64   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 210767    
Attachments: scanelf-textrel.log

Description MT 2008-03-12 16:49:20 UTC
just a reminder for Flameeyes, pam_passwdqc lack a --shared linker option:

>>> Compiling source in /var/tmp/portage/sys-auth/pam_passwdqc-1.0.5/work/pam_passwdqc-1.0.5 ...
case "`uname -s`" in \
        Linux)  gmake CFLAGS="-Wall -fPIC -O2 -march=athlon64 -pipe -O2 -DHAVE_SHADOW" \
                        LDFLAGS="-Wl,-O1 --shared -Wl,--version-script,pam_passwdqc.map" LDLIBS="-lpam -lcrypt" \
                        pam_passwdqc.so;; \
        SunOS)  gmake CFLAGS="-Wall -fPIC -O2 -march=athlon64 -pipe -O2 -DHAVE_SHADOW" \
                        LD=ld LDFLAGS="-Wl,-O1 -G" LDLIBS="-lpam -lcrypt" \
                        pam_passwdqc.so;; \
        HP-UX)  gmake CFLAGS="-Wall -fPIC -O2 -march=athlon64 -pipe -O2 -DHAVE_SHADOW" \
                        LD=ld LDFLAGS="-Wl,-O1 -b" LDLIBS="-lpam -lsec" \
                        pam_passwdqc.so;; \
        *)      gmake pam_passwdqc.so;; \
        esac
gmake[1]: Entering directory `/var/tmp/portage/sys-auth/pam_passwdqc-1.0.5/work/pam_passwdqc-1.0.5'
i686-gentoo-freebsd6.2-gcc -Wall -fPIC -O2 -march=athlon64 -pipe -O2 -c pam_passwdqc.c
i686-gentoo-freebsd6.2-gcc -Wall -fPIC -O2 -march=athlon64 -pipe -O2 -c passwdqc_check.c
pam_passwdqc.c: In function 'say':
pam_passwdqc.c:195: warning: the address of 'buffer' will always evaluate as 'true'
i686-gentoo-freebsd6.2-gcc -Wall -fPIC -O2 -march=athlon64 -pipe -O2 -c passwdqc_random.c
i686-gentoo-freebsd6.2-gcc -Wall -fPIC -O2 -march=athlon64 -pipe -O2 -c wordset_4k.c
i686-gentoo-freebsd6.2-gcc -Wl,-O1 pam_passwdqc.o passwdqc_check.o passwdqc_random.o wordset_4k.o -lpam -lcrypt -o pam_passwdqc.so
/usr/lib/gcc/i686-gentoo-freebsd6.2/4.2.3/../../../crt1.o: In function `_start':
(.text+0x80): undefined reference to `main'
collect2: ld returned 1 exit status
gmake[1]: *** [pam_passwdqc.so] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/sys-auth/pam_passwdqc-1.0.5/work/pam_passwdqc-1.0.5'
gmake: *** [all] Error 2


and a -fPIC (see attachment):

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see http://hardened.gentoo.org/pic-fix-guide.xml
 *  Please include this file in your report:
 *  /var/tmp/portage/sys-auth/pam_passwdqc-1.0.5/temp/scanelf-textrel.log
 * TEXTREL lib/security/pam_passwdqc.so
Comment 1 MT 2008-03-12 16:51:18 UTC
Created attachment 145914 [details]
scanelf-textrel.log
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2008-07-31 03:35:19 UTC
Fixed, in CVS.