Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99331 - genkernel-3.2.7 fails to compile kernel with DM_CRYPT and DM_ZERO support
Summary: genkernel-3.2.7 fails to compile kernel with DM_CRYPT and DM_ZERO support
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-17 08:53 UTC by Jakub Moc (RETIRED)
Modified: 2005-07-18 14:56 UTC (History)
1 user (show)

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


Attachments
kernel .config (kernel-config,30.49 KB, text/plain)
2005-07-17 08:56 UTC, Jakub Moc (RETIRED)
Details
.config that runs without problem on another machine (.config,30.07 KB, text/plain)
2005-07-17 10:25 UTC, Jan Kundrát (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2005-07-17 08:53:22 UTC
See summary.

Reproducible: Always
Steps to Reproduce:
1. Enable DM_CRYPT/DM_ZERO support in menuconfig
2. Try to compile the kernel (manually or via genkernel, does not matter) 

Actual Results:  
drivers/built-in.o: In function `crypt_ctr':
dm-crypt.c:(.text+0xd61e5): undefined reference to `dm_table_get_mode'
dm-crypt.c:(.text+0xd6220): undefined reference to `dm_get_device'
drivers/built-in.o: In function `crypt_dtr':
dm-crypt.c:(.text+0xd630c): undefined reference to `dm_put_device'
dm-crypt.c:(.text+0xd634f): undefined reference to `dm_put_device'
drivers/built-in.o: In function `dm_crypt_init':
dm-crypt.c:(.init.text+0x942b): undefined reference to `dm_register_target'
drivers/built-in.o: In function `dm_zero_init':
dm-zero.c:(.init.text+0x949c): undefined reference to `dm_register_target'
drivers/built-in.o: In function `dm_crypt_exit':
dm-crypt.c:(.exit.text+0x82b): undefined reference to `dm_unregister_target'
drivers/built-in.o: In function `dm_zero_exit':
dm-zero.c:(.exit.text+0x88b): undefined reference to `dm_unregister_target'
make: *** [.tmp_vmlinux1] Error 1


Expected Results:  
I want a new kernel. ;)

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 AMD Sempron(tm)
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.11
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.5
sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data
/usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks maketest sandbox sfperms
strict test userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo
ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow acpi apache2 apm bash-completion bcmath berkdb bzip2 calendar
crypt curl curlwrappers exif fbcon fortran freetds ftp gd gdbm gif iconv imap
innodb jpeg libg++ libwww maildir mcal memlimit mhash mime mmx mp3 mpeg mssql
mysql mysqli ncurses nls nptl nptlonly odbc offensive pam pcntl pcre pdflib perl
php png pnp posix python readline sasl session simplexml soap sockets spl sqlite
sse ssl sysvipc tcpd tidy tiff tokenizer unicode wddx xml xml2 xmlrpc xsl zlib
linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-17 08:56:24 UTC
Created attachment 63619 [details]
kernel .config
Comment 2 Jan Kundrát (RETIRED) gentoo-dev 2005-07-17 10:25:51 UTC
Created attachment 63630 [details]
.config that runs without problem on another machine

