libretro / libretro-super

Super repo for other libretro projects. Fetches, builds and installs.
MIT License
401 stars 280 forks source link

cant make a core work #1607

Closed mowses closed 2 years ago

mowses commented 2 years ago

My attempt to make my own STELLA (atari) core changes I got in trouble running the compiled core. Read more below:

When I fetch and compile the STELLA core it works fine when I run retroarch -v -L /home/unknown/snap/retroarch/1005/.config/retroarch/cores/stella_libretro.so /home/unknown/Downloads/Atari\ 2600/Enduro.bin

However, if I just copy the libretro-super/libretro-stella folder and paste in libretro-super/libretro-clonedstella then run NOCLEAN=1 ./libretro-build.sh clonedstella. The compiler runs fine (except for the final cp:

cp "clonedstella_libretro.so" "/var/www/html/libretro-compile/libretro-super/dist/unix/clonedstella_libretro.so"
cp: cannot stat 'clonedstella_libretro.so': No such file or directory

But the file was compiled successfully at libretro-super/libretro-clonedstella/stella NOTE: I did not changed any file from the copied directory, which I suppose it should work as expected.

This is fine, this is not the problem. The problem is that for some reason, the file libretro-super/libretro-clonedstella/stella cannot be used as a retroarch core:

cp ./libretro-super/libretro-clonedstella/stella /home/unknown/snap/retroarch/1005/.config/retroarch/cores/clonedstella_libretro.so;
retroarch -v -L /home/unknown/snap/retroarch/1005/.config/retroarch/cores/clonedstella_libretro.so /home/unknown/Downloads/Atari\ 2600/Enduro.bin

This outputs the following:

[INFO] [Config]: Loading default config.
[INFO] [Config]: Looking for config in: "/home/unknown/snap/retroarch/1005/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.9.14 (Git e954a46b1b)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Dec  6 2021
[INFO] Version: 1.9.14
[INFO] Git: e954a46b1b
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Core]: Loading dynamic libretro core from: "/home/unknown/snap/retroarch/1005/.config/retroarch/cores/clonedstella_libretro.so"
[ERROR] Failed to open libretro core: "/home/unknown/snap/retroarch/1005/.config/retroarch/cores/clonedstella_libretro.so"
Error(s): /home/unknown/snap/retroarch/1005/.config/retroarch/cores/clonedstella_libretro.so: cannot dynamically load position-independent[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core symbols..
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

I dont know how to get more debugging info than that and I have no clue about whats the problem. What cannot dynamically load position-independent mean?

PS: compiling under ubuntu 20

mowses commented 2 years ago

I realised that I should add the respective cloned core at libretro-super/rules.d/core-rules.sh and libretro-super/build-config.sh and libretro-super/libretro-clonedstella/src/libretro/Makefile.

After that the retroarch now runs fine.