libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.14k stars 1.82k forks source link

Unable to build PSP version #10599

Open Shassk opened 4 years ago

Shassk commented 4 years ago

I tried to rebuild RA on my own using official guide. Pulled repo.

But command: make -f Makefile.psp1.salamander results error at ../../frontend/drivers/platform_psp.c:66:10 about missing "../../bootstrap/psp1/kernel_functions.h" file. This file exists only in subdirectory kernel_functions_prx: ../../bootstrap/psp1/kernel_functions_prx/kernel_functions.h

Another way from guide is to use this: cd dist-scripts && ./dist-cores.sh psp1 It results another error: ls: unable to access '*_psp1.a': No such file or directory (translation can be a bit incorrect)

UPD: Seems like ./dist-cores.sh psp1 copies some files. After it I was able to run make -f Makefile.psp1.salamander without any visible errors, but still make -f Makefile.psp1 exits with code 1: /usr/local/pspdev/lib/gcc/psp/9.3.0/../../../../psp/bin/ld: cannot find -lretro_psp1

Steps to reproduce the bug

  1. git clone https://github.com/libretro/RetroArch.git retroarch
  2. cd retroarch
  3. make -f Makefile.psp1.salamander OR
  4. cd dist-scripts && ./dist-cores.sh psp1

Version/Commit

Environment information

dlorenzo commented 4 years ago

I'm encountering the exact same issue:

~/dev/RetroArch$ make -f Makefile.psp1
psp-gcc -Ideps -Ideps/stb -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/psp -Ideps/pthreads/platform/helper -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -I. -I/usr/local/pspdev/psp/sdk/include -O3 -G0 -std=gnu99 -ffast-math -fsingle-precision-constant -DHAVE_KERNEL_PRX -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RWAV -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_DSP_FILTER -DHAVE_VIDEO_FILTER -DHAVE_7ZIP -DHAVE_CC_RESAMPLER -DHAVE_THREADS -D_PSP_FW_VERSION=150   -c -o griffin/griffin.o griffin/griffin.c
In file included from griffin/griffin.c:1528:
griffin/../retroarch.c: In function ‘runloop_check_state.constprop’:
griffin/../libretro-common/audio/conversion/s16_to_float.c:173:25: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations]
  173 |       out[i] = (float)in[i] * gain;
      |                         ^
griffin/../libretro-common/audio/conversion/s16_to_float.c:172:4: note: within this loop
  172 |    for (; i < samples; i++)
      |    ^~~
psp-gcc -Ideps -Ideps/stb -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/psp -Ideps/pthreads/platform/helper -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -I. -I/usr/local/pspdev/psp/sdk/include -O3 -G0 -std=gnu99 -ffast-math -fsingle-precision-constant -DHAVE_KERNEL_PRX -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RWAV -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_DSP_FILTER -DHAVE_VIDEO_FILTER -DHAVE_7ZIP -DHAVE_CC_RESAMPLER -DHAVE_THREADS -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   griffin/griffin.o bootstrap/psp1/kernel_functions.o  -lretro_psp1  -lstdc++ -lpspgu -lpspgum -lm -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o retroarchpsp.elf

/usr/local/pspdev/lib/gcc/psp/9.3.0/../../../../psp/bin/ld: cannot find -lretro_psp1

collect2: error: ld returned 1 exit status

make: *** [/usr/local/pspdev/psp/sdk/lib/build.mak:175: retroarchpsp.elf] Error 1

Where you able to fix this?

MarcosDolce23 commented 6 months ago

I have the same issue, no new updates?

MarcosDolce23 commented 6 months ago

Revisé la acción de github para construir PSP y está usando el indicador HAVE_STATIC_DUMMY=1. No sé para qué se usa este indicador, pero ignora la biblioteca lretro_psp1 y luego pude compilar RA con éxito. https://github.com/libretro/RetroArch/actions/runs/8438581632/workflow