forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Toolchain compilation: gettimeofday problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Aya



Joined: 18 Nov 2008
Posts: 4

PostPosted: Tue Nov 18, 2008 11:10 am    Post subject: Toolchain compilation: gettimeofday problem Reply with quote

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
View user's profile Send private message
alpher



Joined: 17 Nov 2008
Posts: 5

PostPosted: Tue Nov 18, 2008 12:23 pm    Post subject: Reply with quote

See this:
http://forums.ps2dev.org/viewtopic.php?t=11249
Back to top
View user's profile Send private message
Aya



Joined: 18 Nov 2008
Posts: 4

PostPosted: Tue Nov 18, 2008 8:05 pm    Post subject: Reply with quote

alpher wrote:
See this:
http://forums.ps2dev.org/viewtopic.php?t=11249

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
View user's profile Send private message
Aya



Joined: 18 Nov 2008
Posts: 4

PostPosted: Thu Nov 20, 2008 12:20 am    Post subject: Reply with quote

Does noone have any idea? :(
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Thu Nov 20, 2008 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Aya



Joined: 18 Nov 2008
Posts: 4

PostPosted: Thu Nov 20, 2008 1:01 am    Post subject: Reply with quote

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
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Thu Nov 20, 2008 1:12 am    Post subject: Reply with quote

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
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Nov 20, 2008 3:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Swissidle



Joined: 29 Jan 2009
Posts: 16

PostPosted: Thu Jan 29, 2009 8:04 pm    Post subject: Reply with quote

@ooPo

what OS are u using?
_________________
<><><><><>>>NOOB<><><><><<>
Back to top
View user's profile Send private message Yahoo Messenger
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Thu Jan 29, 2009 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Swissidle



Joined: 29 Jan 2009
Posts: 16

PostPosted: Thu Jan 29, 2009 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Thu Jan 29, 2009 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Swissidle



Joined: 29 Jan 2009
Posts: 16

PostPosted: Thu Jan 29, 2009 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group