Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Flycast and PPSSPP core libretro_libnx.a file for Nintendo Switch RetroArch Failed #1718

Open
MegaBunLi opened this issue Apr 4, 2023 · 3 comments

Comments

@MegaBunLi
Copy link

MegaBunLi commented Apr 4, 2023

Tried all methods and counldn't find why, for other cores I can successfully output <corename>_libretro_libnx.a, but for these two cores I have no idea.

Noticed these two cores has stopped updates for a while for libnx version, I changed the fetch address to the original github address https://github.com/libretro/flycast and https://github.com/m4xw/ppsspp, but it didn't work.

Flycast

The error shows:

core/libretro/vmem_utils.cpp: In function 'void* mem_region_reserve(void*, size_t)':
core/libretro/vmem_utils.cpp:145:16: error: 'virtmemReserve' was not declared in this scope
  145 |         return virtmemReserve(len);
      |                ^~~~~~~~~~~~~~
core/libretro/vmem_utils.cpp: In function 'VMemType vmem_platform_init(void**, void**)':
core/libretro/vmem_utils.cpp:246:41: error: 'virtmemReserve' was not declared in this scope
  246 |         vmem_fd_codememory = (uintptr_t)virtmemReserve(size_aligned);
      |                                         ^~~~~~~~~~~~~~
core/libretro/vmem_utils.cpp: In function 'bool vmem_platform_prepare_jit_block(void*, unsigned int, void**, uintptr_t*)':
core/libretro/vmem_utils.cpp:391:24: error: 'virtmemReserve' was not declared in this scope
  391 |         void* ptr_rw = virtmemReserve(size_aligned);
      |                        ^~~~~~~~~~~~~~
make: *** [Makefile:1180: core/libretro/vmem_utils.o] Error 1
make: *** Waiting for unfinished jobs....
core/deps/libzip/mkstemp.c: In function '_zip_mkstemp':
core/deps/libzip/mkstemp.c:70:15: warning: implicit declaration of function 'getpid' [-Wimplicit-function-declaration]
   70 |         pid = getpid();
      |               ^~~~~~
cp "flycast_libretro_libnx.a" "/home/Floyd/Downloads/libretro-super/dist/libnx/flycast_libretro_libnx.a"
cp: cannot stat 'flycast_libretro_libnx.a': No such file or directory
1 core(s) failed:
   flycast

PPSSPP

The error shows:

$ platform=libnx ./libretro-build.sh ppsspp
CC = /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc
CXX = /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++
CXX11 =
CXX17 =
STRIP =
Compiler: CC="/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc" CXX="/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++"
libnx
libnx
=== PPSSPP
Building ppsspp...
cd "/home/Floyd/Downloads/libretro-super/libretro-ppsspp/libretro"
make platform="libnx-opengl" -j7  clean
rm -f ../Common/GL/GLInterface/EGL.o ../Common/GL/GLInterface/EGLSwitch.o ../Common/GL/GLInterface/GLInterface.o ../ext/vma/vk_mem_alloc.o ../ext/snappy/snappy-c.o ../ext/snappy/snappy-sinksource.o ../ext/snappy/snappy-stubs-internal.o ../ext/snappy/snappy.o ../ext/xbrz/xbrz.o ../ext/gason/gason.o ../ext/cityhash/city.o ../Common/Crypto/md5.o ../Common/Crypto/sha1.o ../Common/Crypto/sha256.o ../Common/Data/Color/RGBAUtil.o ../Common/Data/Convert/SmallDataConvert.o ../Common/Data/Encoding/Base64.o ../Common/Data/Encoding/Compression.o ../Common/Data/Encoding/Utf8.o ../Common/Data/Format/RIFF.o ../Common/Data/Format/IniFile.o 
...
...
../ext/zstd/lib/decompress/zstd_decompress.o ../ext/zstd/lib/decompress/zstd_decompress_block.o ../ext/zstd/lib/dictBuilder/cover.o ../ext/zstd/lib/dictBuilder/divsufsort.o ../ext/zstd/lib/dictBuilder/fastcover.o ../ext/zstd/lib/dictBuilder/zdict.o ../ext/zlib/adler32.o ../ext/zlib/compress.o ../ext/zlib/crc32.o ../ext/zlib/deflate.o ../ext/zlib/gzclose.o ../ext/zlib/gzlib.o ../ext/zlib/gzread.o ../ext/zlib/gzwrite.o ../ext/zlib/inffast.o ../ext/zlib/inflate.o ../ext/zlib/inftrees.o ../ext/zlib/trees.o ../ext/zlib/uncompr.o ../ext/zlib/zutil.o
make platform="libnx-opengl" -j7 CC="/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc" CXX="/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++"
make: Nothing to be done for 'all'.
cp "ppsspp_libretro_libnx.a" "/home/Floyd/Downloads/libretro-super/dist/libnx/ppsspp_libretro_libnx.a"
cp: cannot stat 'ppsspp_libretro_libnx.a': No such file or directory
1 core(s) failed:
   ppsspp

How could I fix this?

Or did someone know where could I find the [4c293f3] version flycast_libretro_libnx.a and [8e24692] version ppsspp_libretro_libnx.a file? I just wanna modify the retroarch sourcesode without changing cores, but I must get the <corename>_libretro_libnx.a first to compile an nro file!

Really thx!

@MegaBunLi MegaBunLi changed the title Build Flycast and PPSSPP core libretro_libnx.a file for Nintendo Switch RetroArch Build Flycast and PPSSPP core libretro_libnx.a file for Nintendo Switch RetroArch Failed Apr 4, 2023
@RobLoach
Copy link
Member

Not sure libretro-build.sh is even used anymore, as it has been replaced with gitlab's CI... In addition, if there are build errors in the cores, you should likely make issues in the respective core issue queues. Thanks!

@wings110
Copy link

@RobLoach how to build libnx with gitlab's CI? thx

@zoltanvb
Copy link
Contributor

I have updated the build scripts so that it supports cmake. You can try updating the scripts and then changing back those 2 rules to fetch the mentioned repos, it has a better chance now, though I have not checked libnx platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants