where and how get PSPGL

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

where and how get PSPGL

Post by FIF »

Hi,

I would like try OpenGL dev on my PSP and i found on this forum some informations about a lib PSPGL.I tried sceGu,sceGum but for porting my existing programs, it's not easy.

Where can i find this lib?
at http://www.goop.org/psp/gl/ ???

and if it's by svn way, can you explain me how get it? i'm not familiar with svn commands

thanks by advance

PS: sorry for my poor english
PS2: i use linux (gentoo) and i have svn install on my computer
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

Yes, you can download a .zip file of the current source of PSPGL from http://hg.goop.org/pspgl/jsgf?cmd=archi ... g;type=zip. You can compile and install it with the normal SDK tools.
choupette
Posts: 7
Joined: Wed Oct 12, 2005 7:46 pm

Post by choupette »

svn co svn://svn.pspdev.org/psp/trunk/pspgl/

allows to dowload it from, huh it's obvious.
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

The goop.org one is probably the one you want. The svn one has lots of bugs and pitfalls.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

Thanks a lot, i will try that this evening
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

I just try to port something and i have this error:

pm@fif ~/devPSP/pspgl/tawaGL $ make
g++ -c -o main.o main.cpp
g++ -c -o tawa.o tawa.cpp
g++ -c -o object.o object.cpp
g++ -c -o light.o light.cpp
g++ -c -o cam.o cam.cpp
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -o tawaGL
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/bin/ld: main.o: Relocations in generic ELF (EM: 3)
main.o: ne peut lire les symboles: File in wrong format
collect2: ld a retourné 1 code d'état d'exécution
make: *** [tawaGL] Erreur 1

What is wrong ?

Something to change into Makefile because my program is in C++?
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

it seems, it use g++ and not psp-g++

how change that ?
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

You need to change your makefile to set your compiler to psp-g++.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

ok, thanks for that

i have change the makefile like this:

Code: Select all

CC = psp-gcc
CCX = psp-g++
PSP_INSTALL = ../tools/psp-install
RM = rm -f

PSPPATH := $(shell psp-config --pspsdk-path)
PSPGL_LFLAGS = -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++
CFLAGS = -g -Wall -O2 -MD -I$(PSPPATH)/include -I..
LFLAGS = -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L$(PSPPATH)/lib -L.. $(PSPGL_LFLAGS)

TARGET = tawaGL
OBJS = main.o tawa.o object.o light.o cam.o

BUILDDATE = $(shell date "+%Y/%m/%d %k:%M:%S")

PSPSDK=$(shell psp-config --pspsdk-path)


all: $(TARGET)


.c.o:
	$&#40;CC&#41; $&#40;CFLAGS&#41; -c $<
.cpp.o&#58;
	$&#40;CCX&#41; $&#40;CFLAGS&#41; -c $<

$&#40;TARGET&#41;&#58; $&#40;OBJS&#41;
	$&#40;CC&#41; $&#40;OBJS&#41; $&#40;LFLAGS&#41; -o $@

install&#58; all
	$&#40;PSP_INSTALL&#41; $&#40;TARGET&#41; --eboot-title="$&#40;TARGET&#41; $&#40;BUILDDATE&#41;" --eboot-icon="ICON.PNG"

clean&#58;
	$&#40;RM&#41; *.d *.o $&#40;TARGET&#41; 

-include $&#40;wildcard *.d&#41; dummy
but now, i have many errors now:

Code: Select all

pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -o tawaGL
main.o&#58; dans la fonction « init »&#58;
/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;104&#58; référence indéfinie vers « __psp_log&#40;char const*, ...&#41;»
/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;103&#58; référence indéfinie vers « __psp_log&#40;char const*, ...&#41;»
/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;102&#58; référence indéfinie vers « __psp_log&#40;char const*, ...&#41;»
/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;101&#58; référence indéfinie vers « __psp_log&#40;char const*, ...&#41;»
/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;100&#58; référence indéfinie vers « __psp_log&#40;char const*, ...&#41;»
main.o&#58;/home/pm/devPSP/pspgl/tawaGL/main.cpp&#58;214&#58; encore plus de références indéfinies suivent vers « __psp_log&#40;char const*, ...&#41;»
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;91&#58; référence indéfinie vers « glCallList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;103&#58; référence indéfinie vers « glNewList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; référence indéfinie vers « glEndList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; référence indéfinie vers « glEndList »
../libGL.a&#40;glMaterial.o&#41;&#58; dans la fonction « glMaterialf »&#58;
/tmp/pspdev/pspsdk/pspgl/glMaterial.c&#58;36&#58; référence indéfinie vers « glGetMaterialfv »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;70&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;70&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;71&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;73&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; référence indéfinie vers « fputc »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_identifier »&#58;
cp-demangle.c&#58;&#40;.text+0x1538&#41;&#58; référence indéfinie vers « memcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_expression »&#58;
cp-demangle.c&#58;&#40;.text+0x3324&#41;&#58; référence indéfinie vers « strcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_demangle »&#58;
cp-demangle.c&#58;&#40;.text+0x8fd8&#41;&#58; référence indéfinie vers « strncmp »
cp-demangle.c&#58;&#40;.text+0x9268&#41;&#58; référence indéfinie vers « strcat »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « __cxa_demangle »&#58;
cp-demangle.c&#58;&#40;.text+0x95d4&#41;&#58; référence indéfinie vers « strcpy »
collect2&#58; ld a retourné 1 code d'état d'exécution
make&#58; *** &#91;tawaGL&#93; Erreur 1
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

i fixed errors "undefine reference to __psp_log(char const*, ...) into main.cpp

i have change

Code: Select all

extern void __psp_log &#40;const char *fmt, ...&#41;;
by

Code: Select all

extern "C" void __psp_log &#40;const char *fmt, ...&#41;;
but for others ?
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

Code: Select all

object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;91&#58; référence indéfinie vers « glCallList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;103&#58; référence indéfinie vers « glNewList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; référence indéfinie vers « glEndList »
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; référence indéfinie vers « glEndList »
PSPGL doesn't support display lists at the moment. It may not ever; they're pretty complex to implement, and OpenGL/ES (which is the basis of PSPGL) doesn't have them.

Code: Select all

../libGL.a&#40;glMaterial.o&#41;&#58; dans la fonction « glMaterialf »&#58;
/tmp/pspdev/pspsdk/pspgl/glMaterial.c&#58;36&#58; référence indéfinie vers « glGetMaterialfv »
GetMaterial isn't done yet. A lot of the glGet* functions are missing or incomplete.

Code: Select all

/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;69&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;70&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;70&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;71&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;73&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;74&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;51&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;95&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;87&#58; référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;88&#58; référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; relocalisation tronquée pour concorder&#58; R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;vterminate.o&#41;&#58;../../../../libstdc++-v3/libsupc++/vterminate.cc&#58;89&#58; référence indéfinie vers « fputc »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_identifier »&#58;
cp-demangle.c&#58;&#40;.text+0x1538&#41;&#58; référence indéfinie vers « memcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_expression »&#58;
cp-demangle.c&#58;&#40;.text+0x3324&#41;&#58; référence indéfinie vers « strcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « d_demangle »&#58;
cp-demangle.c&#58;&#40;.text+0x8fd8&#41;&#58; référence indéfinie vers « strncmp »
cp-demangle.c&#58;&#40;.text+0x9268&#41;&#58; référence indéfinie vers « strcat »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a&#40;cp-demangle.o&#41;&#58; dans la fonction « __cxa_demangle »&#58;
cp-demangle.c&#58;&#40;.text+0x95d4&#41;&#58; référence indéfinie vers « strcpy »
collect2&#58; ld a retourné 1 code d'état d'exécution
make&#58; *** &#91;tawaGL&#93; Erreur 1
This all looks like newlibc stuff. Um, I'll need to check what the right link line is for this. Try putting "-lc" somewhere early in the -l list on the link line.

What is this program? Are you writing it from scratch, or porting it from some other platform?

Also, it might be helpful if you switch to an English locale when posting error messages. My French is good enough to guess at what errors you're getting, but English would be easier.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

ok, i will try to think to change my locale before posting errors ;)

This program is as port from my first and only one OpenGL experience under linux.


now (after adding -lc)

Code: Select all

pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -lc -o tawaGL
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;91&#58; undefined reference to `glCallList'
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;103&#58; undefined reference to `glNewList'
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; undefined reference to `glEndList'
object.o&#58;/home/pm/devPSP/pspgl/tawaGL/object.cpp&#58;139&#58; undefined reference to `glEndList'
../libGL.a&#40;glMaterial.o&#41;&#58; In function `glMaterialf'&#58;
/tmp/pspdev/pspsdk/pspgl/glMaterial.c&#58;36&#58; undefined reference to `glGetMaterialfv'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a&#40;chdir.o&#41;&#58; In function `chdir'&#58;
../../../../../../newlib/libc/sys/psp/libcglue.c&#58;77&#58; undefined reference to `sceIoDopen'
../../../../../../newlib/libc/sys/psp/libcglue.c&#58;82&#58; undefined reference to `sceIoDclose'
../../../../../../newlib/libc/sys/psp/libcglue.c&#58;84&#58; undefined reference to `sceIoChdir'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a&#40;_lseek.o&#41;&#58; In function `_lseek'&#58;
../../../../../../newlib/libc/sys/psp/libcglue.c&#58;227&#58; undefined reference to `sceIoLseek'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a&#40;_stat.o&#41;&#58; In function `_stat'&#58;
../../../../../../newlib/libc/sys/psp/libcglue.c&#58;487&#58; undefined reference to `sceIoGetstat'
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;tawaGL&#93; Error 1
ok for gl*List errors, i will try to change that later, but for the others errors, it miss an other lib ?
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

FIF wrote:

Code: Select all

pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -lc -o tawaGL
Put -lc earlier in the line; the order matters. The sceIo* functions are in -lpspuser, and so it needs to be after -lc to satisfy its dependencies.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

like that it's good now

Code: Select all

pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lstdc++ -lc -lpspuser -lpspkernel -o tawaGL
Thank you very much for all the time you spend with me.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

I pass to compile my app, but it crash:

Code: Select all

Exception - Bus error &#40;data&#41;
EPC - 08909280
Cause - 0000001C
STATUS - 60008613
BadVAddr - 0402EDD8
zr ..............
..........
What can i do with that ? how interpret this data ?
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

First thing is to find out what function actually caused the crash. Use

Code: Select all

psp-nm -n <your executable>
to get a list of symbols for your program. The address 08909280 will (with luck) be in one of them. Then you need to work out which memory reference actually caused the fault.

The fault address is 0402EDD8, which interesting because it's near (in?) VRAM rather than system memory. I'm not sure what that means.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

Code: Select all

0000000008909270 T fread
Into my program, i load vertices,polygons,normals and materials from files.

Code: Select all

// LECTURE DES VERTEX
	sprintf&#40;FileName,"/OBJECT/%s.vtx",NomFichiers&#41;;
	fIn=fopen&#40;FileName,"rb"&#41;;
	fread&#40;&gliNbVertex,1,sizeof&#40;GLint&#41;,fIn&#41;;
        glfVertex=&#40;GLfloat*&#41;malloc&#40;3*gliNbVertex*sizeof&#40;GLfloat&#41;&#41;;
	glfTmp=glfVertex;
	for&#40;gliCpt=0;gliCpt<gliNbVertex*3;gliCpt++&#41;
		fread&#40;glfTmp++,1,sizeof&#40;GLfloat&#41;,fIn&#41;;
	fclose&#40;fIn&#41;;

Can i use fopen,fread,fclose functions ? or i must change by sceIoOpen... ?

Can i open a file with lowercase filename?
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

i'm very stupid, i forgot to put ms0: into my filenames :D

now, it run, but i don't see anything on screen ???
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

My general approach is to make the program also compilable/runnable on my desktop machine, and get it basically working there. Once you're happy, then compile/run it for the PSP.

