Programming, for all ages and all languages.
louvros10
Posts: 10 Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece
Post
by louvros10 » Wed Nov 05, 2008 4:50 am
Hi everyone!
I 'm sure that there are a lot of people that can help me compile the dr'ex source code.
My problem is that when I type make on the containing folder of drex-murgiahack-0.0.6, I get the following:
Code: Select all
make -C mm ../mm.o
make[1]: Entering directory `/home/andreas/drex--murgiahack/mm'
ld -r mm.o getfreepage.o ppage.o metaslab.o slabcache.o -o ../mm.o
make[1]: Leaving directory `/home/andreas/drex--murgiahack/mm'
make -C timing ../timing.o
make[1]: Entering directory `/home/andreas/drex--murgiahack/timing'
ld -r events.o timer.o timing.o -o ../timing.o
make[1]: Leaving directory `/home/andreas/drex--murgiahack/timing'
make -C elf ../elf.o
make[1]: Entering directory `/home/andreas/drex--murgiahack/elf'
ld -r elf.o -o ../elf.o
make[1]: Leaving directory `/home/andreas/drex--murgiahack/elf'
make -C api ../api.o
make[1]: Entering directory `/home/andreas/drex--murgiahack/api'
ld -r api.o syscall.o sys_aspace.o sys_uthread.o temp.o -o ../api.o
make[1]: Leaving directory `/home/andreas/drex--murgiahack/api'
make -C capsys ../capsys.o
make[1]: Entering directory `/home/andreas/drex--murgiahack/capsys'
ld -r cap.o capsys.o capset.o -o ../capsys.o
make[1]: Leaving directory `/home/andreas/drex--murgiahack/capsys'
ld -T =utils/ldscript boot.o kern.o cons.o mm.o timing.o elf.o api.o capsys.o -o drex
boot.o: In function `printf':
(.text+0x5d6): undefined reference to `__stack_chk_fail'
boot.o: In function `ce_3':
(.text+0x1798): undefined reference to `__stack_chk_fail'
boot.o: In function `ce_11':
(.text+0x187e): undefined reference to `__stack_chk_fail'
boot.o: In function `ce_10':
(.text+0x1960): undefined reference to `__stack_chk_fail'
boot.o: In function `ce_17':
(.text+0x1a54): undefined reference to `__stack_chk_fail'
boot.o:(.text+0x1b33): more undefined references to `__stack_chk_fail' follow
make: *** [drex] Error 1
I hope that someone can help me...
Thanks in advance!!!
JamesM
Member
Posts: 2935 Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:
Post
by JamesM » Wed Nov 05, 2008 5:06 am
-fno-stack-protector.
In other news - what on earth is dr'ex?
louvros10
Posts: 10 Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece
Post
by louvros10 » Wed Nov 05, 2008 5:18 am
Hm...buffer overflow protection...
So what to do to overcome this???
DeletedAccount
Member
Posts: 566 Joined: Tue Jun 20, 2006 9:17 am
Post
by DeletedAccount » Wed Nov 05, 2008 6:24 am
Are you using djgpp or mingw or cygwin or linux ? give the version which you are using
louvros10
Posts: 10 Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece
Post
by louvros10 » Wed Nov 05, 2008 6:32 am
I'm on Ubuntu 8.10.
DeletedAccount
Member
Posts: 566 Joined: Tue Jun 20, 2006 9:17 am
Post
by DeletedAccount » Wed Nov 05, 2008 10:03 am
Add the above option to the CFLAGS or something like that in the make file
louvros10
Posts: 10 Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece
Post
by louvros10 » Fri Nov 07, 2008 11:34 am
Well...this is the makefile of dr'ex murgiahack-0.0.6:
Code: Select all
# Configurable Section
BASH= bash
# Makefile Start
SUBDIRS= boot kern cons mm timing elf api capsys
SUBDOBJ= $(addsuffix .o, $(basename $(SUBDIRS)))
.PHONY : config subdirs clean $(SUBDIRS)
drex: subdirs
ld -T =utils/ldscript $(SUBDOBJ) -o drex
nm drex | sort > drex.symbols
strip drex
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ ../[email protected]
clean:
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done
-rm drex drex.symbols
Where and what should I add ...???
thepowersgang
Member
Posts: 734 Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:
Post
by thepowersgang » Fri Nov 07, 2008 9:58 pm
In the sub-directories of the dr'ex source tree there will be more Makefiles, you want to alter the 'CFLAGS' value in these files.
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Sat Nov 08, 2008 8:11 am
Which smells like bad design
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
01000101
Member
Posts: 1599 Joined: Fri Jun 22, 2007 12:47 pm
Contact:
Post
by 01000101 » Sat Nov 08, 2008 10:11 am
__stack_chk_fail errors are also due to arrays being within functions and not declared static, you could always change those, but beyond that, I believe JamesM supplied the gcc argument you need to remove the error message.