libretro / libretro-super

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

Fails to build libretro-bnes when running `make` and tries to copy a non-existent test #1800

Open hazrpg opened 4 months ago

hazrpg commented 4 months ago

Hiya, hope y'all are keeping well. And thanks for making this repo! Keep up the great work!

I have a slight issue building it however, everything builds right up until it gets to libretro-bnes, at which point it fails, it seems to continue and then gets stuck because cp "test_libretro.so" "dist/unix/test_libretro.so" doesn't exist.

Funnily, if I cd libretro_bnes and run make in there, the core does get built and I have a bnes_libretro.so and no visible errors. The file is only kb though.

Steps I did:

Here is a copy & paste of the error point:

g++ -O3 -DNDEBUG -fomit-frame-pointer -fno-tree-vectorize -I. -fPIC -DGIT_VERSION=\"" 8e26e89"\" -c libretro/libretro.cpp -o obj/libnes.o
gcc -std=gnu99 -O3 -DNDEBUG -fomit-frame-pointer -fno-tree-vectorize -I. -fPIC -DGIT_VERSION=\"" 8e26e89"\" -c libco/libco.c -o obj/libco.o
g++  -o bnes_libretro.so -dynamiclib obj/nes-interface.o obj/nes-system.o obj/nes-scheduler.o obj/nes-input.o obj/nes-cartridge.o obj/nes-memory.o obj/nes-cpu.o obj/nes-apu.o obj/nes-ppu.o obj/nes-cheat.o obj/libnes.o obj/libco.o -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:138: bnes_libretro.so] Error 1
gmake[1]: Leaving directory '/storage/app/downloads/complete/games/emus/libretro-super/libretro-bnes'
Failed to build retroarch
cp "test_libretro.so" "/home/hazrpg/games/emus/libretro-super/dist/unix/test_libretro.so"
cp: cannot stat 'test_libretro.so': No such file or directory
59 core(s) successfully processed:
    2048 bluemsx snes9x2005 chimerasnes fbneo fceumm fmsx gambatte
    handy stella nestopia numero nxengine prboom quicknes snes9x2010
    tyrquake vba_next mgba genesis_plus_gx bsnes_cplusplus98 mame2003
    mednafen_gba mednafen_lynx mednafen_ngp mednafen_pce_fast
    mednafen_supergrafx mednafen_vb mednafen_wswan mu gw
    prosystem 81 fuse lutro tgbdual gpsp o2em opera desmume2015
    picodrive virtualjaguar vbam mednafen_pcfx mednafen_psx
    mednafen_snes yabause meteor dinothawr bsnes2014_accuracy
    bsnes2014_balanced bsnes2014_performance bsnes_mercury_accuracy
    bsnes_mercury_balanced bsnes_mercury_performance mame2015 mame
    pcsx_rearmed bnes
17 core(s) failed:
   dosbox vecx desmume 3dengine snes9x mednafen_psx_hw hatari mame2010
   mame2016 emux_chip8 emux_gb emux_nes emux_sms ffmpeg ppsspp testgl test

Tempted to see if building test will work, because as far as I can tell it didn't even try to.

zoltanvb commented 4 months ago

"test" is probably unrelated to bnes, is coming from build_libretro_test() instead. It has no relevance nowadays, I believe.

These build scripts are not very much used nowadays, actual mainstream compilation is done elsewhere, but if you plan to use it for some purpose, I guess test core references can be eliminated.