Coding Question

  • Thread starter Thread starter godreborn
  • Start date Start date
  • Views Views 857
  • Replies Replies 7

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,464
Solutions
14
Reaction score
24,176
Trophies
3
XP
29,466
Country
United States
does anyone know what this means or better yet, how to correct?

error: conflicting types for ‘u32’; have ‘uint32_t’ {aka ‘long unsigned int’}
 
Try to declare the other as the (name) in front of the equal symbol or something?

Or rename them if you can?

There needs to be a bit more context to make sense here
this is the file causing it:

Code:
*
 * PSP Software Development Kit - https://github.com/pspdev
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * psptypes.h - Commonly used typedefs.
 *
 * Copyright (c) 2005 Marcus R. Brown <[email protected]>
 * Copyright (c) 2005 James Forshaw <[email protected]>
 * Copyright (c) 2005 John Kelley <[email protected]>
 *
 */
/* Note: Some of the structures, types, and definitions in this file were
   extrapolated from symbolic debugging information found in the Japanese
   version of Puzzle Bobble. */
#ifndef _PSPTYPES_H_
#define _PSPTYPES_H_ 1
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL    0
#else
#define NULL    ((void *) 0)
#endif /* __cplusplus */
#endif
/* Legacy ps2dev types. */
#ifndef PSP_LEGACY_TYPES_DEFINED
#define PSP_LEGACY_TYPES_DEFINED
typedef uint8_t             u8;
typedef uint16_t            u16;
typedef uint32_t            u32;
typedef uint64_t            u64;
typedef int8_t              s8;
typedef int16_t             s16;
typedef int32_t             s32;
typedef int64_t             s64;
#endif
#ifndef PSP_LEGACY_VOLATILE_TYPES_DEFINED
#define PSP_LEGACY_VOLATILE_TYPES_DEFINED
typedef volatile uint8_t        vu8;
typedef volatile uint16_t       vu16;
typedef volatile uint32_t       vu32;
typedef volatile uint64_t       vu64;
typedef volatile int8_t         vs8;
typedef volatile int16_t        vs16;
typedef volatile int32_t        vs32;
typedef volatile int64_t        vs64;
#endif
/* MIPS-like accessor macros. */
static __inline__ u8  _lb(u32 addr) { return *(vu8 *)addr; }
static __inline__ u16 _lh(u32 addr) { return *(vu16 *)addr; }
static __inline__ u32 _lw(u32 addr) { return *(vu32 *)addr; }
static __inline__ u64 _ld(u32 addr) { return *(vu64 *)addr; }
static __inline__ void _sb(u8 val, u32 addr) { *(vu8 *)addr = val; }
static __inline__ void _sh(u16 val, u32 addr) { *(vu16 *)addr = val; }
static __inline__ void _sw(u32 val, u32 addr) { *(vu32 *)addr = val; }
static __inline__ void _sd(u64 val, u32 addr) { *(vu64 *)addr = val; }
/* SCE types. */
typedef unsigned char SceUChar8;
typedef uint16_t SceUShort16;
typedef uint32_t SceUInt32;
typedef uint64_t SceUInt64;
typedef uint64_t SceULong64;
/*typedef unsigned int SceULong128 __attribute__((mode(TI)));*/
typedef char SceChar8;
typedef int16_t SceShort16;
typedef int32_t SceInt32;
typedef int64_t SceInt64;
typedef int64_t SceLong64;
/*typedef int SceLong128 __attribute__((mode(TI)));*/
typedef float SceFloat;
typedef float SceFloat32;
typedef short unsigned int SceWChar16;
typedef unsigned int SceWChar32;
typedef int SceBool;
typedef void SceVoid;
typedef void * ScePVoid;

