Compile error on Ubuntu 15.04

Hello,

I downloaded the last retroarch source from git and tried to compile it. I can successfully compile 64 cores but 11 falied. I need your help to compile gw, mame like and bsnes cores. I think ffmpeg does not compile because Ubuntu uses libavcodec fork instead?

This is the end of retroarch compilation:

… g++ -std=gnu++0x -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 /usr/lib/gcc/x86_64-linux-gnu/4.9/…/…/…/x86_64-linux-gnu/crt1.o: dans la fonction « _start »: /build/buildd/glibc-2.21/csu/…/sysdeps/x86_64/start.S:114: référence indéfinie vers « main » collect2: error: ld returned 1 exit status Makefile:69: recipe for target ‘bnes_libretro.so’ failed make: *** [bnes_libretro.so] Error 1 cp “bnes_libretro.so” “/home/romain/Applications_persos/Jeux/Emulateurs/RetroArch/libretro-super09082015/dist/unix/bnes_libretro.so” cp: impossible d’évaluer «bnes_libretro.so»: Aucun fichier ou dossier de ce type === Building RetroArch test cores === === OpenGL enabled === cd “/home/romain/Applications_persos/Jeux/Emulateurs/RetroArch/libretro-super09082015/retroarch/cores/libretro-test-gl” make -f “Makefile” platform=“unix-opengl” “-j4” clean rm -f libretro-test.o …/…/libretro-common/glsym/rglgen.o …/…/libretro-common/glsym/glsym_gl.o testgl_libretro.dll make -f “Makefile” platform=“unix-opengl” CC=“gcc” CXX=“g++” “-j4” gcc -I…/…/libretro-common/include -I… -O3 -std=gnu99 -Wall -pedantic -c -o libretro-test.o libretro-test.c gcc -I…/…/libretro-common/include -I… -O3 -std=gnu99 -Wall -pedantic -c -o …/…/libretro-common/glsym/rglgen.o …/…/libretro-common/glsym/rglgen.c gcc -I…/…/libretro-common/include -I… -O3 -std=gnu99 -Wall -pedantic -c -o …/…/libretro-common/glsym/glsym_gl.o …/…/libretro-common/glsym/glsym_gl.c gcc -shared -static-libgcc -static-libstdc++ -s -Wl,–version-script=link.T -Wl,–no-undefined -o testgl_libretro.dll libretro-test.o …/…/libretro-common/glsym/rglgen.o …/…/libretro-common/glsym/glsym_gl.o -lopengl32 -lm /usr/bin/ld.bfd.real: libretro-test.o: réadressage de R_X86_64_32 en vertu de «.rodata.str1.1» ne peut être utilisé lors de la création d’un objet partagé; recompilez avec -fPIC libretro-test.o: error adding symbols: Mauvaise valeur collect2: error: ld returned 1 exit status Makefile:149: recipe for target ‘testgl_libretro.dll’ failed make: *** [testgl_libretro.dll] Error 1 Failed to build retroarch cp “testgl_libretro.so” “/home/romain/Applications_persos/Jeux/Emulateurs/RetroArch/libretro-super09082015/dist/unix/testgl_libretro.so” cp: impossible d’évaluer «testgl_libretro.so»: Aucun fichier ou dossier de ce type cd “/home/romain/Applications_persos/Jeux/Emulateurs/RetroArch/libretro-super09082015/retroarch/cores/libretro-test” make -f “Makefile” platform=“unix-opengl” “-j4” clean rm -f libretro-test.o test_libretro.dll make -f “Makefile” platform=“unix-opengl” CC=“gcc” CXX=“g++” “-j4” gcc -O3 -Wall -pedantic -std=gnu99 -c -o libretro-test.o libretro-test.c gcc -shared -static-libgcc -static-libstdc++ -s -Wl,–version-script=link.T -Wl,–no-undefined -o test_libretro.dll libretro-test.o -lm /usr/bin/ld.bfd.real: libretro-test.o: réadressage de R_X86_64_32 en vertu de «.rodata.str1.1» ne peut être utilisé lors de la création d’un objet partagé; recompilez avec -fPIC libretro-test.o: error adding symbols: Mauvaise valeur collect2: error: ld returned 1 exit status Makefile:75: recipe for target ‘test_libretro.dll’ failed make: *** [test_libretro.dll] Error 1 Failed to build retroarch cp “test_libretro.so” “/home/romain/Applications_persos/Jeux/Emulateurs/RetroArch/libretro-super09082015/dist/unix/test_libretro.so” cp: impossible d’évaluer «test_libretro.so»: Aucun fichier ou dossier de ce type 64 core(s) successfully processed: 2048 bluemsx dosbox catsfc fb_alpha fceumm fmsx gambatte handy stella nestopia nxengine prboom quicknes snes9x_next tyrquake vba_next vecx mgba genesis_plus_gx bsnes_cplusplus98 mednafen_gba mednafen_lynx mednafen_ngp mednafen_pce_fast mednafen_supergrafx mednafen_vb mednafen_wswan prosystem 81 fuse tgbdual gpsp o2em 4do desmume picodrive virtualjaguar mupen64plus 3dengine snes9x vbam scummvm mednafen_pcfx mednafen_psx mednafen_snes yabause hatari meteor dinothawr stonesoup bsnes_accuracy bsnes_balanced bsnes_performance bsnes_mercury_accuracy bsnes_mercury_balanced bsnes_mercury_performance mame emux_chip8 emux_gb emux_nes emux_sms pcsx_rearmed ppsspp 11 core(s) failed: mame078 gw lutro mame139 mame159 mess ume ffmpeg bnes testgl test

