libretro / libretro-chailove

:heart: 2D Game Framework with ChaiScript
https://raw.githack.com/libretro/libretro-chailove/docs/index.html
MIT License
70 stars 22 forks source link

Compiling crashes with missing retro_endianness.h, please add build instructions. #433

Closed edo9k closed 2 weeks ago

edo9k commented 2 weeks ago

Compilation using make fails with this error:

<command-line>: fatal error: retro_endianness.h: Arquivo ou diretório inexistente

I think that header file comes from libretro-common, I tried to install those headers, but no luck there (I don't have much familiarity with C++ though).

I saw there are a bunch of directories inside vendor, but those are all empty. I was guessing running make or make all would download all those dependencies, compile them and put them in the right places. But it just didn't work for me.

Am I doing something wrong? Is there some wiki or readme file where this compiling process is discussed?

Here's the full compile command make generated:

VERBOSE=true make
CXX src/ChaiLove.cpp
g++ -c -o src/ChaiLove.o src/ChaiLove.cpp \
    -DGIT_VERSION=\"5984230\" -O2 -DNDEBUG -fPIC -Wno-write-strings \
    -D_INCL_PHYSFS_PLATFORMS -Wfatal-errors \
    -I./vendor/random/include \
    -I./vendor/libretro-common/include \
    -DHAVE_RWAV=1 \
    -I./vendor/libretro-common/include \
    -DHAVE_STB_VORBIS \
    -I./vendor/libretro-deps \
    -I./vendor/libretro-deps/libz \
    -I./vendor/libretro-common/compat \
    -DWANT_ZLIB \
    -I./vendor/physfs/src \
    -I./vendor/physfs/extras \
    -DPHYSFS_NO_CDROM_SUPPORT=1 \
    -DPHYSFS_SUPPORTS_DEFAULT=0 \
    -DPHYSFS_SUPPORTS_ZIP=1 \
    -I./vendor/SDL_tty/include/SDL_tty \
    -I./vendor/sdl-libretro/tests/SDL_gfx-2.0.26 \
    -I./vendor/libretro-deps/freetype/include \
    -DFT2_BUILD_LIBRARY \
    -DFT_USE_AUTOFIT \
    -DFT_USE_RASTER \
    -DFT_USE_SMOOTH \
    -DFT_USE_TT \
    -DFT_USE_T1 \
    -DFT_USE_T42 \
    -DFT_USE_T1CID \
    -DFT_USE_CFF \
    -DFT_USE_OTV \
    -DFT_USE_GXV \
    -I./vendor/sdl-libretro/tests/SDL_ttf-2.0.11/VisualC/external/include \
    -I./vendor/Snippets \
    -I./vendor/stb \
    -I./vendor/TinySHA1 \
    -I./vendor/cppcodec \
    -I./vendor/chaiscript/include \
    -I./vendor/ChaiScript_Extras/include \
    -D__HAVE_CHAISCRIPT__ \
    -DCHAISCRIPT_NO_THREADS \
    -DCHAISCRIPT_NO_THREADS_WARNING \
    -DCHAISCRIPT_NO_DYNLOAD \
    -DCHAISCRIPT_EXTRAS_MATH_SKIP_ADVANCED \
    -DSDL_THREADS_DISABLED \
    -DSDL_CDROM_DISABLED \
    -I./vendor/sdl-libretro/include \
    -O3 -ffast-math -fomit-frame-pointer \
    -DHAVE_THREADS=1 \
    -D__LIBRETRO__ \
    -fPIC -std=c++14 -include retro_endianness.h

I'm on Ubuntu 22.04 Linux _ 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

RobLoach commented 2 weeks ago

Make sure to get the submodules...

git submodule update --init
edo9k commented 2 weeks ago

It worked. Thanks a lot.