forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't compile psp toolchain on OSX.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Sat Aug 02, 2008 12:11 pm    Post subject: Can't compile psp toolchain on OSX. Reply with quote

I'm on a Macbook Pro 1,1(1.83Ghz core duo, 2gb ram, 80gb hdd) running Leopard 10.5.4. When I run the toolchain.sh file, it won't compile the toolchain, giving an error:

Code:

checking whether the C compiler (gcc -g -O2  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** [configure-binutils] Error 1
make: *** Waiting for unfinished jobs....


But I have Apple's gcc already installed, and it works[tested a simple hello world console app in Xcode], so WTF is wrong?

Here's a pastebin showing all the output for those who are interested.
http://pastebin.ca/1090397
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sat Aug 02, 2008 1:48 pm    Post subject: Reply with quote

have a poke around
http://forums.ps2dev.org/viewtopic.php?t=5391
Back to top
View user's profile Send private message AIM Address
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Sat Aug 02, 2008 2:43 pm    Post subject: Reply with quote

I used Macports to install everything but autogen:

daxs-macbook-pro-15:~ dax$ sudo port install autogen
Password:
---> Building autogen with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autogen/work/autogen-5.9.3" && make all " returned error 2
Command output: test -f ${top_srcdir}/VERSION || die "error ${top_srcdir}/VERSION file missing"
eval `egrep '^AG_[A-Z_]*=' ${top_srcdir}/VERSION` 2> /dev/null
echo $AG_VERSION

echo
echo ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd - 2
CLOSING SHELL SERVER - command failure:

if test ! -d "${top_srcdir}"; then
echo "NOTICE: Setting top_srcdir to .." >&2
top_srcdir=..
fi
test -f ${top_srcdir}/VERSION || die "error ${top_srcdir}/VERSION file missing"
eval `egrep '^AG_[A-Z_]*=' ${top_srcdir}/VERSION` 2> /dev/null
echo $AG_VERSION
FSM Error: in state 6 (need_value), event 8 (;) is invalid
invalid transition: in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_autogen/work/autogen-5.9.3/agen5/opts.def on line 63
token in error: `;'

[[...<error-text>]]

#ifndef XML2AG
include = <<- _END_INCLUDE
#include "autogen.

Likely causes: a mismatched quote, a value that needs quoting,
or a missing semi-colon
make[2]: *** [xmlopts.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.


Any idea? =s
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sat Aug 02, 2008 3:22 pm    Post subject: Reply with quote

It should compile without the autogen port install anyway. (I think I had trouble with that one too)

Wally
Back to top
View user's profile Send private message AIM Address
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Sat Aug 02, 2008 3:23 pm    Post subject: Reply with quote

Any other ideas as to why the toolchain won't compile? Everything else is set correctly according to the tutorial. :(
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sat Aug 02, 2008 4:04 pm    Post subject: Reply with quote

Read here :)
http://forums.ps2dev.org/viewtopic.php?t=10377
Back to top
View user's profile Send private message AIM Address
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Sat Aug 02, 2008 4:53 pm    Post subject: Reply with quote

Aha you are inluck i just fixed all the bugs and compiled the toolchain and all the psplibraries flawlessly and just uploaded them 34.5mb download ;)

Have fun deving mate.


http://www.psp-programming.com/forums/index.php/topic,3579.0.html
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Sun Aug 03, 2008 5:21 pm    Post subject: Reply with quote

Now I'm having another problem. I compiled the hello world sample(elf_template), and I don't see any text on the screen; it's just black. I'm using the above poster's already compiled SDK. I had a similar problem when I was downgrading my psp from OFW as well. Could the two be linked?
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sun Aug 03, 2008 11:36 pm    Post subject: Reply with quote

How does the firmware you are running on your psp affect your psp sdk install?

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Mon Aug 04, 2008 5:55 am    Post subject: Reply with quote

I know the pspsdk i uploaded is 100% functional. So you did something wrong. Also I dont think the pspsdk samples have been updated to work properly under the 3.xx kernel, so that may be your problem.
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Aug 04, 2008 7:36 am    Post subject: Reply with quote

They work fine (except for a few very specific hack ones), but always best to be 100% sure and build any sample with: make BUILD_PRX=1 for > 3.0 kernels
Back to top
View user's profile Send private message
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Mon Aug 04, 2008 9:05 am    Post subject: Reply with quote

Here's what I'm trying to execute on my Slim, and am on Firmware 3.90 M33-3:

Code:

/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * main.c - Basic ELF template
 *
 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
 *
 * $Id: main.c 1888 2006-05-01 08:47:04Z tyranid $
 * $HeadURL$
 */
#include <pspkernel.h>
#include <pspdebug.h>

#define printf pspDebugScreenPrintf

/* Define the module info section */
PSP_MODULE_INFO("template", 0, 1, 0);
PSP_HEAP_SIZE_KB(10000);

/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

int main(int argc, char *argv[])
{
   pspDebugScreenInit();

   pspDebugScreenPrintf("Hello World\n");

   return 0;
}



Makefile:
Code:

BUILD_PRX = 1
PSP_FW_VERSION = 390
TARGET = template
OBJS = main.o

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Template

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak



Just a black screen with a crash about 10-20 seconds later, resulting in a powerdown. No errors.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Aug 04, 2008 9:26 am    Post subject: Reply with quote

You need a delay to read any text, and NEVER exit via return.

Code:
    sceKernelDelayThread(3*1000*1000);
    sceKernelExitGame();

    return 0;   /* never reaches here, again, just to suppress warning */
Back to top
View user's profile Send private message AIM Address
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Mon Aug 04, 2008 10:13 am    Post subject: Reply with quote

This just doesn't seem to want to work for me ~_~

Code:

/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * main.c - Basic ELF template
 *
 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
 *
 * $Id: main.c 1888 2006-05-01 08:47:04Z tyranid $
 * $HeadURL$
 */
#include <pspkernel.h>
#include <pspdebug.h>

#define printf pspDebugScreenPrintf

/* Define the module info section */
PSP_MODULE_INFO("template", 0, 1, 0);
PSP_HEAP_SIZE_KB(10000);

/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

int main(int argc, char *argv[])
{
   pspDebugScreenInit();

   pspDebugScreenPrintf("Hello World\n");
   
   sceKernelDelayThread(3*1000*1000);
   sceKernelExitGame();

   return 0;
}


It still just has a black screen with a crash. No makefile changes. What could I be missing here? Argh.
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Mon Aug 04, 2008 1:22 pm    Post subject: Reply with quote

TyRaNiD wrote:
They work fine (except for a few very specific hack ones), but always best to be 100% sure and build any sample with: make BUILD_PRX=1 for > 3.0 kernels



Read what TyRaNiD said, its almost fool proof!
Back to top
View user's profile Send private message AIM Address
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Mon Aug 04, 2008 2:12 pm    Post subject: Reply with quote

I already have that in my makefile, do I need to run the PRX or something instead? :S

Code:

BUILD_PRX = 1
PSP_FW_VERSION = 390
TARGET = template
OBJS = main.o

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Template

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Aug 04, 2008 2:17 pm    Post subject: Reply with quote

No. The difference is the EBOOT has the prx instead of the elf inside. You always run the EBOOT (unless using psplink). If you're getting this error while trying to use psplink, try not using psplink. Just run the EBOOT on the PSP and see what happens.
Back to top
View user's profile Send private message AIM Address
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Tue Aug 05, 2008 9:57 am    Post subject: Reply with quote

I haven't used PSPLink any this whole time, just fyi. :P
Back to top
View user's profile Send private message
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Thu Aug 07, 2008 10:19 am    Post subject: Reply with quote

Anyone else? Should I post the compiled Eboot for you all to test? :S

http://www.mediafire.com/?njqxeji3ztl Source + binaries
Back to top
View user's profile Send private message
daxtsu



Joined: 02 Aug 2008
Posts: 10

PostPosted: Fri Aug 08, 2008 12:36 pm    Post subject: Reply with quote

Well for whatever reason, that compiler the other guy posted was pumping out bad eboots, so I put together a Linux VM for myself with the toolchain installed and it runs now. So I'm happy.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Aug 08, 2008 2:21 pm    Post subject: Reply with quote

daxtsu wrote:
Well for whatever reason, that compiler the other guy posted was pumping out bad eboots, so I put together a Linux VM for myself with the toolchain installed and it runs now. So I'm happy.


That's the best way to do it on Windows as well. :D
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group