xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Openxdk Compiling Errors, when compiling from either CVS, or Packaged Source
halofreak1990
post Jul 30 2010, 10:05 AM
Post #1


X-S Young Member
*

Group: Members
Posts: 57
Joined: 6-November 08
From: The Netherlands
Member No.: 394680
Xbox Version: v1.6
360 version: v1 (xenon)



I've made a couple of additions to the OpenXDK xboxkrnl headers and source files, and modified the xboxkrnl.exe.def file to reflect this, so I wanted to recompile it so I could see if I did things right.

Unfortunately, I had been using the precompiled OpenXDK.
No matter, I thought. Just download the OpenXDK from CVS, follow the steps highlighted at Installing OpenXDK, and it'd work.
WRONG!
When it gets to compiling newlib, I get this:
CODE
i386-pc-xbox-gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.


So, I thought, it doesn't work from CVS (Maybe an error in the makefiles or something)... So then I'll try the Packaged source.
Unfortunately, it does the exact same thing when compiling newlib.
I'm at a loss here. I can't get past this error, so OpenXDK won't compile.

FYI I'm running Windows 7 Ultimate, and use Cygwin to compile everything OpenXDK related.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Jul 30 2010, 02:09 PM
Post #2


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



In my LBA48/OpenXDK thread, I hit compilation error for newlib as well but it has been a while so I cannot recall the exact error and whether it is exactly the same error as yours.

However I simply worked around the problem biggrin.gif My argument was my changes (on xboxkrnl as well). did not impact newlib and my changes were only to libxboxkrnl.a which is actually just stubs to fool the OpenXDK toolchain into thinking the library is there. newlib is not going to know about the new methods or call them. At run-time, the xbe actually calls the xbox kernel. I managed to compile just the libxboxkrnl.a and manually copied all the .a static libraries to a directory and edited my xbe Makefile to point to this directory instead. The make command happily produced the xbe smile.gif

The only dependency I can recall that newlib has on xboxkrnl is in the file I/O stuff - did you change those?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
halofreak1990
post Jul 30 2010, 02:30 PM
Post #3


X-S Young Member
*

Group: Members
Posts: 57
Joined: 6-November 08
From: The Netherlands
Member No.: 394680
Xbox Version: v1.6
360 version: v1 (xenon)



I did not change any of the existing functions.
I actually added a couple of new ones that weren't defined until now.
Could you tell me how to compile the xboxkrnl.a separate from the rest of the OpenXDK?
I tried it, but couldn't find the right command.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Jul 31 2010, 12:45 AM
Post #4


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



I hit the exact same error as you when I tried it again today tongue.gif

CODE

The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.


Anyway I found the solution too biggrin.gif , here's a log of my shell history, see if it make senses

CODE

which gcc
cd /usr/bin
ls -latr gcc*
cd /etc/alternatives/
ls -latr gcc
rm gcc
ln -s /usr/bin/gcc-3.exe gcc
gcc
cd ~
cd OpenXDK/
ls
cd src
ls
cd xboxkrnl/
ls
make

Basically I removed the soft link in /etc/alternatives/gcc pointing to gcc-4 and remapped it to gcc-3 which didn't complain on the no-cygwin flag and then ran the make command from the xboxkrnl folder which produced libxboxkrnl.a pop.gif

Hence my conjecture my earlier compile error for newlib is a different one as I don't recall doing this step before.

This post has been edited by ldotsfan: Jul 31 2010, 12:47 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
halofreak1990
post Jul 31 2010, 10:59 PM
Post #5


X-S Young Member
*

Group: Members
Posts: 57
Joined: 6-November 08
From: The Netherlands
Member No.: 394680
Xbox Version: v1.6
360 version: v1 (xenon)



Thank you very much. OpenXDK compiles again!
Now I can finally get to testing my additions to the XBOX kernel library.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Aug 1 2010, 04:06 AM
Post #6


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



QUOTE(halofreak1990 @ Aug 1 2010, 05:59 AM) *

Now I can finally get to testing my additions to the XBOX kernel library.

Great, is this for the XNA library or something new?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
halofreak1990
post Aug 2 2010, 10:51 PM
Post #7


X-S Young Member
*

Group: Members
Posts: 57
Joined: 6-November 08
From: The Netherlands
Member No.: 394680
Xbox Version: v1.6
360 version: v1 (xenon)



QUOTE(ldotsfan @ Aug 1 2010, 05:06 AM) *

Great, is this for the XNA library or something new?

For the OpenXDK in general. Completion of the XBOX kernel library is overdue for several years.

Also, to get the xboxkrnl.h compiling under g++, which is what my XNA implementation uses, I needed to remove the 'typedef int bool' on line 26 in types.h because it gave me a redefinition error.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Hyper_Eye
post Aug 2 2010, 11:04 PM
Post #8


X-S Expert
***

Group: Members
Posts: 592
Joined: 26-December 03
From: Huntsvegas, AL.
Member No.: 85607
Xbox Version: v1.0
360 version: v1 (xenon)



QUOTE(halofreak1990 @ Aug 2 2010, 04:51 PM) *

For the OpenXDK in general. Completion of the XBOX kernel library is overdue for several years.

Also, to get the xboxkrnl.h compiling under g++, which is what my XNA implementation uses, I needed to remove the 'typedef int bool' on line 26 in types.h because it gave me a redefinition error.


You might consider:

CODE
#ifndef bool
typedef int bool
#endif


or

CODE
#ifndef __cplusplus
typedef int bool
#endif


This post has been edited by Hyper_Eye: Aug 2 2010, 11:05 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Aug 4 2010, 02:52 PM
Post #9


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



QUOTE(halofreak1990 @ Aug 3 2010, 05:51 AM) *

For the OpenXDK in general. Completion of the XBOX kernel library is overdue for several years.

Will you be releasing the source?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
halofreak1990
post Aug 5 2010, 08:21 PM
Post #10


X-S Young Member
*

Group: Members
Posts: 57
Joined: 6-November 08
From: The Netherlands
Member No.: 394680
Xbox Version: v1.6
360 version: v1 (xenon)



Sure, why not? I'll add it to the XFX downloads at SourceForge.net
If you have the OpenXDK sources, just stick it in and run a "make install".

However, many of the additions still need to be tested; they're basicly copied from 'undocumented.h', the MS XDK (as far as I could translate the naming differences), and the MSDN docs.

I assume DbgPrint(), and DbgBreakPoint() can only be tested on a debug kit, which I don't have. (I've got a softmodded V1.6 XBOX)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 21st May 2013 - 03:05 PM