Linking error (libmathneon?)
kouta-kun opened this issue · 1 comments
kouta-kun commented
Hi,
when compiling against latest vitaGL, I get the following undefined references:
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /tmp/xash.elf.ZSLrV3.ltrans0.ltrans.o: in function 'vglDrawObjects.constprop.0':
/home/kouta/vitaXash3D/source/utils/math_utils.c:25: undefined reference to 'matmul4_neon'
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /home/kouta/vitaXash3D/source/utils/math_utils.c:25: undefined reference to 'matmul4_neon'
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /tmp/xash.elf.ZSLrV3.ltrans26.ltrans.o: in function 'R_Init_OpenGL':
/home/kouta/vitaXash3D/source/vitaGL.c:626: undefined reference to '_newlib_heap_memblock'
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /home/kouta/vitaXash3D/source/vitaGL.c:626: undefined reference to '_newlib_heap_memblock'
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /home/kouta/vitaXash3D/source/vitaGL.c:629: undefined reference to '_newlib_heap_size'
/usr/games/VitaSDK/bin/../lib/gcc/arm-vita-eabi/9.1.0/../../../../arm-vita-eabi/bin/ld: /home/kouta/vitaXash3D/source/vitaGL.c:629: undefined reference to '_newlib_heap_size'
In makefile, both libc (for newlib references) and libmathneon are in link flags:
LIBS = -lvitaGL \
-lSceLibKernel_stub -lScePvf_stub -lmathneon -lSceAppMgr_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lm -lSceNet_stub \
-lSceNetCtl_stub -lSceAppUtil_stub -lc -lScePower_stub -lSceCommonDialog_stub \
-lSceAudio_stub -lSceGxm_stub -lSceDisplay_stub -lSceNet_stub -lSceNetCtl_stub
fgsfdsfgs commented
You probably need Rinnegatamante's fork of libmathneon, the updated version is still not in the repo or something. Just make && make install
it.
As for the newlib undefined reference, make sure your newlib and vitasdk are up to date.