pam_cracklib.c: In function `converse': pam_cracklib.c:191: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_cracklib.c: In function `_pam_unix_approve_pass': pam_cracklib.c:528: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_cracklib.c: In function `pam_sm_chauthtok': pam_cracklib.c:611: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_cracklib.c:642: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_cracklib.c:801: warning: dereferencing type-punned pointer will break strict-aliasing rules gcc -shared -L/var/tmp/portage/pam-0.78/work/Linux-PAM-0.78/lib -o pam_cracklib.so dynamic/pam_cracklib.o -lc -Wl,-Bstatic -Wl,-lcrack -Wl,-Bdynamic -lcrypt -lc -L../pammodutil -lpammodutil -L../../libpam -lpam /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../lib/libcrack.a(fascist.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../lib/libcrack.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [pam_cracklib.so] Error 1 make[2]: Leaving directory `/var/tmp/portage/pam-0.78/work/Linux-PAM-0.78/modules/pam_cracklib' make[1]: *** [all] Error 1 make[1]: Leaving directory `/var/tmp/portage/pam-0.78/work/Linux-PAM-0.78/modules' make: *** [modules] Error 2 !!! ERROR: sys-libs/pam-0.78 failed. !!! Function src_compile, Line 244, Exitcode 2 !!! PAM build failed !!! If you need support, post the topmost build error, NOT this status message.
Jess this is not a security bug. Reassigning to amd64@ and adding pam-bugs@ to the CC: This is a common bug where any object file is compiled as non pic and and packed in an ar archive/*.a file, and that is later used in an attempt to link as ET_DYN shared objects. In short what needs to happen is any *.a files included on amd64, hardened, mips, and some others need to be pic, as you we cant really do XIP in these cases. CFLAGS="-fPIC" emerge crackhead (should work around it for the moment)
I am assuming the issue is from cracklib, as pam even add -fPIC to CFLAGS ...
I was able to work around this problem by temporarily adding -fPIC to my CFLAGS in /etc/make.conf, and then reemerging cracklib. cracklib probably needs an -fPIC patch, though. (I removed -fPIC from my CFLAGS after reemering cracklib.)
sed -i -e 's/-Wl,-Bstatic -Wl,-lcrack -Wl,-Bdynamic/-lcrack/' "${S}"/modules/pam_cracklib/Makefile
*** Bug 83875 has been marked as a duplicate of this bug. ***
Stupid question - shouldnt the static also still be compiled with -fPIC ?
i dont see the point in forcing PIC on libcrack.a when libcrack.so works just fine
Not sure if this is related, but I had a similar problem. Solution was to emerge cracklib-2.8.3-r1 before compiling pam-0.78-r2. Seems to be a broken dependency in the ebuild, and maybe nothing to do with amd64?
I did fix the dependency to cracklib 2.8.3 some time back.