i have been searching around in the forums for quite a while but i can not find a solution to my problem. I even can't find someone who had the exact same problem.
i am running gentoo linux and installed the psp toolchain (by first downloading it, updating it via svn and then compiling and installing it). I also installed the pspsdk (first i tried the binary version and then i checked it out from svn and compiled it)
So far so good
But if i try to compile for example the lines demo in the psp-sdk i get the following error
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -O2 -D_PSP_FW_VERSION=150 -c -o lines.o lines.c
In file included from /usr/local/pspdev/psp/sdk/include/pspuser.h:26,
from /usr/local/pspdev/psp/sdk/include/pspkernel.h:18,
from lines.c:9:
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: 'struct timezone' declared inside parameter list
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: 'struct timeval' declared inside parameter list
In file included from /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:65,
from lines.c:13:
/usr/local/pspdev/psp/sdk/include/sys/stdio.h:109: error: conflicting types for 'FILE'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:50: error: previous declaration of 'FILE' was here
In file included from lines.c:13:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:175: error: conflicting types for 'setbuf'
/usr/local/pspdev/psp/sdk/include/sys/stdio.h:152: error: previous declaration of 'setbuf' was here
In file included from lines.c:16:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/time.h:34: error: redefinition of 'struct tm'
make: *** [lines.o] Error 1
I get this error for most of the samples and also if i try to compile the zlib. But for example the controller demo compiles without this error.
I would be really happy if someone could give me a tip as my head already hurts from constant banging on the table :)
Last edited by mgschwan on Tue May 01, 2007 7:42 pm, edited 1 time in total.
In file included from /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:65,
from lines.c:13:
/usr/local/pspdev/psp/sdk/include/sys/stdio.h:109: error: conflicting types for 'FILE'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:50: error: previous declaration of 'FILE' was here
In file included from lines.c:13:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:175:
I'm not sure about the 'declared inside parameter list' error, but it sounds like your include paths aren't set up right.
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -v -G0 -Wall -O2 -D_PSP_FW_VERSION=150 -c -o lines.o lines.c
Using built-in specs.
Target: psp
Configured with: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0
Thread model: single
gcc version 4.0.2 (PSPDEV 20051022)
/usr/local/pspdev/libexec/gcc/psp/4.0.2/cc1 -quiet -v -I. -I/usr/local/pspdev/psp/sdk/include -DPSP=1 -D__psp__=1 -D_PSP=1 -D_PSP_FW_VERSION=150 lines.c -G0 -quiet -dumpbase lines.c -auxbase-strip lines
.o -O2 -Wall -version -o /tmp/ccmfkbnA.s
ignoring nonexistent directory "/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/sys-include"
#include "..." search starts here:
#include <...> search starts here:
.
/usr/local/pspdev/psp/sdk/include
/usr/local/pspdev/lib/gcc/psp/4.0.2/include
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include
End of search list.
GNU C version 4.0.2 (PSPDEV 20051022) (psp)
compiled by GNU C version 4.1.1 (Gentoo 4.1.1).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64372
In file included from /usr/local/pspdev/psp/sdk/include/pspuser.h:26,
from /usr/local/pspdev/psp/sdk/include/pspkernel.h:18,
from lines.c:9:
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: 'struct timezone' declared inside parameter list
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/local/pspdev/psp/sdk/include/psputils.h:48: warning: 'struct timeval' declared inside parameter list
In file included from /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:65,
from lines.c:13:
/usr/local/pspdev/psp/sdk/include/sys/stdio.h:109: error: conflicting types for 'FILE'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:50: error: previous declaration of 'FILE' was here
In file included from lines.c:13:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/stdio.h:175: error: conflicting types for 'setbuf'
/usr/local/pspdev/psp/sdk/include/sys/stdio.h:152: error: previous declaration of 'setbuf' was here
In file included from lines.c:16:
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include/time.h:34: error: redefinition of 'struct tm'
make: *** [lines.o] Error 1
Well i solved this Problem but i'm not really sure why i solved it.
I deleted the pspdev directory and installed it completely from scratch again (but now into my home directory and not into /usr/local) and i used the -a option with the toolchain command.