Compiling dr'ex

Programming, for all ages and all languages.
Post Reply
louvros10
Posts: 10
Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece

Compiling dr'ex

Post by louvros10 »

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!!!
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Compiling dr'ex

Post by JamesM »

-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

Re: Compiling dr'ex

Post by louvros10 »

-fno-stack-protector??? I 'm a beginner...what is this???
Dr'ex is an exokernel listed in the project section of OSDev.org
https://sourceforge.net/projects/drex/
louvros10
Posts: 10
Joined: Fri Nov 23, 2007 1:32 pm
Location: Greece

Re: Compiling dr'ex

Post by louvros10 »

Hm...buffer overflow protection...
So what to do to overcome this???
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: Compiling dr'ex

Post by DeletedAccount »

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

Re: Compiling dr'ex

Post by louvros10 »

I'm on Ubuntu 8.10.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: Compiling dr'ex

Post by DeletedAccount »

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

Re: Compiling dr'ex

Post by louvros10 »

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 ...???
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: Compiling dr'ex

Post by thepowersgang »

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.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
User avatar
Combuster
Member
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:

Re: Compiling dr'ex

Post by Combuster »

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 ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Compiling dr'ex

Post by 01000101 »

__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.
Post Reply