Compiling libretro higan

Im trying to compile the libretro core of higan but i cant get it to compile correctly.

What im doing: 1.

Get dependecies for higan

sudo apt-get install build-essential libgtk2.0-dev libpulse-dev mesa-common-dev libgtksourceview2.0-dev libcairo2-dev libsdl1.2-dev libxv-dev libao-dev libopenal-dev libudev-dev

##checkout libretro branch git clone https://gitlab.com/higan/higan.git -blibretro

##make libretro make -C higan target=libretro

Im getting following error: g++ -o out/higan_sfc_libretro.so obj/libretro_sfc.o obj/libco.o obj/emulator.o obj/audio.o obj/video.o obj/resource.o obj/sfc-interface.o obj/sfc-system.o obj/sfc-controller.o obj/sfc-cartridge.o obj/sfc-memory.o obj/sfc-cpu.o obj/sfc-smp.o obj/sfc-dsp.o obj/sfc-ppu.o obj/sfc-expansion.o obj/sfc-satellaview.o obj/sfc-21fx.o obj/sfc-icd2.o obj/sfc-mcc.o obj/sfc-nss.o obj/sfc-event.o obj/sfc-sa1.o obj/sfc-superfx.o obj/sfc-armdsp.o obj/sfc-hitachidsp.o obj/sfc-necdsp.o obj/sfc-epsonrtc.o obj/sfc-sharprtc.o obj/sfc-spc7110.o obj/sfc-sdd1.o obj/sfc-obc1.o obj/sfc-msu1.o obj/sfc-bsmemory.o obj/sfc-sufamiturbo.o obj/gb-interface.o obj/gb-system.o obj/gb-memory.o obj/gb-cartridge.o obj/gb-cpu.o obj/gb-ppu.o obj/gb-apu.o obj/processor-arm7tdmi.o obj/processor-gsu.o obj/processor-hg51b.o obj/processor-lr35902.o obj/processor-spc700.o obj/processor-upd96050.o obj/processor-wdc65816.o -ldl -fopenmp -Wl,-export-dynamic -lX11 -lXext /usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/Scrt1.o: In Funktion »_start«: (.text+0x20): Warnung: undefinierter Verweis auf »main« collect2: error: ld returned 1 exit status target-libretro/GNUmakefile:38: recipe for target ‘build’ failed make: *** [build] Error 1 make: Verzeichnis „/home/sven/del/higan/higan“ wird verlassen

Am i missing something?

Im currently using Ubuntu 18.04 on 64bit plattform.

This thread can be closed.

You need to pass another variable while compiling it.

Following command works: sudo make -C higan target=libretro binary=library

Glad you got it figured out!

Just FYI, it’s not a great practice to run ‘make’ with elevated privs unless/until you get to the install step. If you give regular ol’ ‘make’ elevated privs, it could monkey with anything on your system during the build process.