View previous topic :: View next topic |
Author |
Message |
ReneeTeunissen n00b
Joined: 29 Aug 2004 Posts: 27 Location: Zevenaar, The Netherlands
|
Posted: Sun Oct 10, 2004 8:10 am Post subject: Kernel will not build |
|
|
Hi I'm getting after every kernel build (using genkernel):
--- cut ---
gcc -Iinclude -pipe -nostdinc -Os -fomit-frame-pointer -falign-functions=1 -falign-jumps=1 -falign-loops=1 -mpreferred-stack-boundary=2 -Wall -W -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wredundant-decls -Wno-unused -nostdlib -o bin-i386/diet-i bin-i386/start.o bin-i386/dyn_start.o diet.c bin-i386/dietlibc.a bin-i386/dyn_stop.o -DDIETHOME=\"/var/tmp/genkernel/diet\" -DVERSION=\"dietlibc-0.24\" -DINSTALLVERSION -lgcc
bin-i386/dietlibc.a(errno_location.o)(.text+0x11): In function `__errno_location':
: undefined reference to `__guard'
bin-i386/dietlibc.a(errno_location.o)(.text+0x32): In function `__errno_location':
: undefined reference to `__stack_smash_handler'
bin-i386/dietlibc.a(execvp.o)(.text+0x17): In function `execvp':
: undefined reference to `__guard'
bin-i386/dietlibc.a(execvp.o)(.text+0x1bd): In function `execvp':
: undefined reference to `__guard'
bin-i386/dietlibc.a(execvp.o)(.text+0x1db): In function `execvp':
: undefined reference to `__stack_smash_handler'
bin-i386/dietlibc.a(memmove.o)(.text+0x18): In function `memmove':
: undefined reference to `__guard'
bin-i386/dietlibc.a(memmove.o)(.text+0x7c): In function `memmove':
--- cut ---
Is this related to a hardened build toolchain, or am I missing something?
GRsecurity in completely turned off...
I'm just wondering where to start looking or to resolv this. rebuilding the toolschains is that the answer or not? _________________ Renee Teunissen - Embedded Software Developer - Linux - VxWorks - WinCE - OpenVMS - http://ReneeTeunissen.nl and http://www.pts.nl |
|
Back to top |
|
|
Tsonn Guru
Joined: 03 Jun 2004 Posts: 550
|
Posted: Sun Oct 10, 2004 9:23 am Post subject: |
|
|
A google search on the error message suggests that it's something to do with propolice... so, yes.
It might be worth using google to see if there are any incompatabilities between the exact kernel version/genkernel version/propolice version you're using.
Or, check the propolice install docs... _________________ If your question was answered, please edit the first post and add [SOLVED] to the title. Thanks! |
|
Back to top |
|
|
pennedinil Tux's lil' helper
Joined: 08 Aug 2003 Posts: 95
|
Posted: Tue Oct 19, 2004 6:38 pm Post subject: |
|
|
Perhaps it's the dietlibc. Should that be in there for kernel builds? If some of your toolchain was built with the hardened USE flag, and other parts of it weren't this may cause problems. I know Gentoo's gcc spec file makes an exception when compiling the kernel If dietlibc is not doing the same, that's when (at least I did) one sees missing '__guard' type errors. |
|
Back to top |
|
|
genMeToo n00b
Joined: 24 Oct 2004 Posts: 3
|
Posted: Sun Oct 24, 2004 9:01 pm Post subject: RE: kernel will not build - dietlibC __guard link problems |
|
|
Hi,
I have the same problem -
starting gentoo link from scratch - downloaded stage1-x86-selinux-pie-ssp-2004.2.tar.bz2
(md5 checksumed ok)
followed the install handbook (I think), mended the two compilation errors (sonypi.c and ipt_ULOG.c)
tried genkernal , also tried compiling manually having tried to remove as much as possible from the kernel, still the same problem, re-emerged everything having checked that I USE "hardened" etc.
Started again from scratch.
I still have the same problem.
Has the problem been solved? (If so how?).
my understanding is that the __guard and __stack_smash_handler should be available with the options provided - could it be a missing option in the build command? Or is there a vital step that I may have missed that gives this problem?
to try to keep things simple I've kept /etc/make.conf as simple as possible :
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr"
CHOST="i386-pc-linux-gnu"
USE="hardened pie pic"
CXXFLAGS="${CFLAGS}"
Searching bugZilla for __guard does not shed much light, a similar problem in the FAQs suggests that it should work as is , dietlibc FAQ has no info w.r.t. gentoo ahrdened (unsurprisingly)
and
emerge --unmerge dev-libs/dietlibc
says that it's not installed , (we'll as it doesn't compile I guess it cannot be "installed").
as you can see i'm just trying anything.
emerge info gives
Portage 2.0.50-r11 (x86, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.26)
=================================================================
System uname: 2.4.26 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr"
CHOST="i386-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb crypt hardened ncurses nls pam perl pic pie python readline selinux ssl tcpd x86 zlib" |
|
Back to top |
|
|
genMeToo n00b
Joined: 24 Oct 2004 Posts: 3
|
Posted: Sun Oct 24, 2004 9:47 pm Post subject: |
|
|
Further checking in bugzilla gives bug - 62422 -unresolved |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Mon Dec 06, 2004 6:34 pm Post subject: |
|
|
I have the same problem with the latest kernel. gentoo-dev-sources-2.6.9-r9. I just started getting this error after I enabled nptl and switched to linux26.headers. I think I do have the hardened use flag set. Maybe I should turn that off and see if it works... _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
genMeToo n00b
Joined: 24 Oct 2004 Posts: 3
|
Posted: Tue Dec 07, 2004 5:29 pm Post subject: |
|
|
From what I understand dietlibc is just a cut down version of the libc code, the libc code has been modified for hardened use, the same mods need to be added to dietlibc if you also want to use that in the hardened kernel.
I have done further searching on google and found that some people have mended the problem (not in gentoo) by adding the missing code into the dietlibc code (it can be copied from the hardened libc code, give or take I think).
I have rebuilt my kernel so as not to require dietlibc - there are not so many reasons to have it, as it is aimed at creating small linux apps/kernels i.e. linux on a floppy or certain bootstrapping with ramdisks ( I think).
hope this helps
ps I'm a total beginner |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Thu Dec 09, 2004 5:32 am Post subject: |
|
|
Well, it worked after I reemerged xorg to fix the same problem that started causing it not to load. I am a little confused how this fixed it. I think somehow it was a fix ( I reinstalled gcc, glibc ... several times while trying to get genkernel to work) that required me to reboot for it to take effect but this is linux and not windows so I am a bit puzzled.. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
|