Homebrew Problem setting up CTRULIB

xXDungeon_CrawlerXx

Well-Known Member
OP
Member
Joined
Jul 29, 2015
Messages
2,098
Trophies
1
Age
27
Location
Liverpool
XP
3,528
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,033
Trophies
1
XP
2,622
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,033
Trophies
1
XP
2,622
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • JuanMena @ JuanMena:
    Will you give me mouth to mouth oxygen if my throat closes?
  • K3N1 @ K3N1:
    Nah the air can do that
  • K3N1 @ K3N1:
    Ask @x65943 he's trained for that stuff
  • JuanMena @ JuanMena:
    Kissing random dudes choking in celery? Really? Need to study for that?
  • K3N1 @ K3N1:
    Yes it requires a degree
  • K3N1 @ K3N1:
    I could also yank out the rest of my teeth but theirs professionals for that
  • x65943 @ x65943:
    If your throat closes, putting oxygen in your mouth will not solve anything - as you will be introducing oxygen prior to the area of obstruction
  • JuanMena @ JuanMena:
    Just kiss me Kyle.
  • x65943 @ x65943:
    You either need to be intubated to bypass obstruction or create a stoma inferior to the the area of obstruction to survive
  • x65943 @ x65943:
    "Just kiss me Kyle." And I thought all the godreborn gay stuff was a smear campaign
  • JuanMena @ JuanMena:
    If I die, tell my momma I won't be carrying Baby Jesus this christmas :sad::cry:
  • K3N1 @ K3N1:
    Smear campaigns are in The political section now?
  • JuanMena @ JuanMena:
    Chary! Chary! Chary, Chary, Chary!
  • Sonic Angel Knight @ Sonic Angel Knight:
    Pork Provolone :P
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds yummy
  • K3N1 @ K3N1:
    Sweet found my Wii u PSU right after I ordered a new one :tpi:
  • JuanMena @ JuanMena:
    It was waiting for you to order another one.
    Seems like, your PSU was waiting for a partner.
  • JuanMena @ JuanMena:
    Keep them both
    separated or you'll have more PSUs each year.
  • K3N1 @ K3N1:
    Well one you insert one PSU into the other one you get power
  • JuanMena @ JuanMena:
    It literally turns it on.
  • K3N1 @ K3N1:
    Yeah power supplies are filthy perverts
  • K3N1 @ K3N1:
    @Psionic Roshambo has a new friend
    +1
  • JuanMena @ JuanMena:
    It's Kyle, the guy that went to school to be a Certified man Kisser.
  • Psionic Roshambo @ Psionic Roshambo:
    Cartmans hand has taco flavored kisses
  • A @ abraarukuk:
    hi guys
    A @ abraarukuk: hi guys