Jump to content


Photo

Compiling With Openxdk


  • Please log in to reply
11 replies to this topic

#1 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 24 June 2005 - 12:10 AM

I'm just trying to compile the Samples_0.07 and it doesn't work at all.

Cygwin is installed in C:\cygwin\
OpenXDK is installed in R:\openxdk\
Samples are in R:\temp\Samples_0.07\

The only line I've changed from the makefile is:
QUOTE
PREFIX = /usr/bin/openxdk

to:
QUOTE
PREFIX = ~/openxdk

because Cygwin recognize ~ as my R:\.

I run the Cygwin Bash Shell and write:
QUOTE
cd ~/temp/Samples_0.07
make


And get as the output:
QUOTE
i386-pc-xbox-gcc -c comingSoon.c -c -g -std=gnu99 -ffreestanding -nostdlib -fno-
builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
-I~/openxdk/i386-pc-xbox/include -I~/openxdk/include -I~/openxdk/include/SDL
make: i386-pc-xbox-gcc: Command not found
make: *** [comingSoon.o] Error 127


uhh.gif uhh.gif uhh.gif WTF??? Why isn't it working???

When this will be done, I'll write a tutorial to how to install and use OpenXDK because I didn't find any on the whole Net, but meanwhile I must get it done myself!!!

#2 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 24 June 2005 - 06:21 AM

Looks like i386-pc-xbbox-gcc can't be found in your environment path.

Either add R:\\openxdk\\bin to your path.

Or

Edit the makefile so that the lines that read:

CC = i386-pc-xbox-gcc
CPP = i386-pc-xbox-g++
CXBE = cxbe

now read:

CC = $(PREFIX)/bin/i386-pc-xbox-gcc
CPP = $(PREFIX)/bin/i386-pc-xbox-g++
CXBE = $(PREFIX)/bin/cxbe


#3 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 30 June 2005 - 10:33 PM

QUOTE(Carcharius @ Jun 24 2005, 02:32 AM)
Looks like i386-pc-xbbox-gcc can't be found in your environment path.

Either add R:\\openxdk\\bin to your path.

Or

Edit the makefile so that the lines that read:

CC  = i386-pc-xbox-gcc
CPP  = i386-pc-xbox-g++
CXBE = cxbe

now read:

CC  = $(PREFIX)/bin/i386-pc-xbox-gcc
CPP  = $(PREFIX)/bin/i386-pc-xbox-g++
CXBE = $(PREFIX)/bin/cxbe

View Post



Second solution doesn't change anything.
For the path thing, I have no idea how to do it.

#4 Smoko

Smoko

    X-S Senior Member

  • Members
  • PipPip
  • 259 posts
  • Xbox Version:v1.4
  • 360 version:none

Posted 01 July 2005 - 01:45 PM

Have you got the GCC and G++ for Cygwin, I didnt. So I got them and, now it works

biggrin.gif

#5 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 02 July 2005 - 06:26 PM

QUOTE(Smoko @ Jul 1 2005, 09:56 AM)
Have you got the GCC and G++ for Cygwin, I didnt. So I got them and, now it works

biggrin.gif

View Post



