Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120240 - problem emerging cryptsetup-luks-1.0.1-r1
Summary: problem emerging cryptsetup-luks-1.0.1-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Benjamin Smee (strerror) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 16:15 UTC by Richard Westwell
Modified: 2006-04-22 14:05 UTC (History)
6 users (show)

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


Attachments
patch to cryptsetup-luks-1.0.1-r1.ebuild (1.patch,681 bytes, text/plain)
2006-01-24 16:16 UTC, Richard Westwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Westwell 2006-01-24 16:15:12 UTC
after the recent update to a load of the gnome related stuff
pmount is now required which is pulling in cryptsetup-luks because of the use flags I've got set

however upon compiling cryptsetup-luks-1.0.1-r1 I ended up with the following error

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-pbkdf.lo -MD -MP -MF .deps/libluks_la-pbkdf.Tpo -c pbkdf.c -o libluks_la-pbkdf.o >/dev/null 2>&1
if /bin/sh ../libtool --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib   -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-hmac_sha1.lo -MD -MP -MF ".deps/libluks_la-hmac_sha1.Tpo" -c -o libluks_la-hmac_sha1.lo `test -f 'sha/hmac_sha1.c' || echo './'`sha/hmac_sha1.c; \
then mv -f ".deps/libluks_la-hmac_sha1.Tpo" ".deps/libluks_la-hmac_sha1.Plo"; else rm -f ".deps/libluks_la-hmac_sha1.Tpo"; exit 1; fi
keyencryption.c:31:26: libdevmapper.h: No such file or directory
keyencryption.c: In function `LUKS_endec_template':
keyencryption.c:100: warning: initialization makes pointer from integer without a cast
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-af.lo -MD -MP -MF .deps/libluks_la-af.Tpo -c af.c -o libluks_la-af.o >/dev/null 2>&1
make[2]: *** [libluks_la-keyencryption.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-sha1.lo -MD -MP -MF .deps/libluks_la-sha1.Tpo -c sha/sha1.c  -fPIC -DPIC -o .libs/libluks_la-sha1.o
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-hmac_sha1.lo -MD -MP -MF .deps/libluks_la-hmac_sha1.Tpo -c sha/hmac_sha1.c  -fPIC -DPIC -o .libs/libluks_la-hmac_sha1.o
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-hmac_sha1.lo -MD -MP -MF .deps/libluks_la-hmac_sha1.Tpo -c sha/hmac_sha1.c -o libluks_la-hmac_sha1.o >/dev/null 2>&1
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../lib -I sha -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -MT libluks_la-sha1.lo -MD -MP -MF .deps/libluks_la-sha1.Tpo -c sha/sha1.c -o libluks_la-sha1.o >/dev/null 2>&1
make[2]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r2/work/cryptsetup-luks-1.0.1/luks'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r2/work/cryptsetup-luks-1.0.1'
make: *** [all] Error 2

!!! ERROR: sys-fs/cryptsetup-luks-1.0.1-r2 failed.
!!! Function src_compile, Line 63, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

to reproduce
emerge device-mapper
emerge cryptsetup-luks

funnily enough this was happening on one adm64 box but not another
after re-emerging the same version of device-mapper on the one it was compiling with (1.01.03) this also now fails to compile on both machines
tried 1.01.04 and 1.01.05 for device mapper but still the same, so I'm guessing it's something to do with the include directory perhaps

looking at the ebuild it seems to be checking for the dynamic use flag
but I'm not aware that this use flag exists, so in otherwords it's always trying to compile static for this package
I've made a slight alteration to the cryptsetup-luks-1.0.1-r1 ebuild to check for the static use flag instead of the dynamic one (which I'm not sure exists)

by not compiling as static this seems to get around the compiling problem
although if anyone is going to want to use this in an initrd or initramfs then they still may have trouble compiling this as static
so it's a partial fix but not a complete one
Comment 1 Richard Westwell 2006-01-24 16:16:58 UTC
Created attachment 78037 [details]
patch to cryptsetup-luks-1.0.1-r1.ebuild

patch for cryptsetup-luks-1.0.1-r1.ebuild
Comment 2 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-01-25 02:05:20 UTC
emerge info please
Comment 3 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-01-25 04:20:12 UTC
(In reply to comment #0)
> to reproduce
> emerge device-mapper
> emerge cryptsetup-luks

Please be as accurate as you can. Clearly what you mean is use the ~ARCH versions of both and then you think you can reproduce the problem. That said I just tried EVERY version of each of them and I can't get a single failure. I then tried it across 35 machines that I look after and none of them can reproduce it so I assume this is a problem with your tool chain.
 
> funnily enough this was happening on one adm64 box but not another
> after re-emerging the same version of device-mapper on the one it was compiling

I think you have some tool chain issue and this sounds more and more like it.

> with (1.01.03) this also now fails to compile on both machines
> tried 1.01.04 and 1.01.05 for device mapper but still the same, so I'm guessing
> it's something to do with the include directory perhaps

Working for me and others.

> looking at the ebuild it seems to be checking for the dynamic use flag
> but I'm not aware that this use flag exists, so in otherwords it's always
> trying to compile static for this package


Incorrect:
# grep luks /usr/portage/profiles/use.local.desc
sys-fs/cryptsetup-luks:dynamic - Build cryptsetup-luks dynamically
#

> I've made a slight alteration to the cryptsetup-luks-1.0.1-r1 ebuild to check
> for the static use flag instead of the dynamic one (which I'm not sure exists)

It does exist. This patch is not required from what I can see as the ebuild is fine.
 
> by not compiling as static this seems to get around the compiling problem
> although if anyone is going to want to use this in an initrd or initramfs then
> they still may have trouble compiling this as static
> so it's a partial fix but not a complete one

Please provide your emerge info so I have more info on your tool chain and what might be the problem. 

Comment 4 Richard Westwell 2006-01-25 04:53:25 UTC
when I get back tonight I'll run emerge info to provide more detail
also I'll check my profile for the dynamic use flag
I'm guessing the "dynamic" use flag could be some sort of special system flag of some sort as it wasn't showing up in ufed, but still if it is in the profile the ebuild was ignoring this and compiling for static regardless
I'll check the amd64 2005.1 profile for dynamic when I get back tonight to see if I can spot it

something to note cryptsetup-luks-1.0.1-r1 is the latest version (there is no ~ARCH version I can see above this one)
also I have tried the latest ~ARCH version of device-mapper as mentioned above

the difference when it worked appeared to be that something related to device-mapper was being compiled internally in the first instance of emerging cryptsetup-luks, but after re-emerging device-mapper (same version) it instead decided to use the already installed device-mapper headers instead during the configure stage, I'll try to find the lines in configure where it mentioned this later on tonight when I get back from work

the key point is
"keyencryption.c:31:26: libdevmapper.h: No such file or directory"
I know the file exists somewhere in /usr/include/
but I think it's having trouble finding it
Comment 5 Richard Westwell 2006-01-25 10:20:09 UTC
emerge info
(note the kernel is identical to gentoo-sources with a small fix for my DVB box, and with the marvel network update)

Gentoo Base System version 1.6.14
Portage 2.0.54 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-mygen-r1 x86_64)
=================================================================
System uname: 2.6.15-mygen-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -fweb -frename-registers -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=k8 -fweb -frename-registers -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distlocks moo sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo.inode.at/"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/port_overlay/mine"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 16bit 3ds 64bit 7zip S3TC X X509 Xaw3d a52 aac aalib abook accounting acl acpi adns aim allegro alsa amd amr aotuv apache1 apache2 apm applet aqua_theme arts artworkextra asterisk async atlas auctex audiofile avantgo avi ax25 bash-completion bcmath berkdb bigpatch bitmap-fonts bl blender-game bluetooth bonobo bzip2 ccache cdb cddb cdinstall cdparanoia cdr cdrom cegui cg cgi chroot clamav clamd clanJavaScript clanVoice cli clisp cln cpudetection crosscompile crypt cscope css cups curl cvsgraph dba dbus dedicated devmap dga dhcp diet dillo directfb divx4linux dnd doc double-precision dpms dts dv dvb dvd dvdr dvdread eap-tls eds emacs emacs-w3 emboss encode esd ethereal etwin evo examples exif exiscan exiscan-acl expat fam fame fastcgi fat fax fbcon fbdev fbsplash festival ffmpeg fftw flac flash fluidsynth fmod foomaticdb fortran freetds freetts freetype ftp fuse gb gd gdbm geoip geometry geos gif gimp gimpprint ginac glade glgd glut glx gmp gmtfull gmthigh gmtsuppl gmttria gnome gnomedb gnuplot gpm gps grass gsl gsm gstreamer gtk gtk2 gtkhtml guile hal hbci hpn icq id3 idea idn ieee1394 image imagemagick imap imlib imlib2 inifile innodb ipcs ipv6 irda irmc jabber jack java javacomm javamail javascript jbig jikes joystick jpeg junit jython kde kdepim kerberos krb4 ladcca lame lcd lcms ldap leim libcaca libclamav libdsk libg++ libgda libsamplerate libvisual libwww lids lirc live lm_sensors lmtp logitech-mouse ltsp lua lufsusermount lzo lzw lzw-tiff mad madwifi maildir mailwrapper matroska maya-shaderlibrary mbox mcal mcve mdb mhash mikmod mime ming mixer mjpeg mng mopac7 motif mozcalendar mozdevelop mozilla mozp3p mozsvg mozxmlterm mp3 mp4live mpeg mpeg2 mpeg4 mpi mplayer msn music mysql mysqli mythtv nas ncurses netcdf neural nfs nhc98 nls nptl ntfs ntlm nvidia nviz oav objc odbc offensive ofx ogdi ogg oggvorbis ogre oldworld on-the-fly-crypt openal openbabel opengl opens osc oscar pam parse-clocks passfile pcre pda pdflib perl pg-intdatetime php physfs pic player plotutils png pnp postfix postgres povray ppds prelude procmail proj python qhull qt quicktime quotes readline real reiserfs rplay rrdtool ruby samba sasl sblive scanner sdk sdl sensord slang slp smartcard smp sndfile snmp snortsam soap sockets socks5 sourcecaps sox spamassassin speech speedo speex spell sql sqlite sqlite3 ssl stencil-buffer stroke subp subtitles subversion svg svgz sysfs t1lib tcltk tcpd tetex tga theora tidy tiff timidity tlen tokenizer tools transcode transparent-proxy truetype truetype-fonts trusted type1 type1-fonts udev unicode usb userlocales uudeview v4l v4l2 vcd videos vim-with-x virus-scan vorbis vpopmail wddx wifi wildlsearch wmf wolk-supermount wxwin wxwindows xanim xchattext xemacs xface xfs xine xinerama xml xml2 xmlrpc xmms xosd xpm xprint xv xvid xvmc yahoo yiff yv12 zeo zlib zvbi userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

Comment 6 Richard Westwell 2006-01-25 11:18:55 UTC
sorry the above error message is incorrect, but there still is an error
I'd somehow managed to rename my /usr/include/libdevmapper.h file when i was looking for the reference to dm_dir
the correct error message should be 

x86_64-pc-linux-gnu-gcc -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -o cryptsetup -static cryptsetup.o  /usr/lib64/libpopt.a ../lib/.libs/libcryptsetup.a -L/usr/lib64 /usr/lib64/libgcrypt.a -lnsl /usr/lib64/libgpg-error.a -luuid
../lib/.libs/libcryptsetup.a(libluks_la-keyencryption.o): In function `LUKS_endec_template':
keyencryption.c:(.text+0x44): undefined reference to `dm_dir'
collect2: ld returned 1 exit status
make[2]: *** [cryptsetup] Error 1
make[2]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r1/work/cryptsetup-luks-1.0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r1/work/cryptsetup-luks-1.0.1'
make: *** [all] Error 2

!!! ERROR: sys-fs/cryptsetup-luks-1.0.1-r1 failed.
!!! Function src_compile, Line 63, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


the dynamic use flag is set in use.local.desc for this app,
but if you try emerge -pv cryptsetup-luks
I end up with
[ebuild     U ] sys-fs/cryptsetup-luks-1.0.1-r2 [1.0.1-r1] -dynamic +nls 0 kB [1]
which sugests that something isn't being set right somewhere as dynamic isn't active when it should be
although I'm not sure why this is used, don't all the other packages use the static flag?
i.e to compile dynamically by default, but statically if "static" is set?

emerge cryptsetup-luks - doesn't work
USE="dynamic" emerge cryptsetup-luks - does work

but this still leaves the question as to why static compilation is failing
perhaps this is a amd64 only issue and it works for other users since they're just compiling statically without realising?
Comment 7 Richard Westwell 2006-01-25 11:41:56 UTC
when compiling dynamic
the configure script reads at the bottom
checking for dm_task_set_name in -ldevmapper... yes
checking whether to build libdevmapper module... yes

but for static
checking for dm_task_set_name in -ldevmapper... no
checking whether to build libdevmapper module... no

I think that keyencryption.c needs libdevmapper regardless for the reference to dm_dir, so it only compiles in dynamic mode
but I'm not sure why the dynamic flag is set for everyone else by default, but not for this machine
Comment 8 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-01-26 03:58:31 UTC
(In reply to comment #6)
> x86_64-pc-linux-gnu-gcc -O2 -march=k8 -fweb -frename-registers -pipe -msse3 -o

try with just the -o2 and -march cflags please.

> the dynamic use flag is set in use.local.desc for this app,
> but if you try emerge -pv cryptsetup-luks
> I end up with
> [ebuild     U ] sys-fs/cryptsetup-luks-1.0.1-r2 [1.0.1-r1] -dynamic +nls 0 kB
> [1]
> which sugests that something isn't being set right somewhere as dynamic isn't
> active when it should be
> although I'm not sure why this is used, don't all the other packages use the
> static flag?

This indicates that you don't understand USE flags at all. The use.local.desc is so the ebuild knows about the use flag and is able to use it at all, you need to define your own USE flags either in /etc/make.conf or in /etc/portage/package.* files. That is use.local.desc is not a file you should modify nor does it have any implications about how things are build on your system. See http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=2 for more information.

> emerge cryptsetup-luks - doesn't work
> USE="dynamic" emerge cryptsetup-luks - does work
> 
> but this still leaves the question as to why static compilation is failing
> perhaps this is a amd64 only issue and it works for other users since they're
> just compiling statically without realising?

I'll cc in amd64 to have a look as I can't test myself

Comment 9 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-01-26 04:02:04 UTC
(In reply to comment #7)
> when compiling dynamic
> the configure script reads at the bottom
> checking for dm_task_set_name in -ldevmapper... yes
> checking whether to build libdevmapper module... yes
> 
> but for static
> checking for dm_task_set_name in -ldevmapper... no
> checking whether to build libdevmapper module... no

When I am compiling with -dynamic USE flags then I still pass both these checks.
> I think that keyencryption.c needs libdevmapper regardless for the reference to
> dm_dir, so it only compiles in dynamic mode
> but I'm not sure why the dynamic flag is set for everyone else by default, but
> not for this machine

This is a USE flag issue, see my above reply.

AMD64 : can you reproduce this problem? ie unable to compile cryptsetup-luks (latest version) statically and what it has for the above checks?

Comment 10 Richard Westwell 2006-01-26 06:00:11 UTC
errm I'm sorry for not being clear but I do understand use flags
I never said that I had altered use.local.desc, it's not altered it in any way
all custom use flags are defined within /etc/make.conf
dynamic should be being set during the emerge of cryptsetup-luks as it is set within use.local.desc for this app (by default, not by me)
I'm well aware that anything within /usr/portage/profiles is probably overwritten during an emerge sync anyway

but since this is not set during emerge, this leads me to believe that there is a problem somewhere else, I have noticed that dynamic is also not listed within use.desc which I think is used as a list of descriptions for all use flags
and since all other packages seem to use "static" as the same thing (just the other way around), leads me think that this may have been added as an after thought instead of a standard use flag (I could be wrong)

have you tried to re-emerge device-mapper (same version), then tried to emerge cryptsetup-luks? (with dynamic off)
as I mentioned before it did seem to work on one machine up until the point I re-emerged the same version of device-mapper, after which the checks went from "yes" to "no" and the failure showed up
Comment 11 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-01-26 06:16:06 UTC
(In reply to comment #10)
> errm I'm sorry for not being clear but I do understand use flags

I'm sorry if I'm being a bit abrupt, but it doesn't seem that way.

> I never said that I had altered use.local.desc, it's not altered it in any way
> all custom use flags are defined within /etc/make.conf
> dynamic should be being set during the emerge of cryptsetup-luks as it is set
> within use.local.desc for this app (by default, not by me)
> I'm well aware that anything within /usr/portage/profiles is probably
> overwritten during an emerge sync anyway

Again, this indicates to me that you do NOT understand USE flags. See:
http://dev.gentoo.org/~plasmaroo/devmanual//profiles/use.desc/
for a description of what each of these files does.

> but since this is not set during emerge, this leads me to believe that there is
> a problem somewhere else, I have noticed that dynamic is also not listed within
> use.desc which I think is used as a list of descriptions for all use flags
> and since all other packages seem to use "static" as the same thing (just the
> other way around), leads me think that this may have been added as an after
> thought instead of a standard use flag (I could be wrong)

You are mixing up all kinds of things here. use.desc is for global USE flags, which dynamic is not. I don't have a "Static" use flag at all for this ebuild, by default this ebuild compiles statically as that is how the majority of users expect it (ie for initramfs). 

> have you tried to re-emerge device-mapper (same version), then tried to emerge
> cryptsetup-luks? (with dynamic off)

Yes. Like I said I tried emerging with the old and the new versions of device-mapper, and then with dynamic on and off for each of those versions with cryptsetup-luks. I could not replicate this problem at all.

> as I mentioned before it did seem to work on one machine up until the point I
> re-emerged the same version of device-mapper, after which the checks went from
> "yes" to "no" and the failure showed up

I think that this is either something specific to amd64 or your toolchain is somehow broken.
 

Comment 12 Richard Westwell 2006-01-26 10:49:54 UTC
yep you right my mistake again (3rd time lucky)
I was confusing use.defaults with use.local.desc, along with local and global flags (what a mess)

I'm just used to other apps being compiled dynamically by default
with anything that needs to be compiled statically, to be done by genkernel when it creates the initrd using it's own compiling scripts/gubbins. But since I can't see support crypt in genkernel I'd guess this is why it's been setup this way

I'd already tried the default CFLAGS with cryptsetup-luks before
I've just tried it again with device-mapper as well, but I'm still getting the same error without dynamic
this doesn't rule out my toolchain however as it could be something else
so if no-one else with amd64 is getting this I'll assume it's something unique to my toolchain / CFLAGS and not a bug
Comment 13 Lance Lucas 2006-02-13 23:18:23 UTC
I just hit on this bug while trying to re-emerge sys-fs/cryptsetup-luks-1.0.1-r2.  Adding "sys-fs/cryptsetup-luks dynamic" to /etc/portage/package.use allowed emerge --resume to complete.  It appears that the dynamic use flag is still needed to compile cleanly, at least on amd64.

Portage 2.1_pre4-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -pipe -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -ffast-math -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon64 -pipe -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time -ffast-math -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib acpi aim alsa artworkextra avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cd cddb cdr chroot clamav crypt css cups curl dbus divx4linux dv dvd dvdr dvdread eds emboss encode esd evo exif fame ffmpeg firefox flac flash foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal ieee1394 imagemagick imlib java javascript jikes jpeg lcms ldap libcaca live lzo lzw lzw-tiff mad mbox mng mono mozilla moznocompose moznoirc moznomail moznosvg mp3 mpeg nautilus ncurses network nls nptl nptlonly nsplugin nvidia offensive ogg opengl oss pam pcre pdflib perl pic png posix ppds python quicktime readline real samba sdl smp speex spell sqlite ssl svg tcltk tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd videos vorbis wmf xine xml xml2 xmms xpm xv xvid xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 14 Sascha G. 2006-02-16 17:00:57 UTC
I can see this error here, too (x86, USE=dynamic works):

i686-pc-linux-gnu-gcc -O2 -pipe -march=pentium4 -fomit-frame-pointer -o cryptsetup -static cryptsetup.o  /usr/lib/libpopt.a ../lib/.libs/libcryptsetup.a /usr/lib/libgcrypt.a -lnsl /usr/lib/libgpg-error.a -luuid
../lib/.libs/libcryptsetup.a(libluks_la-keyencryption.o): In function `LUKS_endec_template':
keyencryption.c:(.text+0x55): undefined reference to `dm_dir'
collect2: ld returned 1 exit status
make[2]: *** [cryptsetup] Error 1
make[2]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r1/work/cryptsetup-luks-1.0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/cryptsetup-luks-1.0.1-r1/work/cryptsetup-luks-1.0.1'
make: *** [all] Error 2


Portage 2.0.54 (selinux/2005.1/x86/hardened, gcc-3.4.5, glibc-2.3.5-r3, 2.6.14-hardened-r5 i686)
=================================================================
System uname: 2.6.14-hardened-r5 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks loadpolicy sandbox selinux sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac alsa avi bzip2 caps cdparanoia cjk crypt cups curl dts dv dvd dvdr dvdread ffmpeg flac fortran gcj gif glut gnutls gtk hardened ipv6 joystick jpeg kdeenablefinal lcms lirc mad matroska mikmod mmap mmx mp3 ncurses nls nptl offensive ogg opengl pam pic png readline sdl selinux sndfile sse ssl theora threads tiff truetype unicode usb vorbis win32codecs xine xml2 xv xvid zlib video_cards_nv video_cards_nvidia input_devices_joystick input_devices_keyboard input_devices_mouse linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 15 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-03-09 03:32:02 UTC
can you try with cryptsetup-luks-1.0.1-r2 and let me know if the problem still exists.
Comment 16 Patrizio Bassi 2006-03-09 08:13:58 UTC
using my standard flag i have:

[ebuild   R   ] sys-fs/cryptsetup-luks-1.0.1-r2  USE="nls -dynamic" 0 kB
 
and that fails.
considering that static version fails, i don't see why you keep a dynamic flag.

you should force to dynamic without asking the user.
it's the only way to have that merged.
Comment 17 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-03-09 08:46:21 UTC
(In reply to comment #16)
> using my standard flag i have:
> 
> [ebuild   R   ] sys-fs/cryptsetup-luks-1.0.1-r2  USE="nls -dynamic" 0 kB
> 
> and that fails.
> considering that static version fails, i don't see why you keep a dynamic flag.

For very good reasons relating to how the majority of cryptsetup-luks users, up till now, used the program, ie for encrypting partitions on boot via initramfs / initrd.

> you should force to dynamic without asking the user.
> it's the only way to have that merged.

I'm not willing to change the default behaviour of the ebuild at this point. The issue is solving this bug. Can you try and comment out the line 60 ie:
#append-ldflags -static
then emerge cryptsetup-luks-1.0.1-r2.ebuild digest ; ebuild =sys-fs/cryptsetup-luks-1.0.1-r2

let me know if that helps. 

Sorry that its taken me a while to look at this, but Clemens said that a new version was coming out soon (its overdue now) so I was waiting for that.

Comment 18 Patrizio Bassi 2006-03-09 08:57:03 UTC
stripping static has no effect


even

i686-pc-linux-gnu-gcc  -o cryptsetup cryptsetup.o  /usr/lib/libpopt.a ../lib/.libs/libcryptsetup.a /usr/lib/libgcrypt.a -lnsl /usr/lib/libgpg-error.a -luuid
../lib/.libs/libcryptsetup.a(libluks_la-keyencryption.o): In function `LUKS_endec_template':keyencryption.c:(.text+0x19): undefined reference to `dm_dir'
collect2: ld returned 1 exit status

