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,722
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,034
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,034
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
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion