![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on PSP Toolchain on Gentoo Linux within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hellas friends! I would like to write some C code on my gent00 machine. There are several tutorials. I choose ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Hellas friends!
I would like to write some C code on my gent00 machine. There are several tutorials. I choose this one. Pretty easy I thought, but the toolchain script stopped giving this error msg: Code:
======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x48)[0x40124ec8] /lib/libc.so.6[0x40122f10] /lib/libc.so.6[0x40122598] /lib/libc.so.6(_IO_default_xsputn+0xa0)[0x400aad00] /lib/libc.so.6(_IO_padn+0xd0)[0x4009e210] /lib/libc.so.6(_IO_vfprintf+0x2827)[0x400811e7] /lib/libc.so.6(__vsprintf_chk+0xa7)[0x40122647] /lib/libc.so.6(__sprintf_chk+0x2d)[0x4012258d] psp-ar[0x805106d] psp-ar[0x804f18b] psp-ar[0x8051dc2] psp-ar[0x8059870] psp-ar[0x804b835] psp-ar[0x804c2e8] /lib/libc.so.6(__libc_start_main+0xe5)[0x40057725] psp-ar[0x8049691] ======= Memory map: ======== 08048000-080c3000 r-xp 00000000 08:06 3165949 /usr/local/pspdev/bin/psp-ar 080c3000-080c4000 r--p 0007a000 08:06 3165949 /usr/local/pspdev/bin/psp-ar 080c4000-080c5000 rw-p 0007b000 08:06 3165949 /usr/local/pspdev/bin/psp-ar 080c5000-08439000 rw-p 00000000 00:00 0 [heap] 40000000-4001c000 r-xp 00000000 08:06 1839590 /lib/ld-2.9.so 4001c000-4001d000 r--p 0001c000 08:06 1839590 /lib/ld-2.9.so 4001d000-4001e000 rw-p 0001d000 08:06 1839590 /lib/ld-2.9.so 4001e000-4001f000 r-xp 00000000 00:00 0 [vdso] 4001f000-40026000 r--s 00000000 08:06 2115670 /usr/lib/gconv/gconv-modules.cache 40026000-40030000 rw-p 00000000 00:00 0 40030000-4003c000 r-xp 00000000 08:06 1950820 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 4003c000-4003d000 r--p 0000b000 08:06 1950820 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 4003d000-4003e000 rw-p 0000c000 08:06 1950820 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 40040000-40041000 rw-p 00000000 00:00 0 40041000-4017e000 r-xp 00000000 08:06 1839096 /lib/libc-2.9.so 4017e000-40180000 r--p 0013d000 08:06 1839096 /lib/libc-2.9.so 40180000-40181000 rw-p 0013f000 08:06 1839096 /lib/libc-2.9.so 40181000-40185000 rw-p 00000000 00:00 0 40185000-4033f000 r--p 00000000 08:06 2101024 /usr/lib/locale/locale-archive bffda000-bfff1000 rw-p 00000000 00:00 0 [stack] make[3]: *** [libgcc.a] Abgebrochen make[3]: *** Datei »libgcc.a« wird gelöscht make[3]: *** Warte auf noch nicht beendete Prozesse... make[3]: Leaving directory `/usr/local/src/psptoolchain/build/gcc-4.1.0/build-psp/gcc' make[2]: *** [stmp-multilib] Fehler 2 make[2]: Leaving directory `/usr/local/src/psptoolchain/build/gcc-4.1.0/build-psp/gcc' make[1]: *** [all-gcc] Fehler 2 make[1]: Leaving directory `/usr/local/src/psptoolchain/build/gcc-4.1.0/build-psp' make: *** [all] Fehler 2 ../scripts/002-gcc-4.1.0-stage1.sh: Failed. But no1 seemed to have my problems. The stuff with the script in env.d does not work anyhow, I would place it into ~/.bashrc but the rest sounded logically. I am using Baselayout2 if this should matter. I rather intend there is missing something in my system. Some special dev- Ebuilds?? There are lots of Gentoo Freaks in here like mk2k. I hope to get help. Thanks in advance from your German friend Klaus
|
|
|
|
|
|
|
#2 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 30
Trader Feedback: 0
|
Oh, E17 ( or E16, at least E )
![]() Code:
wget http://www.calebgray.com/psp/development/psptoolchain-20070626.tar.bz2 wget http://www.calebgray.com/psp/development/pspsdk-20070626.tar.bz2 Code:
svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain svn co svn://svn.pspdev.org/psp/trunk/psplibraries I think nothing should be missing in your system, and you're probably not out-of-date :P Anyway the dependences on Debian are : Code:
build-essential autoconf automake bison flex libncurses5-dev libreadline-dev libusb-dev texinfo libmpfr-dev libgmp3-dev |
|
|
|
|
|
#3 |
|
Hi Kode!
This seems to work. Compiling went through. You gave me a svn command to obtain psplibraries, but this was not mentioned in the wiki. Do I need them, too? On the same svn method I am currently installing the sdk. You left this step out. I am a bit confused *G*. (Yes, it is e17 )
|
|
|
|
|
|
|
#5 | |
|
Quote:
For now it seemes to work. If my batterie is beeing rechared I will have a try with a new compiled PBP. Thanx so far! Later I will have a look for a newbie tut. I think I came along one in here .. |
||
|
|
|
|
|
#6 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 30
Trader Feedback: 0
|
If you want to create game, you can use the oslib mod, still maintained by Sakya : Subversion & Trac | OSLib mod | Assembla
And there are really easy to understand tutorials ( but you can easily guess they were orignally written in French :P ) there: day2 - OldSchool Library ( The first chapter is about the installation on Windows... ) For plugins, and other kind of applications, I guess there are not that much tutorials. You'll easily find how to compile a PRX, how to hook a function, ... but that's all. |
|
|
|
|
|
#7 |
|
Thanx again! I think the libraries are required .. just compiling them.
I rather wanna make some little apps. I never really learned C, but a little c++, basic, pascal, html, php and what came around. Just adopting code and learning by doing. Future will tell if I get along with it. |
|
|
|
|
|
|
#9 | |
|
Quote:
it can't find this lib ..locate doesn't either, though I installed theres psplibraries from svn source. Code:
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -D_PSP_FW_VERSION=150 -c -o main.o main.c main.c:6:25: Fehler: oslib/oslib.h: Datei oder Verzeichnis nicht gefunden |
||
|
|
|
|
|
#10 | |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 30
Trader Feedback: 0
|
The oslib isn't in the psplibraries pack : you have to install it manually.
Quote:
![]() It doesn't work only if it's compiled in kernel mode. I gave the oslib's SVN : Subversion & Trac | OSLib mod | Assembla Just copy manually oslib.a and the headers in the right folder. |
|
|
|
|
|
|
#11 | ||
|
Quote:
edit: oslib dirs & files are at there position, but make seems to search theme at a wrong position. psp-config Values are set correctly, environment variables, too. compiling samples delivered by sdk works. here an excerpt from the build log: Quote:
in home is only me, /home/poedel/pspsdk/.. and so on try to find out where to fix it. Do you know? Last edited by poedel; 11-06-2009 at 06:24 AM.. |
|||
|
|
|
|
|
#12 | |
![]() ![]() Enter Custom Title
|
Hi!
![]() Quote:
If you're using the OSLib MOD check the samples directory. oslibmod - Revision 46: /trunk/samples The makefile from the HelloWorld looks like this: Code:
TARGET = helloworld
OBJS = main.o
#To build for custom firmware:
BUILD_PRX = 1
PSP_FW_VERSION=371
CFLAGS = -O2 -g -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
MYLIBS=
STDLIBS= -losl -lpng -lz \
-lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspgum -lpspaudiolib -lpspaudio -lpsphttp -lpspssl -lpspwlan \
-lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lm -ljpeg
LIBS=$(STDLIBS) $(MYLIBS)
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
#PSP_EBOOT_ICON = ICON0.PNG
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
sakya
__________________
"And they're giving me a wonderful potion, 'Cos I cannot contain my emotion. And even though, I'm feeling good, Something tells me, I'd better activate my prayer capsule." Supper's Ready (Genesis) |
|
|
|
|
|
|
#13 |
|
Thanx Sakya!
I will try and do this this evening. But remember that someone startet writing this program and compiled it for me as is. With the same main.c && Makefile it does not work on my machine. Thus I rather intend something´s wrong with the settings. Someone (a config or whatever) must have told the compiler to search under /home/user/PSP/ ... for the libraries. IMHO I just should edit this config ..but where |
|
|
|
|
|
|
#15 | |
|
Quote:
Code:
poedel@poedel2duo ~ $ psp-config --pspsdk /usr/local/pspdev/psp/sdk poedel@poedel2duo ~ $ echo $PSPDEV /usr/local/pspdev |
||
|
|
|
|
|
#16 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 30
Trader Feedback: 0
|
Yeah, no problems there. The only problem is that there's an undefined reference, and, in that case, the compiler tell you where the function has been referencend to. It just knows where are the sources.
Didn't it work with Sakya's Makefile ? |
|
|
|
|
|
#17 | ||
![]() ![]() Enter Custom Title
|
Hi!
![]() Quote:
I added some reference to OSLib, is there -lpspgum in the makefile you're using? Quote:
![]() Ciaooo Sakya
__________________
"And they're giving me a wonderful potion, 'Cos I cannot contain my emotion. And even though, I'm feeling good, Something tells me, I'd better activate my prayer capsule." Supper's Ready (Genesis) |
||
|
|
|
|
|
#18 |
|
wow! unbelievable! it worked!
With the libs settings of the "hello world" makefile it works. Thanks, friend! Now I can start testing C ![]() Can I test the eboot directly on the laptop anyhow, or do I always have to test it on the psp? |
|
|
|
|
|
|
#19 |
|
Join Date: Aug 2009
Real First Name: Kilian
Location: Wherever
Just Played: A game.
Posts: 30
Trader Feedback: 0
|
You have to run the EBOOT on your PSP. You might get a code which compiles on both system ( with libraries like the SDL ), but nothing more. There's psplink which allows to run a PRX from your computer. If you want to use it, add BUILD_PRX = 1 in your makefile, and then run usbhostfs_pc ( root privileges are required for this on my system ), and pspsh. On your PSP, run the oe eboot ( installed $PSPDEV/psplink/psp/oe/ ). Finally, in a terminal run pspsh and type your prx's path. Notice you can run commands like
Code:
pspsh -e "my.prx"
|
|
|
|
![]() |
| Tags |
| gentoo , linux , psp , toolchain |
| Thread Tools | |
|
|