Good thinking, but I wrote this in my Cygwin Bash Shell:
QUOTE
$ ls /bin/g*
/bin/g++-2.exe        /bin/gifcolor.exe  /bin/gperf.exe
/bin/g++.exe          /bin/gifcomb.exe    /bin/gpg.exe
/bin/g77-2.exe        /bin/gifcompose    /bin/gpgsplit.exe
/bin/g77.exe          /bin/giffiltr.exe  /bin/gpgv.exe
/bin/gawk-3.1.4.exe  /bin/giffix.exe    /bin/gpidump.exe
/bin/gawk.exe        /bin/gifflip.exe    /bin/gprof.exe
$
/bin/gcc.exe          /bin/gifinter.exe  /bin/grace.exe
/bin/gccbug          /bin/gifinto.exe    /bin/gracebat.exe
/bin/gcj.exe          /bin/gifovly.exe    /bin/grep-changelog
/bin/gcjh.exe        /bin/gifpos.exe    /bin/grep.exe
$
/bin/gcov.exe        /bin/gifrsize.exe  /bin/grepjar.exe
/bin/gd2copypal.exe  /bin/gifspnge.exe  /bin/grn.exe
/bin/gd2togif.exe    /bin/giftext.exe    /bin/grodvi.exe
/bin/gd2topng.exe    /bin/giftogd2.exe  /bin/groff.exe
/bin/gdb.exe          /bin/gifwedge.exe  /bin/groffer
/bin/gdcmpgif.exe    /bin/gij.exe        /bin/grog
/bin/gdlib-config    /bin/glpuzzle.exe  /bin/grolbp.exe
/bin/gdparttopng.exe  /bin/glut32.dll    /bin/grolj4.exe
/bin/gdtopng.exe      /bin/gm.exe        /bin/grops.exe
/bin/gendiff          /bin/gnat.exe      /bin/grotty.exe
/bin/getafm          /bin/gnatbind.exe  /bin/groups
/bin/getclip.exe      /bin/gnatbl.exe    /bin/gs.exe
/bin/getfacl.exe      /bin/gnatchop.exe  /bin/gsbj
/bin/getopt.exe      /bin/gnatdll.exe    /bin/gsdj
/bin/gettext.exe      /bin/gnatfind.exe  /bin/gsdj500
/bin/gettext.sh      /bin/gnatkr.exe    /bin/gsftopk.exe
/bin/gettextize      /bin/gnatlink.exe  /bin/gsl-config
/bin/gftodvi.exe      /bin/gnatls.exe    /bin/gsl-histogram.exe
/bin/gftopk.exe      /bin/gnatmake.exe  /bin/gsl-randist.exe
/bin/gftype.exe      /bin/gnatname.exe  /bin/gslj
/bin/gif2epsn.exe    /bin/gnatprep.exe  /bin/gslp
/bin/gif2ps.exe      /bin/gnatpsta.exe  /bin/gsnd
/bin/gif2rgb.exe      /bin/gnatxref.exe  /bin/gtypist.exe
/bin/gif2tiff.exe    /bin/gnuattach      /bin/guile-config
/bin/gif2x11.exe      /bin/gnuclient.exe  /bin/guile-snarf
/bin/gifasm.exe      /bin/gnudoit        /bin/guile-tools
/bin/gifbg.exe        /bin/gnugo.exe      /bin/guile.exe
/bin/gifburst        /bin/gnuplot.exe    /bin/gunzip.exe
/bin/gifclip.exe      /bin/gpc-run        /bin/gzexe
/bin/gifclrmp.exe    /bin/gpc.exe        /bin/gzip.exe

/bin/glui-examples:
example1.exe  example3.exe  example5.exe
example2.exe  example4.exe  example6.exe


So as you can see, they're here. And I can execute gcc and g++ anyway, so that's not the problem.

#6 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 02 July 2005 - 07:30 PM

QUOTE(SmashManiac @ Jul 2 2005, 07:37 PM)
I can execute gcc and g++ anyway, so that's not the problem.

View Post


In that case - just edit the makefile and change it so thatg instead of trying to call i386-pc-xbox-gcc (or -g++) it just calls gcc (or g++).

The results will be the same - the i386-pc-xbox-* are just symlinks to the standard gcc, g++ etc. anyway

#7 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 02 July 2005 - 08:10 PM

QUOTE(Carcharius @ Jul 2 2005, 03:41 PM)
In that case - just edit the makefile and change it so thatg instead of trying to call i386-pc-xbox-gcc (or -g++) it just calls gcc (or g++).

View Post



Results are better this time. smile.gif

Still trying to compile the 0.07 samples. I've only changed the header of my makefile to this:
CODE
#
# update this variable to wherever you installed the OpenXDK libraries
#
#PREFIX = /usr/local/openxdk
PREFIX = ~/openxdk

#CC   = i386-pc-xbox-gcc
#CPP  = i386-pc-xbox-g++
CC   = /bin/gcc
CPP  = /bin/g++
CXBE = cxbe


Now the output is:
CODE
$ make
/bin/gcc -c comingSoon.c -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin
-fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -I~/open
xdk/i386-pc-xbox/include -I~/openxdk/include -I~/openxdk/include/SDL
comingSoon.c:2:22: hal/xbox.h: No such file or directory
comingSoon.c:3:23: hal/video.h: No such file or directory
comingSoon.c:4:31: xboxkrnl/xboxkrnl.h: No such file or directory
comingSoon.c: In function `XBoxStartup':
comingSoon.c:8: warning: implicit declaration of function `XVideoGetFB'
comingSoon.c:31: warning: implicit declaration of function `XSleep'
comingSoon.c:32: warning: implicit declaration of function `XReboot'
make: *** [comingSoon.o] Error 1


Obviously, it seems that make.exe can't see anything in the openxdk sub-directories, which is probably why writing i386-pc-xbox-gcc wasn't working either. Seems like there's not much missing, but what?

#8 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 02 July 2005 - 08:49 PM

try setting

