Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352758 - sys-libs/libcap-2.20 fails compile on amd64 with USE=pam
Summary: sys-libs/libcap-2.20 fails compile on amd64 with USE=pam
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 352772 352814 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-25 22:36 UTC by Seemant Kulleen
Modified: 2011-02-10 04:11 UTC (History)
5 users (show)

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


Attachments
Patch to fix -fPIC issue (libcap-2.20-amd64-fpic.patch,647 bytes, patch)
2011-01-25 22:37 UTC, Seemant Kulleen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seemant Kulleen 2011-01-25 22:36:33 UTC
This is the error:


/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: pam_cap.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
pam_cap.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [pam_cap.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libcap-2.20/work/libcap-2.20/pam_cap'
make: *** [all] Error 2
emake failed
Comment 1 Seemant Kulleen 2011-01-25 22:37:13 UTC
Created attachment 260722 [details, diff]
Patch to fix -fPIC issue
Comment 2 Seemant Kulleen 2011-01-25 22:37:58 UTC
And this what I propose for src_prepare() in the ebuild:


src_prepare() {
    epatch "${FILESDIR}"/${P}-build-system-fixes.patch
    epatch "${FILESDIR}"/${P}-ignore-RAISE_SETFCAP-install-failures.patch
    epatch "${FILESDIR}"/${P}-amd64-fpic.patch
Comment 3 Seemant Kulleen 2011-01-25 22:38:42 UTC
For completeness, this is my emerge --info:


Portage 2.1.9.35 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.37-gentoo x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 25 Jan 2011 22:00:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.5.4-r4, 2.6.6-r1, 2.7.1, 3.1.3
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.3.4, 4.4.5, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 amr amrnb amrwb applet artworkextra assistant automount avi bash-completion bluetooth branding bzip2 cairo calendar cdaudio cdda cddb cdio cdr cleartype cli consolekit cracklib crypt cscope cups cxx daap dbus desktopglobe device-mapper dga dirac dmx dri dts dv dvd dvdread dvipdfm enca encode exif faac faad fam fame fbcon ffmpeg flac fontconfig fortran fping ftp fuse gdbm geoip geolocation ggi gif git glib glitz gnutls gphoto2 graphviz gs gsm gtk hal hbci hdri humanities iconv id3tag idea idn imagemagick imlib ioctl ipod iproute2 jack jadetex jingle jpeg jpeg2k kde kpathsea ladspa lame lapack laptop lastfm lcms libass libcaca libextractor libnotify libsysfss live lzma lzo mad matroska md5sum mdnsresponder-compat mjpeg mmap mmx mng modules mp3 mp3tunes mp4 mpeg mplayer msn mtp mudflap multilib musepack musicbrainz ncurses nemesi nptl nptlonly offensive ofx ogg openexr opengl openmp openntpd optimisememory oscar pam passwordsave pch pcre pda pdf phonon plasma plotutils png pnm policykit postgres pppd pulseaudio pygments python qt3support qt4 quicktime quotes rar readline redland resolvconf rle rtc samba schroedinger science sdl semantic-desktop session skype speex spell sqlite sqlite3 srt sse sse2 sse3 sse4 ssl ssse3 startup-notification stream subtitles svg sysfs system-sqlite taglib tagwriting tcpd tga theora tiff truetype unicode urandom v4l v4l2 vcd vcdinfo vim-syntax visualization vlm vorbis webkit wifi winpopup wmf x264 xcb xinerama xml xmlpatterns xmp xorg xulrunner xv xvid xvmc yahoo zlib zoran zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="esa intel i810" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Steve Kutnar 2011-01-26 01:03:42 UTC
I just ran into this, too.
Comment 5 Rafał Mużyło 2011-01-26 01:50:14 UTC
Upstream had a git commit on 2010-08-08 to this effect.
Comment 6 SpanKY gentoo-dev 2011-01-26 03:30:11 UTC
dont know what you mean.  upstream had no commit along these lines.

http://sources.gentoo.org/sys-libs/libcap/files/libcap-2.20-build-system-fixes.patch?r1=1.1&r2=1.2
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-26 04:07:02 UTC
*** Bug 352772 has been marked as a duplicate of this bug. ***
Comment 8 Rafał Mużyło 2011-01-26 11:54:19 UTC
And what about http://git.kernel.org/?p=libs/libcap/libcap.git;a=commitdiff;h=7ebd7c568c94a8e617aaf2a00a0b4b097bc910ff;hp=03134f14a65bae774899ade233a70a5c33f97110 ?

(though it was modified a bit in a later commit)
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-26 12:32:26 UTC
*** Bug 352814 has been marked as a duplicate of this bug. ***
Comment 10 SpanKY gentoo-dev 2011-02-10 04:11:01 UTC
that commit moved around the -fPIC flag, but it has no real relation to the issue in this bug.  it's simply shuffling crap from one pile to another.  hence my build rewrite wrt toolchain variables.