Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Stages 1 vs 3: kernel compilation problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Guinpen
Guru
Guru


Joined: 08 Dec 2004
Posts: 393

PostPosted: Fri Dec 24, 2004 7:54 am    Post subject: [SOLVED] Stages 1 vs 3: kernel compilation problems Reply with quote

Dear Gentoo community,

I've been having trouble compiling the gentoo-dev-sources-2.6.9-r9 kernel when doing a stage 1 installation. When I do a stage 3 (using the pentium3 tarball), it all works fine, but when I do a stage 1 (using the x86 snapshot) it works until I try to use genkernel to make a kernel - then it fails while compiling modules. My cumputer is a Dell Latitude D800 laptop with a 1.3 Pentium-M / 512 RAM. The only explanation I found is that some of my USE variables may be messing things up, although I used the exact same make.conf (and all other files, inclusing the config file for the kernel, which is a very slightly modified version of the default genkernel config file).

So, here's the end of genkernel.log:

--- START OF GENKERNEL LOG ---

gcc -isystem include -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 -Wno-unused -Wredundant-decls -nostdlib -o bin-i386/diet bin-i386/start.o bin-i386/dyn_start.o diet.c bin-i386/dietlibc.a bin-i386/dyn_stop.o -DDIETHOME=\"/var/tmp/genkernel/dietlibc-0.27\" -DVERSION=\"dietlibc-0.27\" -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+0x1c7): In function `execvp':
: undefined reference to `__guard'
bin-i386/dietlibc.a(execvp.o)(.text+0x1e5): 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':
: undefined reference to `__stack_smash_handler'
bin-i386/dietlibc.a(strstr.o)(.text+0x20): In function `strstr':
: undefined reference to `__guard'
bin-i386/dietlibc.a(strstr.o)(.text+0x9e): In function `strstr':
: undefined reference to `__stack_smash_handler'
bin-i386/dietlibc.a(exec_lib.o)(.text+0x1b): In function `__exec_shell':
: undefined reference to `__guard'
bin-i386/dietlibc.a(exec_lib.o)(.text+0x74): In function `__exec_shell':
: undefined reference to `__guard'
bin-i386/dietlibc.a(exec_lib.o)(.text+0x8d): In function `__exec_shell':
: undefined reference to `__stack_smash_handler'
collect2: ld returned 1 exit status
make: *** [bin-i386/diet] Error 1
* Gentoo Linux Genkernel; Version 3.1.0c#[0m

* ERROR: Failed to compile the "prefix=/var/tmp/genkernel/diet" target...
* -- Grepping log... --
* -- End log... --
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*

--- END OF GENKERNEL LOG ---

And if it is needed, here's my make.conf:

--- START OF MAKE.CONF ---

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O3 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT="180"
MAKEOPTS="-j1"
AUTOCLEAN="yes"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
USE="-3dfx -3dnow X Xaw3d -aalib -accessibility -acl acpi -adabas -adns -afs -aim alsa -altivec -apm arts avi bash-completion -berkdb -bidi -birdstep -bonobo bzlib calendar -canna -cdb -cjk cpdflib crypt cscope ctype cups -db2 -dba -dbase -dbm -debug dedicated dga dio directfb divx4linux doc -dvb dvd dvdr -emacs -emacs-w3 -empress -empress-bcs encode esd -esoob -ethereal -ev6 exif fastcgi fbcon -filepro -firebird flac flash -flatfile foomaticdb -freetds -freewnn -frontbase ftp -gb -gd -gd-external -gdbm ggi gif ginac -gnome gnutls gphoto2 gpm -gps gstreamer -gtk -gtkhtml -guile hardened hardenedphp -hyperwave-api -icc -icc-pgo iconv icq -ifc imagemagick imap imlib -informix -ingres -innodb -interbase -iodbc ipv6 -jabber jack java -joystick jpeg -junit kde -leim lirc mad -maildir -mailwrapper -matrox -mbox -mcve -memlimit -mikmod ming -minimal mmx -mnogosearch motif mozilla mpeg -msession msn -msql mssql -mule -multilib mysql mysqli nas ncurses nptl -nocardbus nocd -nocxx -oci8 odbc offensive -ofx oggvorbis openal opengl -oracle7 -oscar -oss -ovrimos pcmcia -pcre pda pdflib perl -pfpro php pic pie plotutils png portaudio posix -postgres ppds -profile python qt quicktime readline -ruby samba -sapdb scanner sdl session simplexml -slang slp sockets -solid -speex spell spl -sqlite sse ssl svga -sybase -sybace-ct tcltk tcpd -tetex -theora -tidy tiff tokenizer truetype trusted unicode usb -usepackagedmakefiles vhosts videos -voodoo3 -wavelan -wddx -wmf wxwindows xface xine xinerama xml xml2 xmms -xpm xprint xsl xv xvid -yahoo -yaz -zeo zlib x86"

