Need help in toolchain

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

Moderators: cheriff, TyRaNiD

Post Reply
AJ-829
Posts: 6
Joined: Sat Jul 26, 2008 5:47 pm

Need help in toolchain

Post by AJ-829 »

i was compiling the psptoolchain and i got this what does it mean and how do i fix it?

Help would be appreciated

Code: Select all

psp-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/libc/include -I../../src/base -I
../../src/kernel -I../../src/user -I../../src/debug    -g -O2 -G0 -Wall -DF_glue
_gettimeofday libcglue.c -c -o glue_gettimeofday.o
libcglue.c:45: error: conflicting types for 'gettimeofday'
/usr/local/pspdev/lib/gcc/psp/4.3.1/../../../../psp/include/sys/time.h:73: error
: previous declaration of 'gettimeofday' was here
make: *** [glue_gettimeofday.o] Error 1

Alexis@AJ-829-Dev ~/trunk/psptoolchain/build/pspsdk/src/libc
$

asphodeli
Posts: 20
Joined: Sun Jun 29, 2008 2:44 pm
Location: Singapore

Post by asphodeli »

Try commenting out the function in libcglue.c. On another note, latest svn broke compilation of my game engine (which previously was fine on psp-gcc 4.3.0), so I tried to go back to a previous revision, and still it failed, because the install script somehow will always download latest svn revision.
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

AJ-829, check if the declaration in time.h is the same ad in the libcglue.c lib!
It is probably different!
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I've reverted back libcglue.c to how it was before the recent patch.

Should work fine now.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

asphodeli: Can you elaborate on the specific problems you're having?
asphodeli
Posts: 20
Joined: Sun Jun 29, 2008 2:44 pm
Location: Singapore

Post by asphodeli »

Insert_witty_name wrote:I've reverted back libcglue.c to how it was before the recent patch.

Should work fine now.
Tried installing rev 2445, still no go.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
Insert_witty_name wrote:I've reverted back libcglue.c to how it was before the recent patch.
I tried to compile the toolchain today and I got the error reported by AJ-829.
I fixed it changing /usr/local/pspdev/psp/include/sys/time.h this way:

Code: Select all

//int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__tz));
Ciaooo
Sakya
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

I re-committed the patch for libcglue and performed a full install of the toolchain from scratch to test (revision 2446).

Worked fine for me.
asphodeli
Posts: 20
Joined: Sun Jun 29, 2008 2:44 pm
Location: Singapore

Post by asphodeli »

ooPo wrote:asphodeli: Can you elaborate on the specific problems you're having?
With a working rev 2446, error is as follows:

Using -Os:

Code: Select all

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -Os -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -Os -G0 -Wall -D_PSP_FW_VERSION=390 -I../../include -Izlib -Ijpeglib -Ilibpng /usr/local/pspdev/psp/sdk/include   -c -o CCameraSceneNode.o CCameraSceneNode.cpp
../../include/SViewFrustum.h: In constructor ‘engine::scene::SViewFrustum::SViewFrustum()’:
../../include/SViewFrustum.h:55: internal compiler error: in simplify_subreg, at simplify-rtx.c:4928
Please submit a full bug report,
with preprocessed source if appropriate.
See <http&#58;//gcc.gnu.org/bugs.html> for instructions.
make&#58; *** &#91;CCameraSceneNode.o&#93; Error 1
Using -O1

Code: Select all

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O1 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O1 -G0 -Wall -D_PSP_FW_VERSION=390 -I../../include -Izlib -Ijpeglib -Ilibpng /usr/local/pspdev/psp/sdk/include   -c -o CCameraSceneNode.o CCameraSceneNode.cpp
CCameraSceneNode.cpp&#58;303&#58; internal compiler error&#58; output_operand&#58; floating constant misused
Please submit a full bug report,
with preprocessed source if appropriate.
See <http&#58;//gcc.gnu.org/bugs.html> for instructions.
make&#58; *** &#91;CCameraSceneNode.o&#93; Error 1
Using -O2:

Code: Select all

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=390 -I../../include -Izlib -Ijpeglib -Ilibpng /usr/local/pspdev/psp/sdk/include   -c -o CCameraSceneNode.o CCameraSceneNode.cpp
CCameraSceneNode.cpp&#58; In constructor ‘engine&#58;&#58;scene&#58;&#58;CCameraSceneNode&#58;&#58;CCameraSceneNode&#40;engine&#58;&#58;scene&#58;&#58;ISceneNode*, engine&#58;&#58;scene&#58;&#58;ISceneManager*, engine&#58;&#58;s32, const engine&#58;&#58;core&#58;&#58;vector3df&, const engine&#58;&#58;core&#58;&#58;vector3df&&#41;’&#58;
CCameraSceneNode.cpp&#58;40&#58; internal compiler error&#58; in simplify_subreg, at simplify-rtx.c&#58;4928
Please submit a full bug report,
with preprocessed source if appropriate.
See <http&#58;//gcc.gnu.org/bugs.html> for instructions.
make&#58; *** &#91;CCameraSceneNode.o&#93; Error 1
Using -O3 (for some strange reason, it compiles more files than the other -O options):

Code: Select all

psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O3 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O3 -G0 -Wall -D_PSP_FW_VERSION=390 -I../../include -Izlib -Ijpeglib -Ilibpng /usr/local/pspdev/psp/sdk/include   -c -o CAttributes.o CAttributes.cpp
In file included from CAttributes.cpp&#58;6&#58;
CAttributeImpl.h&#58; In member function ‘virtual engine&#58;&#58;s32 engine&#58;&#58;io&#58;&#58;CUserPointerAttribute&#58;&#58;getInt&#40;&#41;’&#58;
CAttributeImpl.h&#58;1945&#58; warning&#58; dereferencing type-punned pointer will break strict-aliasing rules
CAttributeImpl.h&#58; In member function ‘virtual void engine&#58;&#58;io&#58;&#58;CUserPointerAttribute&#58;&#58;getString&#40;char*&#41;’&#58;
CAttributeImpl.h&#58;1955&#58; warning&#58; dereferencing type-punned pointer will break strict-aliasing rules
../../include/fast_atof.h&#58; In function ‘const char* engine&#58;&#58;core&#58;&#58;fast_atof_move&#40;const char*, engine&#58;&#58;f32&&#41;’&#58;
../../include/fast_atof.h&#58;157&#58; warning&#58; ‘afterDecimal’ may be used uninitialized in this function
CAttributes.cpp&#58; At global scope&#58;
CAttributes.cpp&#58;1552&#58; internal compiler error&#58; output_operand&#58; floating constant misused
Please submit a full bug report,
with preprocessed source if appropriate.
See <http&#58;//gcc.gnu.org/bugs.html> for instructions.
make&#58; *** &#91;CAttributes.o&#93; Error 1
alpher
Posts: 5
Joined: Mon Nov 17, 2008 4:44 pm

Post by alpher »

Insert_witty_name wrote:I re-committed the patch for libcglue and performed a full install of the toolchain from scratch to test (revision 2446).

Worked fine for me.

There is still error, now in the svn, the time.h says:
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
BUT libcglue.c :
int gettimeofday(struct timeval *tp, void *tzp)
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

That change on libcglue was to support the newlib 1.16 if you reverted it you must link against newlib 1.15
Post Reply