PREFIX=/r/openxdk instead of what you are using already.

#9 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 03 July 2005 - 06:54 PM

QUOTE(Carcharius @ Jul 2 2005, 05:00 PM)
try setting

PREFIX=/r/openxdk instead of what you are using already.

View Post



No improvements. Obviously because the /r directory does not exist for Cygwin.
I've checked 3 times and the directory in which I installed Openxdk is really ~/openxdk in my Cygwin installation...

#10 Carcharius

Carcharius

    X-S Expert

  • Members
  • PipPipPip
  • 635 posts

Posted 03 July 2005 - 07:46 PM

Right a quick google leads me to believe that setting

PREFIX=/cygdrive/r/openxdk

should be what you need.

The drives available to windows should get mapped in /cygdrive.

#11 SmashManiac

SmashManiac

    X-S Young Member

  • Members
  • Pip
  • 59 posts
  • Interests:Nintendo video games (especially Smash Bros series), programming, maths, hacking.
  • Xbox Version:v1.2
  • 360 version:none

Posted 03 July 2005 - 09:22 PM

QUOTE(Carcharius @ Jul 3 2005, 03:57 PM)
Right a quick google leads me to believe that setting

PREFIX=/cygdrive/r/openxdk

should be what you need.

The drives available to windows should get mapped in /cygdrive.

View Post



A----HA! I knew that God was a part of Google! laugh.gif Even writing ls -al in Cygwin root directory doesn't show this special directory!

Well, it shows that gcc and g++ weren't made for writing a ~ in its -I parameter.

From better to better:
CODE
$ make
/bin/gcc -c comingSoon.c -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin
-fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -I/cygdr
ive/r/openxdk/i386-pc-xbox/include -I/cygdrive/r/openxdk/include -I/cygdrive/r/o
penxdk/include/SDL
/bin/gcc -o comingSoon.exe comingSoon.o -L/cygdrive/r/openxdk/i386-pc-xbox/lib -
L/cygdrive/r/openxdk/lib  -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl -
nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20  -shared -Wl,--e
ntry,_WinMainCRTStartup  -Wl,--strip-all
cxbe -TITLE:'comingSoon.exe' -DUMPINFO:"comingSoon.cxbe" -OUT:"comingSoon.xbe" c
omingSoon.exe > /dev/null
cxbe: not found
make: *** [comingSoon.exe] Error 127


... It can't find cxbe? No prob' with this type of error now! Just change my makefile header to this:
CODE
#
# update this variable to wherever you installed the OpenXDK libraries
#
#PREFIX = /usr/local/openxdk
PREFIX = /cygdrive/r/openxdk

#CC   = i386-pc-xbox-gcc
#CPP  = i386-pc-xbox-g++
#CXBE = cxbe
CC   = gcc
CPP  = g++
CXBE = /cygdrive/r/openxdk/bin/cxbe


And try again:
CODE
$ make
gcc -c comingSoon.c -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-
exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -I/cygdrive/r
/openxdk/i386-pc-xbox/include -I/cygdrive/r/openxdk/include -I/cygdrive/r/openxd
k/include/SDL
gcc -o comingSoon.exe comingSoon.o -L/cygdrive/r/openxdk/i386-pc-xbox/lib -L/cyg
drive/r/openxdk/lib  -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl -nostd
lib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20  -shared -Wl,--entry,
_WinMainCRTStartup  -Wl,--strip-all
/cygdrive/r/openxdk/bin/cxbe -TITLE:'comingSoon.exe' -DUMPINFO:"comingSoon.cxbe"
-OUT:"comingSoon.xbe" comingSoon.exe > /dev/null

Bam! Message box appears from cxbe.exe with message "The procedure entry point _impure_ptr could not be located in the dynamic link library cygwin1.dll."! OK. And finally Cygwin writes:
CODE
make: *** [comingSoon.exe] Error 57


After searching a bit in Google about _impure_ptr, I found out that this error occurs in old versions of Cygwin. So I must reinstall my Cygwin package... and I don't have the admin rights to do so!!!
grr.gif grr.gif grr.gif

At least, it looks like all of my problems with my makefile are OK now with those changes. cool.gif I must call the admin and let him solve the _impure_ptr problem. I don't know how long it will take, since it's in my university, but I'll write back when it'll be done.

Meanwhile, thanks for all your help Carcharius! beerchug.gif

#12 Alistair23

Alistair23

    X-S Enthusiast

  • Members
  • 3 posts

Posted 30 August 2007 - 07:06 AM

Where is the GCC and G++ for Cygwin? I can't find it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users