so...i suggest forcing dynamic and add a big warning.

i remember that in wpa_supplicant for a while...madwifi support was disabled...and use flag was removed for some versions..forcing users to compile without that.
this is an example...that may happen...

consider that :)
Comment 19 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-03-09 09:01:30 UTC
(In reply to comment #18)
[snip]
> i remember that in wpa_supplicant for a while...madwifi support was
> disabled...and use flag was removed for some versions..forcing users to compile
> without that.
> this is an example...that may happen...
> 
> consider that :)

I'm not ruling it out, just not wanting to go that path just yet. It is something specific to your setups though as very few people have this issue. Can you put your emerge info and other relevant info in here please so i can check?

Comment 20 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-03-09 09:15:05 UTC
do you by any chance have autoconf-archive installed? Can you try unmerging that and remerging if so.
Comment 21 Sascha G. 2006-03-09 11:57:12 UTC
(In reply to comment #20)
> do you by any chance have autoconf-archive installed? Can you try unmerging
> that and remerging if so.

I do not have this installed and no suggested solution works here except USE=dynamic.

Comment 22 Patrizio Bassi 2006-03-09 13:53:31 UTC
same problem here.

only dynamic works.
Comment 23 Stephen Fromm 2006-04-19 14:55:25 UTC
I am encountering the same problem here with both cryptsetup-luks-1.0.1-r1 and cryptsetup-luks-1.0.1-r2.  I tried commenting out "append-ldflags -static", as suggested in comment 17.  This did not work either.  Per comment 20, I do not have autoconf-archive installed.  I can build both successfully if I enable the 'dynamic' USE flag.

emerge info below.

Portage 2.0.54 (selinux/2005.1/x86, gcc-3.3.6, glibc-2.3.5-r3, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Xeon(TM) CPU 3.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks sandbox selinux sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.datapipe.net/gentoo ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/distfiles"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apache2 audiofile bash-completion berkdb bzip2 cairo crypt cups curl dba dbus emacs evo expat fam fbcon fortran freetype gd gdbm gif gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal idn imlib ipv6 java jpeg ldap libwww mailwrapper milter mime mmx mono motif ncurses nls nptl nsplugin opengl pam pcre pdflib perl png posix python readline samba sasl sdl selinux snmp sockets spell sse ssl tcpd threads tiff truetype udev unicode usb vhosts x86 xml xml2 xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, LINGUAS
Comment 24 Patrizio Bassi 2006-04-20 01:28:04 UTC
i did many tries, only way was using USE flag to disable that kind of compilation and linking
Comment 25 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-04-22 13:47:19 UTC
I have a new version in portage. Can you check that and see if that fixes it I have a static compile change and a new version so hopefully this will go away ...
Comment 26 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-04-22 14:05:15 UTC
in fact due to the changes in the app and the ebuild I'm going to close this and if pain persists open a new bug with the relevant info.