Jump to content


Photo

Openxdk Compiling Errors


  • Please log in to reply
9 replies to this topic

#1 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 30 July 2010 - 10:05 AM

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.

#2 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 30 July 2010 - 02:09 PM

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?

#3 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 30 July 2010 - 02:30 PM

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.

#4 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 31 July 2010 - 12:45 AM

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.

Edited by ldotsfan, 31 July 2010 - 12:47 AM.


#5 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 31 July 2010 - 10:59 PM

Thank you very much. OpenXDK compiles again!
Now I can finally get to testing my additions to the XBOX kernel library.

#6 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 01 August 2010 - 04:06 AM

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

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

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

#7 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 02 August 2010 - 10:51 PM

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

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.

#8 Hyper_Eye

Hyper_Eye

    X-S Expert

  • Members
  • PipPipPip
  • 595 posts
  • Gender:Male
  • Location:Huntsvegas, AL.
  • Xbox Version:v1.0
  • 360 version:v5.0 (360S - trinity)

Posted 02 August 2010 - 11:04 PM

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

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

Edited by Hyper_Eye, 02 August 2010 - 11:05 PM.


#9 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 04 August 2010 - 02:52 PM

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

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

Will you be releasing the source?

#10 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 05 August 2010 - 08:21 PM

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)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users