Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356115 - sys-fs/cryptsetup[static] - pbkdf.c:(.text+0x245): undefined reference to `__memset_chk'
Summary: sys-fs/cryptsetup[static] - pbkdf.c:(.text+0x245): undefined reference to `__...
Status: RESOLVED DUPLICATE of bug 353816
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 19:13 UTC by Stribik András
Modified: 2011-02-23 04:14 UTC (History)
0 users

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


Attachments
sys-fs/cryptsetup-1.2.0-r1 build.log (build.log,35.18 KB, text/plain)
2011-02-22 19:14 UTC, Stribik András
Details
sys-fs/cryptsetup-1.2.0-r1 environment (environment,132.80 KB, text/plain)
2011-02-22 19:15 UTC, Stribik András
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stribik András 2011-02-22 19:13:07 UTC
The problem appears with all versions currently in portage exept 1.0.6-r2 which fails due to conflict with lvm2. From now on I will describe 1.2.0-r1. The important part of the error seems to be this:

libtool: link: x86_64-pc-linux-gnu-gcc -Wall -O2 -pipe -march=native -fomit-frame-pointer -static -Wl,-O1 -o cryptsetup.static cryptsetup_static-utils_crypt.o cryptsetup_static-cryptsetup.o  -Wl,--as-needed ../lib/.libs/libcryptsetup.a -L/lib64 -L/usr/lib64 /usr/lib64/libpopt.a /usr/lib64/libgcrypt.a /usr/lib64/libgpg-error.a -ldevmapper /usr/lib64/libudev.a -luuid
../lib/.libs/libcryptsetup.a(libluks1_la-pbkdf.o): In function `pkcs5_pbkdf2':
pbkdf.c:(.text+0x245): undefined reference to `__memset_chk'
collect2: ld returned 1 exit status

It compiles without the static use flag (but then it is not included in the initramfs built by genkernel). I unpacked /usr/portage/distfiles/cryptsetup-1.2.0.tar.bz2/usr/portage/distfiles/cryptsetup-1.2.0.tar.bz2 and tried to compile it manually with the same configuration options. I also executed the sed stuff from the ebuild:

./configure --sbindir=/sbin --enable-shared --libdir=/usr/lib64 --enable-static-cryptsetup --enable-nls --disable-selinux
make -j2

This time the error was slightly different:

libtool: link: gcc -Wall -g -O2 -static -o cryptsetup.static cryptsetup_static-utils_crypt.o cryptsetup_static-cryptsetup.o  ../lib/.libs/libcryptsetup.a -L/lib64 -L/usr/lib64 /usr/lib64/libpopt.a /usr/lib64/libgcrypt.a /usr/lib64/libgpg-error.a -ldevmapper /usr/lib64/libudev.a -luuid
../lib/.libs/libcryptsetup.a(libluks1_la-pbkdf.o): In function `memset':
/usr/include/bits/string3.h:85: undefined reference to `__memset_chk'
collect2: ld returned 1 exit status

/usr/include/bits/string3.h belongs to glibc. The version I have installed is 2.13-r1.

Reproducible: Always

Steps to Reproduce:
1. USE=static emerge -v cryptsetup
2. ???
3. Profit!

Actual Results:  
The linker failed with undefined reference to __memset_chk.

Expected Results:  
It should have been installed without problems.

Portage 2.1.9.40 (hardened/linux/amd64, gcc-4.5.2, glibc-2.13-r1, 2.6.37-hardened x86_64)
=================================================================
System uname: Linux-2.6.37-hardened-x86_64-Pentium-R-_Dual-Core_CPU_T4300_@_2.10GHz-with-SuSE-9.0-X86-64
Timestamp of tree: Tue, 22 Feb 2011 01:40:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1, 3.1.3
dev-util/ccache:     3.1.4
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       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 AdobeFlash-10 AdobeFlash-10.1 dlj-1.1 googleearth Q3AEULA RTCW-ETEULA ut2003"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="hu_HU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="hu"
MAKEOPTS="-j2"
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/layman/gamerlay /usr/local/portage/layman/games /usr/local/portage"
SYNC="rsync://rsync.cz.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apm bash-completion berkdb bittorrent bzip2 caps cdda cddb cli cracklib crypt cscope css cxx dbus dri dts dv dvd emovix encode ffmpeg firefox flac ftp gdbm gif gnutls gpm hal hardened iconv ipv6 java java6 javascript jpeg jpeg2k justify kde lame laptop latex lm_sensors mad matroska mjpeg mmap mmx mng modplug modules mp3 mpeg mplayer msn mtp mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre perl pic png policykit pppd python qt4 quicktime readline samba schroedinger semantic-desktop session sndfile socks5 speex sse sse2 ssl startup-notification svg sysfs tcpd theora threads truetype unicode urandom v4l2 vcd vim-syntax vorbis wifi xattr xcomposite xine xinerama xorg xscreensaver xv xvid zlib zsh-completion" 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" CAMERAS="ptp2" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu" NETBEANS_MODULES="apisupport harness ide java nb php websvccommon" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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 1 Stribik András 2011-02-22 19:14:49 UTC
Created attachment 263533 [details]
sys-fs/cryptsetup-1.2.0-r1 build.log
Comment 2 Stribik András 2011-02-22 19:15:34 UTC
Created attachment 263535 [details]
sys-fs/cryptsetup-1.2.0-r1 environment
Comment 3 SpanKY gentoo-dev 2011-02-23 04:14:13 UTC

*** This bug has been marked as a duplicate of bug 353816 ***