OpenOrbis/OpenOrbis-PS4-Toolchain

Compiling RetroArch with OpenOrbis: Make -f Makefile.ps4

godreborn opened this issue · 5 comments

I'm not sure if this is a problem with openorbis or retroarch. I was going to post on the retroarch github, but there's no "issues" tab. anyway, for some reason, it fails instantly like it can't find the environmental variable. it's set correctly, even checked it, OO_PS4_TOOLCHAIN, but it fails:

image

Which repo are you compiling this from?

https://github.com/OsirizX/RetroArch/tree/ps4_r4

I'm not sure if Makefile.ps4 or Makefile.orbis is the ps4 version. Makefile.ps4 gives the error above, and I think the file it's looking for is part of the toolchain, which is installed correctly as I was able to compile one of the samples. Makefile.orbis iirc uses ps4sdk, which I have as environmental variable, but I either can't get the sdk to compile or it's retroarch that's the problem.

Missing -i for OOSDK includes. -isysroot $(TOOLCHAIN) -isystem $(TOOLCHAIN)/include

# Define final C/C++ flags
CFLAGS := --target=x86_64-pc-freebsd12-elf -fPIC -funwind-tables -c $(EXTRAFLAGS) -isysroot $(TOOLCHAIN) -isystem $(TOOLCHAIN)/include
CXXFLAGS := $(CFLAGS) -isystem $(TOOLCHAIN)/include/c++/v1
LDFLAGS := -m elf_x86_64 -pie --script $(TOOLCHAIN)/link.x --eh-frame-hdr -L$(TOOLCHAIN)/lib $(LIBS) $(TOOLCHAIN)/lib/crt1.o

I have that, and these are the errors I encounter with Makefile.orbis as well as Makefile.ps4:

godreborn@GODREBORN-LAPTOP:/ps4_r4$ make -f Makefile.orbis
clang -c -o version_git.o version_git.c -m64 -DORBIS -DHAVE_LIBORBIS -std=c11 -mcmodel=large -ffreestanding -nostdlib -nostdinc -fno-builtin -fno-stack-protector -O3 -Wall -pedantic -Wno-zero-length-array -Wno-format-pedantic -D__PS4__ -I/usr/local/ps4-payload-sdk/include -I /usr/local/ps4-payload-sdk/include/sce -target x86_64-scei-ps4-elf -fPIE -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN -DHAVE_LIBRETRODB -DHAVE_GIT_VERSION -DGIT_VERSION=66daf89d77 -DHAVE_CONFIGFILE -DHAVE_CC_RESAMPLER -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_XMB -DHAVE_OZONE -DHAVE_OVERLAY -DHAVE_THREADS -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_GLSL -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_ZLIB -DHAVE_RTGA -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_COMPRESSION -I. -Ideps/7zip -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib -MT version_git.o -MMD -MP -MF version_git.Tdepend
In file included from version_git.c:17:
In file included from ./version_git.h:20:
libretro-common/include/retro_common_api.h:95:10: fatal error: 'inttypes.h' file not found
#include <inttypes.h>
^~~~~~~~~~~~
1 error generated.
make: *** [Makefile.orbis:140: version_git.o] Error 1
godreborn@GODREBORN-LAPTOP:
/ps4_r4$ make -f Makefile.ps4
clang -cc1 -triple x86_64-scei-ps4-elf -munwind-tables -std=c11 -DORBIS -D__ORBIS__ -DHAVE_OOSDK -I. -Idefines -Imemory/ps4 -Ideps -Ideps/7zip -Ideps/libz -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib -Ideps/rcheevos/include -DHAVE_OPENGLES3 -DHAVE_SOCKET_LEGACY -DHAVE_LIBRETRODB -DHAVE_SHADERPIPELINE -DHAVE_GIT_VERSION -DGIT_VERSION=66daf89d77 -DHAVE_DR_MP3 -DHAVE_CONFIGFILE -DHAVE_RUNAHEAD -DHAVE_CC_RESAMPLER -DHAVE_LANGEXTRA -DHAVE_IMAGEVIEWER -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_STB_FONT -DHAVE_THREADS -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_GLSL -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_ZLIB -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR -DHAVE_RTGA -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_NETWORKING -DHAVE_NETWORK_CMD -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_COMPRESSION -DHAVE_MAIN -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN -DHAVE_XMB -DHAVE_RGUI -DHAVE_OZONE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_ASSETS -emit-obj -O3 -o memory/ps4/user_mem.o memory/ps4/user_mem.c
memory/ps4/user_mem.c:3:10: fatal error: 'orbis/libkernel.h' file not found
#include <orbis/libkernel.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile.ps4:186: memory/ps4/user_mem.o] Error 1