Obviously you'll need a couple of changes, but you should be able to get it mostly the same. That's one of the reasons I'm working on PSPGL: so that a lot of the basic stuff can be done in a friendlier environment.

There are many ways in which you can end up with a blank screen. Look at:
  1. transforms (projection and modelview)
  2. depth tests
  3. other tests
It's quite possible there's a bug in PSPGL, but I'd verify that your program does something sensible on a desktop before jumping to conclusions.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

i done modifications on my linux version before, see the result, and integrate them into psp version

I have change the clearcolor to blue, and i can see my Tawa (my character) on screen but it's all black. On my linux version without glGetMaterialfv, i can see my character in grayscale. I suppose it's a light problem.
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

What kind of lighting are you using? Are your normals set up right.

How are you drawing? With vertex arrays or begin/end?
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

I use spotligth, glBegin/glEnd method, normals are set up

I can send you my job if you PM my your email address.
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

I got it working, but make sure you're using the goop.org PSPGL; the SVN one has very incomplete lighting support.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

exactly, at home i have svn version

but here at work, i have http://www.goop.org/psp/gl version but it crash. I can't explore more here, i will see that this evening.

thanks for your PM ;)
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c

And compiling test-glut give me:

Code: Select all

pm@power64 ~/devPSP/pspgl-jsgf-b084ece3a4a6 $ make -C test-glut
make&#58; Entering directory `/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut'
psp-gcc simple.o -g -Wall -O2 -DMODULE_NAME="test-glut" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -o glut-simple
simple.o&#58; In function `reshape'&#58;
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;35&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;34&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;33&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;32&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;31&#58; undefined reference to `__psp_log'
simple.o&#58;/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;30&#58; more undefined references to `__psp_log' follow
../libGL.a&#40;pspgl_dlist.o&#41;&#58; In function `now'&#58;
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h&#58;233&#58; undefined reference to `sceRtcGetCurrentTick'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h&#58;233&#58; undefined reference to `sceRtcGetCurrentTick'
../libGL.a&#40;pspgl_vidmem.o&#41;&#58; In function `now'&#58;
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h&#58;233&#58; undefined reference to `sceRtcGetCurrentTick'
../libGL.a&#40;pspgl_vidmem.o&#41;&#58; In function `__pspgl_vidmem_setup_write_and_display_buffer'&#58;
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h&#58;233&#58; undefined reference to `sceRtcGetCurrentTick'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h&#58;233&#58; undefined reference to `sceRtcGetCurrentTick'
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;glut-simple&#93; Error 1
make&#58; Leaving directory `/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut'
After add -lpsprtc into the makefile:

Code: Select all

pm@power64 ~/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut $ make
psp-gcc simple.o -g -Wall -O2 -DMODULE_NAME="test-glut" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lpsprtc -o glut-simple
simple.o&#58; In function `reshape'&#58;
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;35&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;34&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;33&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;32&#58; undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;31&#58; undefined reference to `__psp_log'
simple.o&#58;/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;30&#58; more undefined references to `__psp_log' follow
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;glut-simple&#93; Error 1
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

FIF wrote:i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c
Hm, have to look into that.

Code: Select all

/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c&#58;35&#58; undefined reference to `__psp_log'
This got renamed to __pspgl_log (all private symbols start with __pspgl_).

I want to remove the dependence on -lpsprtc, but it hasn't been a priority so far.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

after fix all compiling problems with pspgl-jsgf-b084ece3a4a6 version, the test-glut isn't showing the rotating triangle on psp screen, can you take a look to that ?
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

Hm, I think test-glut must have been broken for a while. It was drawing outside the front and back clipping planes, so its not too surprising nothing appeared (though it does on other GLs, so I'm not quite sure how this is supposed to work...). The other tests should work fine, including your program.

Anyway, that's fixed, along with the other missing files you reported.
FIF
Posts: 20
Joined: Fri Sep 30, 2005 5:25 am
Location: France

Post by FIF »

I'm not at home now, i can't try others tests.
But with my program i have surprising result. I done the modification you explain me, but the result it's the same than no modification. Can you send me the elf (or eboot) you have compil ?
Post Reply