I've tried to reproduce, but compilation run without any problem (several
warnings; didn't try to boot new kernel).
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2005-07-17 11:53:47 UTC
Can't reproduce with jakubs config either. Does the same problem exist in
earlier 2.6.12 series release? How about plain 2.6.12?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-07-17 12:48:57 UTC
(In reply to comment #3)
> Can't reproduce with jakubs config either. Does the same problem exist in
> earlier 2.6.12 series release? How about plain 2.6.12?

Forget it, I did not run 'make clean' when doing the manual compilation, which
broke it. 

After 'make clean', it compiles perfectly both manually and with genkernel-3.1.6
(I tried 2.6.12-r4 and 2.6.12-r6), fails for both kernels with genkernel-3.2.7.

Reassigning, sorry to have wasted your time.
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2005-07-17 14:38:43 UTC
Are you using the default genkernel config? And what arguments are you running
genkernel with?
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-07-17 14:42:59 UTC
(In reply to comment #5)
> Are you using the default genkernel config? 

No, I did 'zcat /proc/config.cz > /usr/src/linux/.myconfig' and loaded that from
menuconfig.

> And what arguments are you running genkernel with?

genkernel all --menuconfig --save-config --install --udev --lvm2
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-07-17 14:47:48 UTC
(In reply to comment #5)
> Are you using the default genkernel config? 

Maybe I misread it; if you mean /etc/genkernel.conf, then yes.
Comment 8 Eric Edgar (RETIRED) gentoo-dev 2005-07-18 04:58:02 UTC
This is not a bug with genkernel.  As your initial bug report states compiling 
a kernel manually or with genkernel both fails.  This is a problem with needing 
to clear out your kernel tree as stated below or the kernel has a bug in it.  
If this happens again in the future and the kernel fails to compile manually it 
most likely is NOT a bug in genkernel and should be reported as a kernel bug.  

Always clear your tree first before reporting this type of failure.

Comment 9 Jakub Moc (RETIRED) gentoo-dev 2005-07-18 05:09:50 UTC
(In reply to comment #8)
> This is not a bug with genkernel.  As your initial bug report states compiling 
> a kernel manually or with genkernel both fails.  This is a problem with needing 
> to clear out your kernel tree as stated below or the kernel has a bug in it.  
> If this happens again in the future and the kernel fails to compile manually it 
> most likely is NOT a bug in genkernel and should be reported as a kernel bug.  

rocket, please read comment #4 more carefully, thanks. It was originally
assigned to kernel devs actually, but it is NOT a problem with kernel. It
compiles perfectly well w/ 3.1.6 and manually as well after 'make clean', as I
have already stated in the above comment. 
Comment 10 Eric Edgar (RETIRED) gentoo-dev 2005-07-18 06:23:00 UTC
did you try the --clean flag for genkernel?
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2005-07-18 06:28:48 UTC
(In reply to comment #10)
> did you try the --clean flag for genkernel?

No, I did not, because

1/ genkernel does it automatically every time (CLEAN="yes", MRPROPER="yes")
2/ it failed on two freshly installed kernels where 'make clean' makes no sense
3/ It works perfectly well when genkernel is downgraded to 3.1.6, --clean or not. 

which pretty much suggests that this is not PEBKAC... 
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2005-07-18 06:38:32 UTC
We have both DM_CRYPT and DM_ZERO support on the release media, and it compiles
perfectly for us.  Have you tried using genkernel's own config file to make sur
eit isn't something you're doing in yours?
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2005-07-18 07:27:10 UTC
(In reply to comment #12)
> Have you tried using genkernel's own config file to make sur
> eit isn't something you're doing in yours?

Yes, the default one works. Then I unmerged genkernel-3.2.7, wiped
/usr/share/genkernel, /var/tmp/genkernel and /etc/kernels, re-emerged genkernel
and gentoo-sources-2.6.12-r6, and tried again with

'genkernel bzImage --clean --menuconfig --udev --lvm2'

using .config from the *running* gentoo-sources-2.6.12-r6 (zcat /proc/config.gz
> /usr/src/linux/.myconfig) compiled with genkernel-3.1.6 and it fails with

dm-zero.c:(.exit.text+0x88b): undefined reference to `dm_unregister_target'
drivers/built-in.o: In function `dm_bbr_exit':
: undefined reference to `dm_io_put'
drivers/built-in.o: In function `dm_bbr_exit':
: undefined reference to `dm_unregister_target'
make: *** [.tmp_vmlinux1] Error 1

I can attach the new .config, if you are interested, otherwise I suggest that
you close this as WORKSFORME as I certainly won't have time to "debug" my
.config. That said, failure to compile identical kernel with new genkernel
version while the old version works perfectly with the same config is a bug.
Comment 14 Eric Edgar (RETIRED) gentoo-dev 2005-07-18 14:56:11 UTC
This works on other peoples install.  Not sure what the problem with your 
config is but it seems local to your machine.