libretro / desmume2015

Port of Desmume to libretro based on Desmume SVN circa 2015.
30 stars 44 forks source link

Build failure #115

Closed orbea closed 7 years ago

orbea commented 7 years ago

Description

The libretro desmume core no longer compiles with either gcc or clang.

Expected behavior

The core should compile.

Actual behavior

gcc-7.1.0

g++  -fPIC -shared -Wl,--no-undefined -Wl,--version-script=src/libretro/link.T -o desmume_libretro.so src/armcpu.o src/arm_instructions.o src/bios.o src/cp15.o src/emufile.o src/encrypt.o src/FIFO.o src/firmware.o src/GPU.o src/mc.o src/path.o src/readwrite.o src/wifi.o src/MMU.o src/NDSSystem.o src/render3D.o src/rtc.o src/saves.o src/slot1.o src/slot2.o src/SPU.o src/matrix.o src/gfx3d.o src/thumb_instructions.o src/utils/advanscene.o src/utils/datetime.o src/utils/emufat.o src/utils/xstring.o src/utils/decrypt/crc.o src/utils/decrypt/decrypt.o src/utils/decrypt/header.o src/utils/vfat.o src/utils/tinyxml/tinystr.o src/utils/tinyxml/tinyxml.o src/utils/tinyxml/tinyxmlerror.o src/utils/tinyxml/tinyxmlparser.o src/addons/slot2_auto.o src/addons/slot2_mpcf.o src/addons/slot2_paddle.o src/addons/slot2_gbagame.o src/addons/slot2_none.o src/addons/slot2_rumblepak.o src/addons/slot2_guitarGrip.o src/addons/slot2_expMemory.o src/addons/slot2_piano.o src/addons/slot2_passme.o src/addons/slot1_none.o src/addons/slot1_r4.o src/addons/slot1comp_mc.o src/addons/slot1comp_rom.o src/addons/slot1comp_protocol.o src/addons/slot1_retail_mcrom.o src/addons/slot1_retail_nand.o src/addons/slot1_retail_auto.o src/cheatSystem.o src/texcache.o src/rasterize.o src/mic.o src/driver.o src/libretro/libretro.o src/libretro/scrc32.o src/addons/slot1_retail_mcrom_debug.o src/utils/fsnitro.o src/utils/task.o src/arm_jit.o src/utils/AsmJit/core/assembler.o src/utils/AsmJit/core/assert.o src/utils/AsmJit/core/buffer.o src/utils/AsmJit/core/compiler.o src/utils/AsmJit/core/compilercontext.o src/utils/AsmJit/core/compilerfunc.o src/utils/AsmJit/core/compileritem.o src/utils/AsmJit/core/context.o src/utils/AsmJit/core/cpuinfo.o src/utils/AsmJit/core/defs.o src/utils/AsmJit/core/func.o src/utils/AsmJit/core/logger.o src/utils/AsmJit/core/memorymanager.o src/utils/AsmJit/core/memorymarker.o src/utils/AsmJit/core/operand.o src/utils/AsmJit/core/stringbuilder.o src/utils/AsmJit/core/stringutil.o src/utils/AsmJit/core/virtualmemory.o src/utils/AsmJit/core/zonememory.o src/utils/AsmJit/x86/x86assembler.o src/utils/AsmJit/x86/x86compiler.o src/utils/AsmJit/x86/x86compilercontext.o src/utils/AsmJit/x86/x86compilerfunc.o src/utils/AsmJit/x86/x86compileritem.o src/utils/AsmJit/x86/x86cpuinfo.o src/utils/AsmJit/x86/x86defs.o src/utils/AsmJit/x86/x86func.o src/utils/AsmJit/x86/x86operand.o src/utils/AsmJit/x86/x86util.o src/utils/libfat/partition.o src/utils/libfat/cache.o src/utils/libfat/directory.o src/utils/libfat/disc.o src/utils/libfat/fatdir.o src/utils/libfat/fatfile.o src/utils/libfat/filetime.o src/utils/libfat/file_allocation_table.o src/utils/libfat/libfat.o src/utils/libfat/libfat_public_api.o src/utils/libfat/lock.o src/libretro-common/rthreads/rthreads.o src/common.o src/utils/dlditool.o src/libretro-common/memmap/memalign.o src/libretro-common/streams/file_stream.o src/libretro-common/features/features_cpu.o src/libretro-common/compat/compat_strl.o src/libretro-common/file/retro_dirent.o src/libretro-common/file/retro_stat.o src/libretro-common/file/file_path.o src/libretro-common/string/stdstring.o src/version.o 
src/libretro-common/rthreads/rthreads.o: In function `sthread_create':
rthreads.c:(.text+0xd5): undefined reference to `pthread_create'
src/libretro-common/rthreads/rthreads.o: In function `sthread_detach':
rthreads.c:(.text+0x133): undefined reference to `pthread_detach'
src/libretro-common/rthreads/rthreads.o: In function `sthread_join':
rthreads.c:(.text+0x155): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make: *** [Makefile.libretro:329: desmume_libretro.so] Error 1
make: Leaving directory '/media/gittings/installed/libretro/libretro-desmume/desmume'

clang-4.01

clang++  -fPIC -shared -Wl,--no-undefined -Wl,--version-script=src/libretro/link.T -o desmume_libretro.so src/armcpu.o src/arm_instructions.o src/bios.o src/cp15.o src/emufile.o src/encrypt.o src/FIFO.o src/firmware.o src/GPU.o src/mc.o src/path.o src/readwrite.o src/wifi.o src/MMU.o src/NDSSystem.o src/render3D.o src/rtc.o src/saves.o src/slot1.o src/slot2.o src/SPU.o src/matrix.o src/gfx3d.o src/thumb_instructions.o src/utils/advanscene.o src/utils/datetime.o src/utils/emufat.o src/utils/xstring.o src/utils/decrypt/crc.o src/utils/decrypt/decrypt.o src/utils/decrypt/header.o src/utils/vfat.o src/utils/tinyxml/tinystr.o src/utils/tinyxml/tinyxml.o src/utils/tinyxml/tinyxmlerror.o src/utils/tinyxml/tinyxmlparser.o src/addons/slot2_auto.o src/addons/slot2_mpcf.o src/addons/slot2_paddle.o src/addons/slot2_gbagame.o src/addons/slot2_none.o src/addons/slot2_rumblepak.o src/addons/slot2_guitarGrip.o src/addons/slot2_expMemory.o src/addons/slot2_piano.o src/addons/slot2_passme.o src/addons/slot1_none.o src/addons/slot1_r4.o src/addons/slot1comp_mc.o src/addons/slot1comp_rom.o src/addons/slot1comp_protocol.o src/addons/slot1_retail_mcrom.o src/addons/slot1_retail_nand.o src/addons/slot1_retail_auto.o src/cheatSystem.o src/texcache.o src/rasterize.o src/mic.o src/driver.o src/libretro/libretro.o src/libretro/scrc32.o src/addons/slot1_retail_mcrom_debug.o src/utils/fsnitro.o src/utils/task.o src/arm_jit.o src/utils/AsmJit/core/assembler.o src/utils/AsmJit/core/assert.o src/utils/AsmJit/core/buffer.o src/utils/AsmJit/core/compiler.o src/utils/AsmJit/core/compilercontext.o src/utils/AsmJit/core/compilerfunc.o src/utils/AsmJit/core/compileritem.o src/utils/AsmJit/core/context.o src/utils/AsmJit/core/cpuinfo.o src/utils/AsmJit/core/defs.o src/utils/AsmJit/core/func.o src/utils/AsmJit/core/logger.o src/utils/AsmJit/core/memorymanager.o src/utils/AsmJit/core/memorymarker.o src/utils/AsmJit/core/operand.o src/utils/AsmJit/core/stringbuilder.o src/utils/AsmJit/core/stringutil.o src/utils/AsmJit/core/virtualmemory.o src/utils/AsmJit/core/zonememory.o src/utils/AsmJit/x86/x86assembler.o src/utils/AsmJit/x86/x86compiler.o src/utils/AsmJit/x86/x86compilercontext.o src/utils/AsmJit/x86/x86compilerfunc.o src/utils/AsmJit/x86/x86compileritem.o src/utils/AsmJit/x86/x86cpuinfo.o src/utils/AsmJit/x86/x86defs.o src/utils/AsmJit/x86/x86func.o src/utils/AsmJit/x86/x86operand.o src/utils/AsmJit/x86/x86util.o src/utils/libfat/partition.o src/utils/libfat/cache.o src/utils/libfat/directory.o src/utils/libfat/disc.o src/utils/libfat/fatdir.o src/utils/libfat/fatfile.o src/utils/libfat/filetime.o src/utils/libfat/file_allocation_table.o src/utils/libfat/libfat.o src/utils/libfat/libfat_public_api.o src/utils/libfat/lock.o src/libretro-common/rthreads/rthreads.o src/common.o src/utils/dlditool.o src/libretro-common/memmap/memalign.o src/libretro-common/streams/file_stream.o src/libretro-common/features/features_cpu.o src/libretro-common/compat/compat_strl.o src/libretro-common/file/retro_dirent.o src/libretro-common/file/retro_stat.o src/libretro-common/file/file_path.o src/libretro-common/string/stdstring.o src/version.o 
src/libretro-common/rthreads/rthreads.o: In function `sthread_create':
src/libretro-common/rthreads/rthreads.c:(.text+0xa3): undefined reference to `pthread_create'
src/libretro-common/rthreads/rthreads.o: In function `sthread_detach':
src/libretro-common/rthreads/rthreads.c:(.text+0x184): undefined reference to `pthread_detach'
src/libretro-common/rthreads/rthreads.o: In function `sthread_join':
src/libretro-common/rthreads/rthreads.c:(.text+0x1a8): undefined reference to `pthread_join'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile.libretro:329: desmume_libretro.so] Error 1
make: Leaving directory '/media/gittings/installed/libretro/libretro-desmume/desmume'
Command exited with non-zero status 2
91.32user 3.34system 0:25.72elapsed 367%CPU (0avgtext+0avgdata 2339680maxresident)k
19576inputs+21168outputs (138major+975714minor)pagefaults 0swaps

Steps to reproduce the bug

  1. Clone desmume.
  2. make -C desmume -f Makefile.libretro

Bisect Results

c0a65728a188a1b1062e8492615a8e389f28ba0a is the first bad commit
commit c0a65728a188a1b1062e8492615a8e389f28ba0a
Author: twinaphex <libretro@gmail.com>
Date:   Wed Jul 5 12:11:02 2017 +0200

    Update to Makefile

:040000 040000 0532d77d364b0cb84c5915468d934c7597ce31ed 041318eb76cff5a0d177647bd1cb8cfb371e4abe M  desmume

c0a65728a188a1b1062e8492615a8e389f28ba0a

Version/Commit

You can find this information under Information/System Information

Environment information