Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83899 - pam 0,78 fail on amd 64 when compiling pam_cracklib
Summary: pam 0,78 fail on amd 64 when compiling pam_cracklib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: PAM Gentoo Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 83875 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-02 16:44 UTC by Jess Aunsbjørn
Modified: 2011-10-30 22:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jess Aunsbjørn 2005-03-02 16:44:31 UTC
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.
Comment 1 solar (RETIRED) gentoo-dev 2005-03-02 17:03:26 UTC
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)
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-03 01:30:34 UTC
I am assuming the issue is from cracklib, as pam even add -fPIC to CFLAGS ...
Comment 3 Chris Parrott (RETIRED) gentoo-dev 2005-03-03 11:45:54 UTC
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.)
Comment 4 SpanKY gentoo-dev 2005-03-03 12:59:09 UTC
sed -i -e 's/-Wl,-Bstatic -Wl,-lcrack -Wl,-Bdynamic/-lcrack/' "${S}"/modules/pam_cracklib/Makefile
Comment 5 SpanKY gentoo-dev 2005-03-03 15:20:02 UTC
*** Bug 83875 has been marked as a duplicate of this bug. ***
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-03-03 17:41:54 UTC
Stupid question - shouldnt the static also still be compiled with -fPIC ?
Comment 7 SpanKY gentoo-dev 2005-04-11 17:57:46 UTC
i dont see the point in forcing PIC on libcrack.a when libcrack.so works just fine
Comment 8 Matt Zukowski 2005-05-18 18:28:32 UTC
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?
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-04 07:46:34 UTC
I did fix the dependency to cracklib 2.8.3 some time back.