--- END OF MAKE.CONF ---

I also tried using another kenel (namely ck-sources-2.6.9-ck3), and it behaves in exactly the same way. It works with a stage 3 install, and fails with the same error with a stage 1 install. Any help will be greatly appreciated!! Thanks in advance.


Last edited by Guinpen on Mon Dec 27, 2004 9:09 am; edited 1 time in total
Back to top
View user's profile Send private message
xbmodder
Guru
Guru


Joined: 25 Feb 2004
Posts: 404

PostPosted: Fri Dec 24, 2004 8:24 am    Post subject: Reply with quote

genkernel is always dangerous!
Back to top
View user's profile Send private message
Guinpen
Guru
Guru


Joined: 08 Dec 2004
Posts: 393

PostPosted: Fri Dec 24, 2004 10:02 pm    Post subject: Reply with quote

Well, this doesn't help much. Why is genkernel dangerous? It does generate a kernel that works with most if not all of my hardware....
I'd love to make the kernel myself, but configuring it is really driving me crazy. Even when I include the right modules, the hardware still doesn't run, even when I modprobe them. Also, I have no idea how to setup autodetection (coldplug?) and I'm clueless about that initrd stuff.
That's why I thought genkernel is a good option for someone who is not extremely experienced.
Anyway, if I run the same compilation manually with the same options, wouldn't it still fail?
Back to top
View user's profile Send private message
xbmodder
Guru
Guru


Joined: 25 Feb 2004
Posts: 404

PostPosted: Sun Dec 26, 2004 2:05 am    Post subject: Reply with quote

what i do is i make all my main Hardware built in
and all my other stuff modules.
/etc/modules.autoload.d/kernel-2.6 # always helps
Back to top
View user's profile Send private message
Guinpen
Guru
Guru


Joined: 08 Dec 2004
Posts: 393

PostPosted: Sun Dec 26, 2004 7:22 am    Post subject: Reply with quote

xbmodder wrote:
what i do is i make all my main Hardware built in
and all my other stuff modules.
/etc/modules.autoload.d/kernel-2.6 # always helps


The problem is really figuring out what modules support my hardware, but I'll give it another try. What do you put inside the file you mentioned? (I know it is supposed to contain the modules that are started automatically).

I get the feeling the problem is not in genkernel or choosing the right modules. The same things work with stage 3 - wht might things be broken for stage 1?
Back to top
View user's profile Send private message
Guinpen
Guru
Guru


Joined: 08 Dec 2004
Posts: 393

PostPosted: Mon Dec 27, 2004 9:09 am    Post subject: Reply with quote

I googled around and noticed that errors related to __guard and __stack_smash_pointer were occuring all over the place with things different from kernels. So I thought something must be wrong with my toolchain. Now, __guard sounded like security, to me, and so I decided to flip "hardened" and "hardenedphp" in make.conf to off and suddenly it all worked. I was about to give up Gentoo. :)
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Mon Dec 27, 2004 1:31 pm    Post subject: Reply with quote

ooh yeah definitely. unless you're a security nut, leave those off. i can't claim to be any expert, but i've heard nothing but trouble from people using them. you'd definitely run into more problems down the line tryting to compile xorg, like i did when i managed to compile my entire system using a hardened version of gcc completely by accident.

speaking of which, you might want to do a emerge -pv gcc glibc. they're the two parts of the toolchain that use the hardened flag. if you built them with hardened enabled, you might want to re-bootstrap now that you have it removed, again to keep from running into more trouble later on.

one other thing, and sorry for going on, but for a stage one install, keep your USE flags next to nothing. i just go with "nptl -nls" for the bootstrap. then, emerge -pv system, pick out the ones that sound interesting, add them to the make.conf file, emerge -pv system again (because changing the flags will often change the dependencies, which also have their own flags, etc, etc) and continue that till you're satisfied and then let it rip. i recommending leaving "java" "X" and "pam" out for emerge system (java and X pull in too much extra crap, and they can come later, and pam just sucks). "python", "perl", "readline", "ncurses", "gdbm" and "berkdb" (among some others) will give you a solid foundation to build on, and after that you can customize to your heart's content. remember you can change flags at any time.

--de.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum