Toolchain compilation: gettimeofday problem

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

Moderators: cheriff, TyRaNiD

Post Reply
Aya
Posts: 4
Joined: Tue Nov 18, 2008 11:07 am

Toolchain compilation: gettimeofday problem

Post by Aya »

Hi,

I tried to compile the toolchain and after about 10-20mins of compiling I got this error:

Code: Select all

./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
alpher
Posts: 5
Joined: Mon Nov 17, 2008 4:44 pm

Post by alpher »

Aya
Posts: 4
Joined: Tue Nov 18, 2008 11:07 am

Post by Aya »

I've read this already, but it didn't helped me .. I have the newest svn-code, so this is already done:

Code: Select all

//int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz)); 
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__tz));
Aya
Aya
Posts: 4
Joined: Tue Nov 18, 2008 11:07 am

Post by Aya »

Does noone have any idea? :(
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

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!
Aya
Posts: 4
Joined: Tue Nov 18, 2008 11:07 am

Post by Aya »

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
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Ok, I've understand!
But I'm using a win32 like sdk, no need to compile it or something else, only click install!
Sorry...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Code: Select all

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.
Swissidle
Posts: 16
Joined: Thu Jan 29, 2009 12:37 am

Post by Swissidle »

@ooPo

what OS are u using?
<><><><><>>>NOOB<><><><><<>
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

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
Swissidle
Posts: 16
Joined: Thu Jan 29, 2009 12:37 am

Post by Swissidle »

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<><><><><<>
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

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
Swissidle
Posts: 16
Joined: Thu Jan 29, 2009 12:37 am

Post by Swissidle »

Code: Select all

&#91;root@ernesta psptoolchain&#93;# ./toolchain-sudo.sh
ls&#58; cannot access /usr/include/readline/readline.h&#58; No such file or directory
ERROR&#58; Install readline before continuing.
../depends/check-readline.sh&#58; Failed.
ERROR&#58; Could not run the toolchain script.
im now getting this error, compiling the latest psptoolchain.

any idea?? T.T

thanks Heimdall for replying
<><><><><>>>NOOB<><><><><<>
Post Reply