Thank you for your help.

Is there a reason you want to compile them yourself instead of using the PPAs (either stable or testing)?

Hello,

I don’t use Retroarch PPA because:

  • it misses some cores
  • I don’t have to wait after the ppa version to test new functionnality or corrected bugs
  • I can install all the program in the folder I want
  • I’m an advanced user, I use Linux and compile some of my programs since 15 years, so I can find bugs and write reports to dev

Now could you say me how to compile only one core, so I could obtain debug messages easier.

Thank you for your help.

Since you’re experienced with compiling, I would try manually compiling the remaining cores just by going into the source trees and calling ‘make’ or ‘make -f Makefile.libretro’ as the case may be. For MAME/MESS/UME, you’ll have to look into the Makefile(s) and see what invocation builds each variant. IIRC, bnes is hardcoded to require a specific (old) gcc version (4.5, perhaps…?).

I upgraded my Ubuntu to Willy (15.10) and recompiled retroarch from the last git version. But I have similar non compiled cores list:

62 core(s) successfully processed: 2048 bluemsx dosbox catsfc fb_alpha fceumm fmsx gambatte handy stella nestopia nxengine prboom quicknes snes9x_next tyrquake vba_next vecx mgba genesis_plus_gx bsnes_cplusplus98 mednafen_gba mednafen_lynx mednafen_ngp mednafen_pce_fast mednafen_supergrafx mednafen_vb mednafen_wswan gw prosystem 81 fuse tgbdual gpsp o2em 4do desmume picodrive virtualjaguar mupen64plus 3dengine snes9x vbam scummvm mednafen_pcfx mednafen_psx mednafen_snes yabause hatari meteor dinothawr stonesoup bsnes_accuracy bsnes_balanced bsnes_performance bsnes_mercury_accuracy bsnes_mercury_balanced bsnes_mercury_performance mame pcsx_rearmed ffmpeg ppsspp 13 core(s) failed: mame078 lutro mame139 mame159 mess ume emux_chip8 emux_gb emux_nes emux_sms bnes testgl test

This time gw (gamewatch core) compiled good, but not the mame-like cores. But it doesn’t matter since mame svn core compiled good and if I need the others cores, it seems I could upload precompiled version from retroarch, menu “update cores”.

Some of the MAME cores also have a weird build process by which they first build some resources that are needed to build other parts, so you may need to just go into those MAME directories and ‘make’ a few more times.