Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414665 - sys-fs/cryptsetup shared library always needs other library packages (regardless of USE=static)
Summary: sys-fs/cryptsetup shared library always needs other library packages (regardl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-05 04:51 UTC by Egor Y. Egorov
Modified: 2012-05-11 09:29 UTC (History)
0 users

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


Attachments
build.log (build.log,58.14 KB, text/plain)
2012-05-11 08:36 UTC, Egor Y. Egorov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2012-05-05 04:51:37 UTC
If USE=static set, cryptsetup-1.4.1.ebuild depends (not rdepends) on sys-fs/lvm2. But libcryptsetup.so.4.0.0 is dynamically linked with the libdevmapper.so.1.02 after installation.

Reproducible: Always

Steps to Reproduce:
1. USE=static emerge -1 =cryptsetup-1.4.1
2. ldd /usr/lib64/libcryptsetup.so.4.0.0 | grep libdev

Actual Results:  
        libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02 (0x00007f521d600000)


Expected Results:  
not show this

This fact causes a problem when installing cryptsetup using binhost.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-05-05 16:16:02 UTC
Because it's in / and not in /usr, it should stay always dynamically linked, the USE="static" is there only for libraries installed in /usr as a workaround.

So it seems to me like this would be the only change needed to correct this:

--- cryptsetup-1.4.1-r1.ebuild
+++ cryptsetup-1.4.1-r1.ebuild
@@ -24,8 +24,8 @@
 		dev-libs/libgpg-error
 		>=dev-libs/popt-1.7
 		>=sys-apps/util-linux-2.17.2
-		>=sys-fs/lvm2-2.02.64
 	)
+	>=sys-fs/lvm2-2.02.64
 	>=sys-fs/udev-124
 	>=sys-libs/e2fsprogs-libs-1.41
 	selinux? ( sys-libs/libselinux )
Comment 2 Egor Y. Egorov 2012-05-11 01:35:29 UTC
Sorry for the long silence.

I am sure that if libcryptsetup.so is dynamically linked with the libdevmapper.so, sys-fs/lvm2 should be in RDEPEND.
Comment 3 SpanKY gentoo-dev 2012-05-11 08:05:28 UTC
no, USE=static is to create a static executable.  / vs /usr doesn't matter.  that has always been the meaning of that flag.

works fine for me:
# USE='static static-libs' emerge cryptsetup -pv
[ebuild   R    ] sys-fs/cryptsetup-1.4.1-r1  USE="nls static (-selinux)" 0 kB
# ldd /sbin/cryptsetup
        not a dynamic executable

