Homebrew Question Link error devkitpro on macOS

thesjaakspoiler

Well-Known Member
OP
Member
Joined
Nov 20, 2018
Messages
1,364
Trophies
0
Age
124
XP
1,990
Country
Afghanistan
I installed devkitpro on macOS and compiling the test project works fine.

To see if everything really works, I tried to compile the source code of Checkpoint :
https://github.com/FlagBrew/Checkpoint/blob/master/README.md

According to the manual, I added these packages :
pacman -S libnx switch-freetype switch-libpng switch-libjpeg-turbo switch-sdl2 switch-sdl2_image switch-sdl2_ttf

But the linker throws these errors :
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/portlibs/switch/lib/libSDL2_image.a(IMG_webp.o): in function `IMG_InitWEBP':
IMG_webp.c: (.text.IMG_InitWEBP+0x10): undefined reference to `WebPGetFeaturesInternal'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: IMG_webp.c: (.text.IMG_InitWEBP+0x14): undefined reference to `WebPDecodeRGBInto'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: IMG_webp.c: (.text.IMG_InitWEBP+0x18): undefined reference to `WebPDecodeRGBAInto'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: IMG_webp.c: (.text.IMG_InitWEBP+0x1c): undefined reference to `WebPGetFeaturesInternal'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: IMG_webp.c: (.text.IMG_InitWEBP+0x20): undefined reference to `WebPDecodeRGBInto'
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/8.3.0/../../../../aarch64-none-elf/bin/ld: IMG_webp.c: (.text.IMG_InitWEBP+0x24): undefined reference to `WebPDecodeRGBAInto'
collect2: error: ld returned 1 exit status

I think the issue is libwebp is too old or maybe just missing, or maybe it's just some quirk on OSX.
Compilation itself was throwing no errors.

I see there is are weblibp files in the portlibs folder of devkitpro:
/opt/devkitpro/pacman/var/lib/pacman/local/switch-libwebp-1.0.2-1
/opt/devkitpro/pacman/var/lib/pacman/local/switch-libwebp-1.0.2-1/desc
/opt/devkitpro/pacman/var/lib/pacman/local/switch-libwebp-1.0.2-1/files
/opt/devkitpro/pacman/var/lib/pacman/local/switch-libwebp-1.0.2-1/mtree
/opt/devkitpro/portlibs/switch/lib/libwebp.a
/opt/devkitpro/portlibs/switch/lib/libwebp.la
/opt/devkitpro/portlibs/switch/lib/libwebpdemux.a
/opt/devkitpro/portlibs/switch/lib/libwebpdemux.la
/opt/devkitpro/portlibs/switch/lib/pkgconfig/libwebp.pc
/opt/devkitpro/portlibs/switch/lib/pkgconfig/libwebpdemux.pc

These are the installed packages :
$ sudo dkp-pacman -Qqe
devkitA64
devkitpro-keyring
general-tools
libnx
pkg-config
switch-examples
switch-freetype
switch-libjpeg-turbo
switch-libpng
switch-sdl2
switch-sdl2_gfx
switch-sdl2_image
switch-sdl2_ttf
switch-tools


Anybody any idea how to solve these kind of linker issues?

Thanks in advance.
 
Last edited by thesjaakspoiler,

realWinterMute

Well-Known Member
Member
Joined
Feb 24, 2011
Messages
117
Trophies
1
XP
563
Country
This "solution" is misleading and wrong and I would be grateful if, instead of randomly changing things to get something that "works", people instead redirected these questions to the correct place.

This should have been raised as an issue on the Checkpoint github in the OP where it could be dealt with properly and ensuring that the people who maintain the apps and tools are actually aware of issues.

You should not, in fact, add -lwebp to the the LIBS line, nor should you advise others to do so. Please revert that change then ensure you have the latest packages by running pacman -Syu then, and only then, if you still have a problem open an issue on the Checkpoint repo.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/tRIB0dfFapw?si=SOXZEKiwQP5KGNcB +1