Howto compile ReactOS under amd64?

Ask your support questions in here

Moderator: Moderator Team

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

Howto compile ReactOS under amd64?

Post by abma »

Hi,

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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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


ScoTTie
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 http://www.reactos.org/wiki/index.php/H ... nux/Gentoo ?

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

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

Post by abma »

Hi!

after

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

Thanks!

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

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

Post by abma »

ok, i've cheated a bit.

i've downloaded http://svn.reactos.org/iso/livecd-21725-rel.rar
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?

abma
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_OUT = $(OUTPUT_)$(TOOLS_BASE)
 TOOLS_OUT_ = $(TOOLS_OUT)$(SEP)

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

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

-MKHIVE_HOST_CFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -g3
+MKHIVE_HOST_CFLAGS = $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -g3 -m32

-MKHIVE_HOST_LFLAGS = $(xTOOLS_LFLAGS) -g3
+MKHIVE_HOST_LFLAGS = $(xTOOLS_LFLAGS) -g3 -m32

 .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

 $(INFLIB_HOST_TARGET): $(INFLIB_HOST_OBJECTS) | $(INFLIB_OUT)
        $(ECHO_AR)


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest