Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Kernel Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th February 2007, 22:27
cio cio is offline
Junior Member
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default kernel compilation error on ubuntu edgy

I have followed the steps on:

http://www.howtoforge.com/kernel_compilation_ubuntu

to recompile the kernel on my ubuntu edgy. Unfortunately in the during the compilation process I get this error:


LD init/built-in.o
LD .tmp_vmlinux1
init/built-in.o: In function `try_name':
do_mounts.c: (.text+0x4a4): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `name_to_dev_t':
(.text+0x789): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `change_floppy':
(.init.text+0x9a1): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `mount_block_root':
(.init.text+0xc03): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `do_header':
initramfs.c: (.init.text+0x4294): undefined reference to `__stack_chk_fail'
arch/i386/kernel/built-in.o: (.text+0x4701): more undefined references to `__stack_chk_fail' follow
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory 'usr/src/linux2.6.16'
make: *** [debian/stamp-build-kernel] Error 2

I have tried to compile different kernel sources( 2.6.16, 2.6.17-10) while running different version of kernels( 2.6.17.10-386, 2.6.17.10-generic, 2.6.17.11-generic). I even tried it on different computers just to see if there is hardware issue or .config problem. ( I always copied .config from the /boot/config-2.6.xx). But I always got the exact same error.
Any help will be very appreciated.(I have to compile this kernel by tuesday as a homework )

Last edited by cio; 11th February 2007 at 22:32.
Reply With Quote
Sponsored Links
  #2  
Old 11th February 2007, 23:27
cio cio is offline
Junior Member
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just found it at the 10th page after googling

I am posting the solution in case some one has the same problem:

in your source folder's root edit the Makefile like this:

in the original makefile cflags assignment was like this:
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common

add this option:
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fno-stack-protector

the other may change from different kernel versions, the only thing is to add -fno-stack-protector.

and also add this at the end of assignments to cflags here:

initially:

CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)

CFLAGS += $(call cc-option,-Wno-pointer-sign,)

after modifying with this line:

CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)

CFLAGS += $(call cc-option,-Wno-pointer-sign,)

CFLAGS += $(call cc-option, -fno-stack-protector-all \
-fno-stack-protector)

this forum was a lucky charm for me I hope I can help!
Reply With Quote
  #3  
Old 7th March 2008, 20:06
catblade0 catblade0 is offline
Junior Member
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks

It actually helped me, using the lttng toolkit. Thank you!
Reply With Quote
  #4  
Old 1st September 2010, 14:10
shail.sapna shail.sapna is offline
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks a lottttt

yuppp it helped me too...it was really awesome
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Xen 3.0.2 /3.0.3 | No Swap in DomU Merc HOWTO-Related Questions 10 27th March 2007 11:40
WG311v2 almost working with Edgy (w/o ndiswrapper) need help with the rest caudata Server Operation 11 13th November 2006 20:02
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 12:59
Questions about ubuntu ISP-Server Setup badgerbox76 HOWTO-Related Questions 15 5th March 2006 14:41


All times are GMT +2. The time now is 11:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.