Undefinied reference __locale_ctype_ptr linker error with latest Devkit update

Post Reply
WerWolv
Posts: 1
Joined: Sat Mar 30, 2019 2:59 pm

Undefinied reference __locale_ctype_ptr linker error with latest Devkit update

Post by WerWolv » Sat Mar 30, 2019 3:04 pm

Hi

I updated to the latest devkitA64 and libnx2.1.0 yesterday and it caused basically all my builds to completely fail. I managed to get most of it back up again but now I'm stuck with this weird linker error:

Code: Select all

linking EdiZon.elf
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: C:/devkitPro/libnx/lib\libnx.a(argv.o): in function `argvSetup':
D:/Development/SwitchHomebrew/libnx/nx/source/runtime/argv.c:115: undefined reference to `__locale_ctype_ptr'
c:/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld.exe: D:/Development/SwitchHomebrew/libnx/nx/source/runtime/argv.c:97: undefined reference to `__locale_ctype_ptr'
collect2.exe: error: ld returned 1 exit status
The lines it points to don't make a lot of sense really either...
I hope somebody can point out the problem here :)

User avatar
fincs
( ͡° ͜ʖ ͡°)
Posts: 55
Joined: Mon Jul 12, 2010 9:45 pm
Location: Seville, Spain
Contact:

Re: Undefinied reference __locale_ctype_ptr linker error with latest Devkit update

Post by fincs » Sat Mar 30, 2019 5:38 pm

At some point in the past, it looks like you have tried compiling and installing libnx from git, which overwrote the one from pacman. When you tried upgrading your install pacman failed to replace it with a newer version because it is different from what pacman had previously installed. Basically your toolchain installation is corrupted.

My advice is to force removing libnx (pacman -Rdd libnx iirc), remove all traces of c:\devkitPro\libnx, and install libnx again (pacman -S libnx).
Donate to devkitPro - help us stay alive!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests