Homebrew Problem setting up CTRULIB

xXDungeon_CrawlerXx

Well-Known Member
OP
Member
Joined
Jul 29, 2015
Messages
2,092
Trophies
1
Age
28
Location
Liverpool
XP
3,721
Country
Hey Guys,

I wanted to compile the newest ctrulib but I got some errors while compiling with "make".
Code:
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Init':
c:/devkitPro/libctru/source/synchronization.c:27:11: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:28:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  while (__strex(lock, 1));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:37:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:41:16: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  if (__strex(lock, val-1))
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c:51:19: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:58:21: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -(val-1)));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c:61:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:69:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:75:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:83:18: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = -__ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:84:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  while (__strex(lock, val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Init':
c:/devkitPro/libctru/source/synchronization.c:93:22: error: request for member 'lock' in something not a structure or union
  LightLock_Init(&lock->lock);
  ^
c:/devkitPro/libctru/source/synchronization.c:94:6: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c:95:6: error: request for member 'counter' in something not a structure or union
  lock->counter = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:101:10: error: request for member 'thread_tag' in something not a structure or union
  if (lock->thread_tag != tag)
  ^
c:/devkitPro/libctru/source/synchronization.c:103:23: error: request for member 'lock' in something not a structure or union
  LightLock_Lock(&lock->lock);
  ^
c:/devkitPro/libctru/source/synchronization.c:104:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = tag;
  ^
c:/devkitPro/libctru/source/synchronization.c:106:6: error: request for member 'counter' in something not a structure or union
  lock->counter ++;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:112:10: error: request for member 'thread_tag' in something not a structure or union
  if (lock->thread_tag != tag)
  ^
c:/devkitPro/libctru/source/synchronization.c:114:30: error: request for member 'lock' in something not a structure or union
  if (LightLock_TryLock(&lock->lock))
  ^
c:/devkitPro/libctru/source/synchronization.c:116:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = tag;
  ^
c:/devkitPro/libctru/source/synchronization.c:118:6: error: request for member 'counter' in something not a structure or union
  lock->counter ++;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:124:13: error: request for member 'counter' in something not a structure or union
  if (!--lock->counter)
  ^
c:/devkitPro/libctru/source/synchronization.c:126:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c:127:25: error: request for member 'lock' in something not a structure or union
  LightLock_Unlock(&lock->lock);
  ^
cc1.exe: all warnings being treated as errors
make[1]: *** [synchronization.o] Error 1
make: *** [build] Error 2
how can I fix this?
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,032
Country
United States
Hey Guys,

I wanted to compile the newest ctrulib but I got some errors while compiling with "make".
Code:
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Init':
c:/devkitPro/libctru/source/synchronization.c:27:11: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:28:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  while (__strex(lock, 1));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:37:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:41:16: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  if (__strex(lock, val-1))
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c:51:19: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:58:21: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -(val-1)));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c:61:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:69:17: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = __ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:75:19: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  } while (__strex(lock, -val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'LightLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:83:18: error: passing argument 1 of '__ldrex' from incompatible pointer type [-Werror]
  val = -__ldrex(lock);
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:31:19: note: expected 's32 *' but argument is of type 'LightLock *'
static inline s32 __ldrex(s32* addr)
  ^
c:/devkitPro/libctru/source/synchronization.c:84:17: error: passing argument 1 of '__strex' from incompatible pointer type [-Werror]
  while (__strex(lock, val));
  ^
In file included from c:/devkitPro/libctru/source/synchronization.c:4:0:
c:/devkitPro/libctru/include/3ds/synchronization.h:44:20: note: expected 's32 *' but argument is of type 'LightLock *'
static inline bool __strex(s32* addr, s32 val)
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Init':
c:/devkitPro/libctru/source/synchronization.c:93:22: error: request for member 'lock' in something not a structure or union
  LightLock_Init(&lock->lock);
  ^
c:/devkitPro/libctru/source/synchronization.c:94:6: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c:95:6: error: request for member 'counter' in something not a structure or union
  lock->counter = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Lock':
c:/devkitPro/libctru/source/synchronization.c:101:10: error: request for member 'thread_tag' in something not a structure or union
  if (lock->thread_tag != tag)
  ^
c:/devkitPro/libctru/source/synchronization.c:103:23: error: request for member 'lock' in something not a structure or union
  LightLock_Lock(&lock->lock);
  ^
c:/devkitPro/libctru/source/synchronization.c:104:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = tag;
  ^
c:/devkitPro/libctru/source/synchronization.c:106:6: error: request for member 'counter' in something not a structure or union
  lock->counter ++;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_TryLock':
c:/devkitPro/libctru/source/synchronization.c:112:10: error: request for member 'thread_tag' in something not a structure or union
  if (lock->thread_tag != tag)
  ^
c:/devkitPro/libctru/source/synchronization.c:114:30: error: request for member 'lock' in something not a structure or union
  if (LightLock_TryLock(&lock->lock))
  ^
c:/devkitPro/libctru/source/synchronization.c:116:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = tag;
  ^
c:/devkitPro/libctru/source/synchronization.c:118:6: error: request for member 'counter' in something not a structure or union
  lock->counter ++;
  ^
c:/devkitPro/libctru/source/synchronization.c: In function 'RecursiveLock_Unlock':
c:/devkitPro/libctru/source/synchronization.c:124:13: error: request for member 'counter' in something not a structure or union
  if (!--lock->counter)
  ^
c:/devkitPro/libctru/source/synchronization.c:126:7: error: request for member 'thread_tag' in something not a structure or union
  lock->thread_tag = 0;
  ^
c:/devkitPro/libctru/source/synchronization.c:127:25: error: request for member 'lock' in something not a structure or union
  LightLock_Unlock(&lock->lock);
  ^
cc1.exe: all warnings being treated as errors
make[1]: *** [synchronization.o] Error 1
make: *** [build] Error 2
how can I fix this?
You need to compile this with devkitarm toolchains.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,032
Country
United States
well, just needed to update the package, too.
Thank you.
Other question. The Tutorial I use told me to get ctr_homebrew.ld from 3DSGuy's Github.
His Github doesn't exist anymore. Where can I get this thing?
I am guessing it was removed because it was outdated. personally I use the 3ds examples from devkitpro and the source code from other current 3ds projects (ones that are actively being developed). Tutorials for a platform that is still be reversed tend to get out of date.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @salazarcosplay, yes