Page 1 of 1

Howto compile ReactOS under amd64?

Posted: Thu Apr 13, 2006 12:32 pm
by abma

i try to compile reactos with a amd-64 with gentoo. i get the error

Code: Select all

[WRC]      obj-i386/base/applications/calc/rsrc.coff
i386-mingw32msvc-windres: calc.rsrc.res.tmp: Not a valid WIN32 resource file
make: *** [obj-i386/base/applications/calc/rsrc.coff] Error 1
what could be wrong?

Code: Select all

> i386-mingw32msvc-gcc --version
i386-mingw32msvc-gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

>i386-mingw32msvc-windres --version
GNU windres 2.15.94 20050118
Copyright 2004 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

Posted: Sat Apr 15, 2006 12:11 pm
by ScoTTie
I dont use gentoo myself, nor do i have access to a gentoo box, but have you checked out ... nux/Gentoo ?

Posted: Mon Apr 17, 2006 8:36 pm
by drwook
I hit that problem too, and got further (not all the way, but beyond that) by re-emerging all the xmingw-* stuff with -m32 as a cflag (be careful to only use it for non-vital stuff though ;) ).

Then I hit another brick wall which I can't even remember (I think while building the boot cd image), so if you get a problem there and solve it let me know :)

Posted: Mon Apr 24, 2006 12:14 pm
by abma


Code: Select all

CFLAGS="-m32" emerge -C xmingw-binutils xmingw-gcc xmingw-runtime xmingw-w32api
compiling works like a charm :D

Also i've no problems with make bootcd / make livecd. The only problem exist is, ReactOS reports an error, a reg-key isn't found. (I think this is a svn-problem) ;-)


Posted: Tue Apr 25, 2006 3:19 am
by abma
Ok, because the error could be amd64 related i post it here:

Freeloader starts normal, but when i try to start reactos Freeloader prints this message:

Code: Select all

Couldn't open CodePage registry key
What's wrong/what can i do to resolve the problem?

Posted: Tue Apr 25, 2006 3:55 am
by abma
ok, i've cheated a bit.

i've downloaded
then extracted \reactos\system32\config\*
and copied it to the reactos installation.

then all worked! ;-)

now there are to posibilities left:
1. something is broken since the 21725 revision (mine is 21737)
2. something with the build system is wrong (a bug?!)

i think its the second one, what can i do?

Posted: Wed May 10, 2006 6:59 pm
by abma
it seems to be a problem in the tool mkhive i think.

I've found a workaround. I've modified some .mak files, so the build-tools are compiled as 32-bit applications, now compiling works fine :-)

Code: Select all

Index: tools/tools.mak
--- tools/tools.mak     (Revision 21879)
+++ tools/tools.mak     (Arbeitskopie)
@@ -5,9 +5,9 @@

-TOOLS_CFLAGS = $(CFLAGS) -Wall -Wpointer-arith -Wno-strict-aliasing
-TOOLS_CPPFLAGS = $(CPPFLAGS) -Wall -Wpointer-arith
+TOOLS_CFLAGS = $(CFLAGS) -Wall -Wpointer-arith -Wno-strict-aliasing -m32
+TOOLS_CPPFLAGS = $(CPPFLAGS) -Wall -Wpointer-arith -m32

Index: tools/mkhive/mkhive.mak
--- tools/mkhive/mkhive.mak     (Revision 21879)
+++ tools/mkhive/mkhive.mak     (Arbeitskopie)
@@ -28,9 +28,9 @@
        $(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))



 .PHONY: mkhive
 mkhive: $(MKHIVE_TARGET)
Index: lib/inflib/inflib.mak
--- lib/inflib/inflib.mak       (Revision 21879)
+++ lib/inflib/inflib.mak       (Arbeitskopie)
@@ -33,7 +33,7 @@

 INFLIB_HOST_CFLAGS = -O3 -Wall -Wpointer-arith -Wconversion \
   -Wstrict-prototypes -Wmissing-prototypes -DINFLIB_HOST -D_M_IX86 \
-  -I$(INFLIB_BASE) -Iinclude/reactos -DDBG
+  -I$(INFLIB_BASE) -Iinclude/reactos -DDBG -m32