you need to post `emerge --info` to all of your bug reports, as well as the full build log
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-05-11 08:14:43 UTC
(In reply to comment #3)
> no, USE=static is to create a static executable.  / vs /usr doesn't matter. 
> that has always been the meaning of that flag.

acknowledged
Comment 5 Egor Y. Egorov 2012-05-11 08:33:56 UTC
(In reply to comment #3)
> no, USE=static is to create a static executable.  / vs /usr doesn't matter. 
> that has always been the meaning of that flag.
> 
> works fine for me:
> # USE='static static-libs' emerge cryptsetup -pv
> [ebuild   R    ] sys-fs/cryptsetup-1.4.1-r1  USE="nls static (-selinux)" 0 kB
> # ldd /sbin/cryptsetup
>         not a dynamic executable
> 
> you need to post `emerge --info` to all of your bug reports, as well as the
> full build log

Yes, /sbin/cryptsetup not a dynamic executable in my case. But wath about /usr/lib64/libcryptsetup.so.4.0.0?


# emerge --info
Portage 2.2.0_alpha103 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.3.5-zen+ x86_64)
=================================================================
System uname: Linux-3.3.5-zen+-x86_64-Pentium-R-_Dual-Core_CPU_E6300_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Thu, 10 May 2012 07:05:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.6 [disabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo crossdev-overlay rion java-overlay mellon aidecoe systemd gamerlay-stable x11 enlightenment-niifaq perl-experimental lcd-filtering local NavSystem crg-slepnoga
Installed sets: @my-e, @navsys-meta, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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 /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"                                                                                                             
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch parallel-install parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"            
FFLAGS=""
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://xeon.gentoo.ru/"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j4"
PKGDIR="/home/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/package.skip"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/overlays/crossdev-overlay /var/overlays/layman/rion /var/overlays/layman/java-overlay /var/overlays/layman/mellon /var/overlays/layman/aidecoe /var/overlays/layman/systemd /var/overlays/layman/gamerlay /var/overlays/layman/x11 /var/overlays/layman/enlightenment-niifaq /var/overlays/layman/perl-experimental /var/overlays/layman/lcd-filtering /var/overlays/local /var/overlays/NavSystem /var/overlays/slepnoga/crg"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3gp 7zip X a52 aac acl acpi ads alsa amd64 amr apache2 apm assistant avahi bash-completion berkdb bineditor bittorrent bluetooth branding bzip2 cairo cdda cdr cleartype cli clucene cluster consolekit cracklib crypt cups cxx dbus debugger declarative dirac directfb djvu dri dts dvd dvdr dvi emboss emerald encode eps exif fam fbcon fbcondecor fbsplash festival ffmpeg fftw firefox flac fontconfig fortran freetds ftdi fts3 gallium gd gdbm gdu gif git gles glitz gnutls gpm gps gsm gstreamer handbook hdf5 iconv icq icu ipv6 ithreads jabber jingle jpeg kde kerberos lame laptop latex lcdfilter lcms ldap lib32 libkms libnotify lm_sensors lxde lzma mad maps matroska mdnsresponder-compat melt mercurial midi mikmod mmx mng modules mozilla mp3 mp4 mpeg mpi mssql mudflap multilib mysql ncurses networkmanager nls nptl nspluginwrapper ntfsprogs objc objc++ odbc odk ogg okteta opengl openmp oscar pam pango pcre pdf pdfimport phonon plasma plymouth png policykit postgres ppds ppp pppd private-headers ps python2 python3 qml qt qt3support qt4 qthelp qtscript quicktime radio rar rdesktop rdp rdpusb readline resolvconf romio samba sasl sdl secure-delete semantic-desktop session smb spell spice sql sqlite sqlite3 sse sse2 sse3 ssl ssse3 subversion svg system-libvncserver system-sqlite systemd tcpd threads thunar thunderbird tiff tk tordns truetype type1 udev udisks unicode unlock-notify usb userlocales v4l v4l2 valgrind vdpau video virtuoso vnc vorbis webkit wicd winbind wxwidgets x264 xcb xcomposite xine xml xmpp xorg xulrunner xv xvid xvmc zeroconf zip zlib" 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth btrfs" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nouveau intel radeon i915 i965 r100 r200 r300 r600" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 6 Egor Y. Egorov 2012-05-11 08:36:43 UTC
Created attachment 311407 [details]
build.log
Comment 7 SpanKY gentoo-dev 2012-05-11 08:55:30 UTC
that makes no sense.  USE=static is only for programs in sbin/bin.  it has no bearing on dynamic libraries and never has.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2012-05-11 08:57:19 UTC
(In reply to comment #7)
> that makes no sense.  USE=static is only for programs in sbin/bin.  it has
> no bearing on dynamic libraries and never has.

Then the depend should be moved like in Comment #1. It's always a RDEPEND for the library.
Comment 9 SpanKY gentoo-dev 2012-05-11 09:28:40 UTC
gotcha
Comment 10 SpanKY gentoo-dev 2012-05-11 09:29:58 UTC
should be all set now in the tree; thanks for the report!

Commit message: Always depend on library packages as we install a shared lib as pointed out by Samuli Suominen
http://sources.gentoo.org/sys-fs/cryptsetup/cryptsetup-1.4.2.ebuild?r1=1.1&r2=1.2