/* PSP types. */
/* Rectangles. */
typedef struct ScePspSRect {
    short int   x;
    short int   y;
    short int   w;
    short int   h;
} ScePspSRect;
typedef struct ScePspIRect {
    int     x;
    int     y;
    int     w;
    int     h;
} ScePspIRect;
typedef struct ScePspL64Rect {
    SceLong64   x;
    SceLong64   y;
    SceLong64   w;
    SceLong64   h;
} ScePspL64Rect;
typedef struct ScePspFRect {
    float   x;
    float   y;
    float   w;
    float   h;
} ScePspFRect;
/* 2D vectors. */
typedef struct ScePspSVector2 {
    short int   x;
    short int   y;
} ScePspSVector2;
typedef struct ScePspIVector2 {
    int     x;
    int     y;
} ScePspIVector2;
typedef struct ScePspL64Vector2 {
    SceLong64   x;
    SceLong64   y;
} ScePspL64Vector2;
typedef struct ScePspFVector2 {
    float   x;
    float   y;
} ScePspFVector2;
typedef union ScePspVector2 {
    ScePspFVector2  fv;
    ScePspIVector2  iv;
    float           f[2];
    int             i[2];
} ScePspVector2;
/* 3D vectors. */
typedef struct ScePspSVector3 {
    short int   x;
    short int   y;
    short int   z;
} ScePspSVector3;
typedef struct ScePspIVector3 {
    int     x;
    int     y;
    int     z;
} ScePspIVector3;
typedef struct ScePspL64Vector3 {
    SceLong64   x;
    SceLong64   y;
    SceLong64   z;
} ScePspL64Vector3;
typedef struct ScePspFVector3 {
    float   x;
    float   y;
    float   z;
} ScePspFVector3;
typedef union ScePspVector3 {
    ScePspFVector3  fv;
    ScePspIVector3  iv;
    float           f[3];
    int             i[3];
} ScePspVector3;
/* 4D vectors. */
typedef struct ScePspSVector4 {
    short int   x;
    short int   y;
    short int   z;
    short int   w;
} ScePspSVector4;
typedef struct ScePspIVector4 {
    int     x;
    int     y;
    int     z;
    int     w;
} ScePspIVector4;
typedef struct ScePspL64Vector4 {
    SceLong64   x;
    SceLong64   y;
    SceLong64   z;
    SceLong64   w;
} ScePspL64Vector4;
typedef struct ScePspFVector4 {
    float   x;
    float   y;
    float   z;
    float   w;
} ScePspFVector4 __attribute__((aligned(16)));
typedef struct ScePspFVector4Unaligned {
    float   x;
    float   y;
    float   z;
    float   w;
} ScePspFVector4Unaligned;
typedef union ScePspVector4 {
    ScePspFVector4  fv;
    ScePspIVector4  iv;
/*  SceULong128     qw;*/   /* Missing compiler support. */
    float           f[4];
    int             i[4];
} ScePspVector4 __attribute__((aligned(16)));
/* 2D matrix types. */
typedef struct ScePspIMatrix2 {
    ScePspIVector2  x;
    ScePspIVector2  y;
} ScePspIMatrix2;
typedef struct ScePspFMatrix2 {
    ScePspFVector2  x;
    ScePspFVector2  y;
} ScePspFMatrix2;
typedef union ScePspMatrix2 {
    ScePspFMatrix2  fm;
    ScePspIMatrix2  im;
    ScePspFVector2  fv[2];
    ScePspIVector2  iv[2];
    ScePspVector2   v[2];
/*  SceULong128     qw[2];*/    /* Missing compiler support. */
    float           f[2][2];
    int             i[2][2];
} ScePspMatrix2;
/* 3D matrix types. */
typedef struct ScePspIMatrix3 {
    ScePspIVector3  x;
    ScePspIVector3  y;
    ScePspIVector3  z;
} ScePspIMatrix3;
typedef struct ScePspFMatrix3 {
    ScePspFVector3  x;
    ScePspFVector3  y;
    ScePspFVector3  z;
} ScePspFMatrix3;
typedef union ScePspMatrix3 {
    ScePspFMatrix3  fm;
    ScePspIMatrix3  im;
    ScePspFVector3  fv[3];
    ScePspIVector3  iv[3];
    ScePspVector3   v[3];
/*  SceULong128     qw[3];*/    /* Missing compiler support. */
    float           f[3][3];
    int             i[3][3];
} ScePspMatrix3;
/* 4D matrix types. */
typedef struct ScePspIMatrix4 {
    ScePspIVector4  x;
    ScePspIVector4  y;
    ScePspIVector4  z;
    ScePspIVector4  w;
} ScePspIMatrix4 __attribute__((aligned(16)));
typedef struct ScePspIMatrix4Unaligned {
    ScePspIVector4  x;
    ScePspIVector4  y;
    ScePspIVector4  z;
    ScePspIVector4  w;
} ScePspIMatrix4Unaligned;
typedef struct ScePspFMatrix4 {
    ScePspFVector4  x;
    ScePspFVector4  y;
    ScePspFVector4  z;
    ScePspFVector4  w;
} ScePspFMatrix4 __attribute__((aligned(16)));
typedef struct ScePspFMatrix4Unaligned {
    ScePspFVector4  x;
    ScePspFVector4  y;
    ScePspFVector4  z;
    ScePspFVector4  w;
} ScePspFMatrix4Unaligned;
typedef union ScePspMatrix4 {
    ScePspFMatrix4  fm;
    ScePspIMatrix4  im;
    ScePspFVector4  fv[4];
    ScePspIVector4  iv[4];
    ScePspVector4   v[4];
/*  SceULong128     qw[4];*/    /* Missing compiler support. */
    float           f[4][4];
    int             i[4][4];
} ScePspMatrix4;
/* Quaternions. */
typedef struct ScePspFQuaternion {
    float   x;
    float   y;
    float   z;
    float   w;
} ScePspFQuaternion __attribute__((aligned(16)));
typedef struct ScePspFQuaternionUnaligned {
    float   x;
    float   y;
    float   z;
    float   w;
} ScePspFQuaternionUnaligned;
/* Colors and pixel formats. */
typedef struct ScePspFColor {
    float   r;
    float   g;
    float   b;
    float   a;
} ScePspFColor __attribute__((aligned(16)));
typedef struct ScePspFColorUnaligned {
    float   r;
    float   g;
    float   b;
    float   a;
} ScePspFColorUnaligned;
typedef unsigned int ScePspRGBA8888;
typedef unsigned short ScePspRGBA4444;
typedef unsigned short ScePspRGBA5551;
typedef unsigned short ScePspRGB565;
/* Unions for converting between types. */
typedef union ScePspUnion32 {
    unsigned int    ui;
    int             i;
    unsigned short  us[2];
    short int       s[2];
    unsigned char   uc[4];
    char            c[4];
    float           f;
    ScePspRGBA8888  rgba8888;
    ScePspRGBA4444  rgba4444[2];
    ScePspRGBA5551  rgba5551[2];
    ScePspRGB565    rgb565[2];
} ScePspUnion32;
typedef union ScePspUnion64 {
    SceULong64      ul;
    SceLong64       l;
    unsigned int    ui[2];
    int             i[2];
    unsigned short  us[4];
    short int       s[4];
    unsigned char   uc[8];
    char            c[8];
    float           f[2];
    ScePspSRect     sr;
    ScePspSVector4  sv;
    ScePspRGBA8888  rgba8888[2];
    ScePspRGBA4444  rgba4444[4];
    ScePspRGBA5551  rgba5551[4];
    ScePspRGB565    rgb565[4];
} ScePspUnion64;
typedef union ScePspUnion128 {
/*  SceULong128     qw;*/   /* Missing compiler support. */
/*  SceULong128     uq;*/
/*  SceLong128  q;*/
    SceULong64      ul[2];
    SceLong64       l[2];
    unsigned int    ui[4];
    int             i[4];
    unsigned short  us[8];
    short int       s[8];
    unsigned char   uc[16];
    char            c[16];
    float           f[4];
    ScePspFRect     fr;
    ScePspIRect     ir;
    ScePspFVector4  fv;
    ScePspIVector4  iv;
    ScePspFQuaternion fq;
    ScePspFColor    fc;
    ScePspRGBA8888  rgba8888[4];
    ScePspRGBA4444  rgba4444[8];
    ScePspRGBA5551  rgba5551[8];
    ScePspRGB565    rgb565[8];
} ScePspUnion128 __attribute__((aligned(16)));
/* Date and time. */
typedef struct ScePspDateTime {
    unsigned short  year;
    unsigned short  month;
    unsigned short  day;
    unsigned short  hour;
    unsigned short  minute;
    unsigned short  second;
    unsigned int    microsecond;
} ScePspDateTime;
#ifdef __cplusplus
}
#endif
#endif /* _PSPTYPES_H_ */
 
