Howto compile ReactOS under amd64?

Ask your support questions in here

Moderator: Moderator Team

Post Reply
Posts: 15
Joined: Tue Oct 18, 2005 12:23 pm

Howto compile ReactOS under amd64?

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

Posts: 165
Joined: Fri Feb 04, 2005 9:40 am

Post by ScoTTie »

I dont use gentoo myself, nor do i have access to a gentoo box, but have you checked out ... nux/Gentoo ?

Posts: 15
Joined: Thu Mar 30, 2006 12:05 pm

Post 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 :)

Posts: 15
Joined: Tue Oct 18, 2005 12:23 pm

Post 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) ;-)


Posts: 15
Joined: Tue Oct 18, 2005 12:23 pm

Post 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?

Posts: 15
Joined: Tue Oct 18, 2005 12:23 pm

Post 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?

Posts: 15
Joined: Tue Oct 18, 2005 12:23 pm

Post 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


Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], DotBot [Crawler] and 1 guest