| View previous topic :: View next topic |
| Author |
Message |
Aya
Joined: 18 Nov 2008 Posts: 4
|
Posted: Tue Nov 18, 2008 11:10 am Post subject: Toolchain compilation: gettimeofday problem |
|
|
Hi,
I tried to compile the toolchain and after about 10-20mins of compiling I got this error:
| Code: | ./src/user -I../../src/debug -g -O2 -G0 -Wall -DF_glue_gettimeofday libcglue.c -c -o glue_gettimeofday.o
libcglue.c:46: error: conflicting types for 'gettimeofday'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/include/sys/time.h:73: error: previous declaration of 'gettimeofday' was here
make[3]: *** [glue_gettimeofday.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
../scripts/006-pspsdk-stage2.sh: Failed. |
I already googl'ed around, but wasn't able to find anything helpful...
Can someone tell me what I have to do to get around this error?
Thanks!
Aya |
|
| Back to top |
|
 |
alpher
Joined: 17 Nov 2008 Posts: 5
|
|
| Back to top |
|
 |
Aya
Joined: 18 Nov 2008 Posts: 4
|
Posted: Tue Nov 18, 2008 8:05 pm Post subject: |
|
|
I've read this already, but it didn't helped me .. I have the newest svn-code, so this is already done:
| Code: | //int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__tz)); |
Aya |
|
| Back to top |
|
 |
Aya
Joined: 18 Nov 2008 Posts: 4
|
Posted: Thu Nov 20, 2008 12:20 am Post subject: |
|
|
| Does noone have any idea? :( |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Thu Nov 20, 2008 12:50 am Post subject: |
|
|
Look at the function prototype in libcglue.c and time.h!
If the functions is different the name have to be different, in this case try to change to function name!
But maybe can be the same functions with different prototypes, get the correct prototype and correct it! |
|
| Back to top |
|
 |
Aya
Joined: 18 Nov 2008 Posts: 4
|
Posted: Thu Nov 20, 2008 1:01 am Post subject: |
|
|
| ne0h wrote: | Look at the function prototype in libcglue.c and time.h!
If the functions is different the name have to be different, in this case try to change to function name!
But maybe can be the same functions with different prototypes, get the correct prototype and correct it! |
I know what the problem is and how I'd solve it if it would be my own code...
but since this code takes about 20minutes to compile before I get the error I'm not a big fan of trial and error here.
And also, if I simply rename this function I'm pretty sure I'll get a lot of other errors because this function is used somewhere else..
And last but not least, since this is the current SVN version and I am sure many people are working with this, this must be somehow a known problem.. or not?
Aya |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Thu Nov 20, 2008 1:12 am Post subject: |
|
|
Ok, I've understand!
But I'm using a win32 like sdk, no need to compile it or something else, only click install!
Sorry... |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Nov 20, 2008 3:39 am Post subject: |
|
|
| Code: | svn checkout svn://svn.ps2dev.org/psp/trunk/psptoolchain
cd psptoolchain
sudo ./toolchain-sudo.sh |
A fresh checkout of psptoolchain from the repository builds fine for me. |
|
| Back to top |
|
 |
Swissidle
Joined: 29 Jan 2009 Posts: 16
|
Posted: Thu Jan 29, 2009 8:04 pm Post subject: |
|
|
@ooPo
what OS are u using? _________________ <><><><><>>>NOOB<><><><><<> |
|
| Back to top |
|
 |
Heimdall
Joined: 10 Nov 2005 Posts: 259 Location: Netherlands
|
Posted: Thu Jan 29, 2009 8:21 pm Post subject: |
|
|
| Uninstall other pspdev or remove from the path before running the install script, most likely you have an old sdk installed with newlib 1.15 which contain a different time.h and your cross compilation script is using that as cache instead of relying on the new newlib 1.16 time.h |
|
| Back to top |
|
 |
Swissidle
Joined: 29 Jan 2009 Posts: 16
|
Posted: Thu Jan 29, 2009 8:28 pm Post subject: |
|
|
ok im gonna remove all the psp component sh1ts and ill try it over again.
your talking about newlib 1.16 is there a way i can check what version of newlib im using sory im newbie in this kind of thing. _________________ <><><><><>>>NOOB<><><><><<> |
|
| Back to top |
|
 |
Heimdall
Joined: 10 Nov 2005 Posts: 259 Location: Netherlands
|
Posted: Thu Jan 29, 2009 8:34 pm Post subject: |
|
|
| look into the downloads the toolchain script does, there should be a file named: newlib-1.16.tar.gz exploded into a directory named newlib-1.16 if you have both a file and directory named newlib 1.15 then there is a problem, it shouldn't be there |
|
| Back to top |
|
 |
Swissidle
Joined: 29 Jan 2009 Posts: 16
|
Posted: Thu Jan 29, 2009 8:41 pm Post subject: |
|
|
| Code: | [root@ernesta psptoolchain]# ./toolchain-sudo.sh
ls: cannot access /usr/include/readline/readline.h: No such file or directory
ERROR: Install readline before continuing.
../depends/check-readline.sh: Failed.
ERROR: Could not run the toolchain script.
|
im now getting this error, compiling the latest psptoolchain.
any idea?? T.T
thanks Heimdall for replying _________________ <><><><><>>>NOOB<><><><><<> |
|
| Back to top |
|
 |
|