I've had the same or a very similar error, not with the PSP but a 3DS homebrew I was trying to compile with devkitPro, I think it ended up being that I was using a different version of the SDK than the homebrew expected, that being said I never did get it to compile because I wasn't sure if that was the issue or the only issue and between trying to find the correct version of the SDK that the homebrew was made for, and potentially troubleshooting other errors as well, it just seemed more trouble than it was worth, so I couldn't be bothered to look any further.
I wish you luck, though.
 
I've had the same or a very similar error, not with the PSP but a 3DS homebrew I was trying to compile with devkitPro, I think it ended up being that I was using a different version of the SDK than the homebrew expected, that being said I never did get it to compile because I wasn't sure if that was the issue or the only issue and between trying to find the correct version of the SDK that the homebrew was made for, and potentially troubleshooting other errors as well, it just seemed more trouble than it was worth, so I couldn't be bothered to look any further.
I wish you luck, though.
yeah, that's usually what a coding error such as this means. I installed both psp toolchain and psp sdk. problem with this is that neither has releases, just code on the main page of each repo, so I don't know if there's any way to use an earlier version. my goal was to compile sm-64 port for the psp.
 
yeah, that's usually what a coding error such as this means. I installed both psp toolchain and psp sdk. problem with this is that neither has releases, just code on the main page of each repo, so I don't know if there's any way to use an earlier version. my goal was to compile sm-64 port for the psp.
You can check out a specific commit by its ID, and there's probably a way to download a zip of a specific commit on the Github website as well. Good luck finding the right one.
 
  • Like
Reactions: godreborn
You can check out a specific commit by its ID, and there's probably a way to download a zip of a specific commit on the Github website as well. Good luck finding the right one.
The problem seems to be with pspsdk, not the toolchain, at least that file is associated with it.
 
You can check out a specific commit by its ID, and there's probably a way to download a zip of a specific commit on the Github website as well. Good luck finding the right one.
I've opened an issue on github. I tried a few earlier commits, but I got the same error, then I tried one from 4 years ago, one around when sm64 was compiled, but then the sdk doesn't even compile, so damn frustrating.
 

Site & Scene News

Popular threads in this forum