libretro / gw-libretro

A libretro core for Game & Watch simulators
zlib License
31 stars 34 forks source link

Fix build on Linux & cleanup #37

Closed sergiobenrocha2 closed 6 years ago

sergiobenrocha2 commented 6 years ago

Others cores uses -mwup instead -mrvl in WiiU, but this core uses -mrvl. Is it right?

sergiobenrocha2 commented 6 years ago

Regarding "LIBS := -lm":

cc -o gw_libretro.so -shared -Wl,-version-script=build/link.T -Wl,-no-undefined ./lua/src/lapi.o ./lua/src/lcode.o ./lua/src/lctype.o ./lua/src/ldebug.o ./lua/src/ldo.o ./lua/src/ldump.o ./lua/src/lfunc.o ./lua/src/lgc.o ./lua/src/llex.o ./lua/src/lmem.o ./lua/src/lobject.o ./lua/src/lopcodes.o ./lua/src/lparser.o ./lua/src/lstate.o ./lua/src/lstring.o ./lua/src/ltable.o ./lua/src/ltm.o ./lua/src/lundump.o ./lua/src/lvm.o ./lua/src/lzio.o ./lua/src/lauxlib.o ./lua/src/lbaselib.o ./lua/src/lbitlib.o ./lua/src/lcorolib.o ./lua/src/ldblib.o ./lua/src/lmathlib.o ./lua/src/lstrlib.o ./lua/src/ltablib.o ./lua/src/lutf8lib.o ./lua/src/loadlib.o ./src/libretro.o ./src/version.o ./src/missing.o ./gwrom/gwrom.o ./gwlua/bsreader.o ./gwlua/functions.o ./gwlua/gwlua.o ./gwlua/image.o ./gwlua/ref.o ./gwlua/sound.o ./gwlua/timer.o ./retroluxury/src/rl_backgrnd.o ./retroluxury/src/rl_image.o ./retroluxury/src/rl_map.o ./retroluxury/src/rl_rand.o ./retroluxury/src/rl_sound.o ./retroluxury/src/rl_sprite.o ./retroluxury/src/rl_tile.o ./retroluxury/src/rl_version.o ./bzip2/blocksort.o ./bzip2/huffman.o ./bzip2/crctable.o ./bzip2/randtable.o ./bzip2/compress.o ./bzip2/decompress.o ./bzip2/bzlib.o -Wl,-Bsymbolic-functions -Wl,-z,relro  
./lua/src/lobject.o: In function `numarith':
./lua/src/lobject.c:108: undefined reference to `fmod'
./lua/src/lobject.c:103: undefined reference to `pow'
./lua/src/lobject.c:108: undefined reference to `fmod'
./lua/src/lvm.o: In function `luaV_execute':
./lua/src/lvm.c:883: undefined reference to `pow'
./lua/src/lvm.c:858: undefined reference to `fmod'
./lua/src/lmathlib.o: In function `math_tan':
./lua/src/lmathlib.c:61: undefined reference to `tan'
./lua/src/lmathlib.o: In function `math_sqrt':
./lua/src/lmathlib.c:167: undefined reference to `sqrt'
./lua/src/lmathlib.o: In function `math_sin':
./lua/src/lmathlib.c:51: undefined reference to `sin'
./lua/src/lmathlib.o: In function `math_log':
./lua/src/lmathlib.c:187: undefined reference to `log'
./lua/src/lmathlib.c:187: undefined reference to `log'
./lua/src/lmathlib.c:186: undefined reference to `log10'
./lua/src/lmathlib.c:183: undefined reference to `log'
./lua/src/lmathlib.o: In function `math_exp':
./lua/src/lmathlib.c:194: undefined reference to `exp'
./lua/src/lmathlib.o: In function `math_cos':
./lua/src/lmathlib.c:56: undefined reference to `cos'
./lua/src/lmathlib.o: In function `math_atan':
./lua/src/lmathlib.c:78: undefined reference to `atan2'
./lua/src/lmathlib.o: In function `math_asin':
./lua/src/lmathlib.c:66: undefined reference to `asin'
./lua/src/lmathlib.o: In function `math_acos':
./lua/src/lmathlib.c:71: undefined reference to `acos'
./lua/src/lmathlib.o: In function `math_fmod':
./lua/src/lmathlib.c:138: undefined reference to `fmod'
collect2: error: ld returned 1 exit status
Makefile.libretro:428: recipe for target 'gw_libretro.so' failed

https://launchpadlibrarian.net/347981221/buildlog_ubuntu-artful-amd64.libretro-gw_1.2-r201712040203-2f3029d-5~ubuntu17.10.1_BUILDING.txt.gz

leiradel commented 6 years ago

Others cores uses -mwup instead -mrvl in WiiU, but this core uses -mrvl. Is it right?

I'm not sure, the Wii and Wii U builds were made by someone else. Maybe @twinaphex knows?