fgsfdsfgs / vitaXash3D

a port of Xash3D-FWGS to the PSVita
GNU General Public License v3.0
139 stars 15 forks source link

Linking error (libmathneon?) #58

Open kouta-kun opened 4 years ago

kouta-kun commented 4 years ago

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 4 years ago

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.