libretro / parallel-n64

Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.
319 stars 127 forks source link

Odroid xu4 build failed #577

Open bullghost opened 5 years ago

bullghost commented 5 years ago

hi dev, i try build but failed at the end

** BUILDING parallel_n64_libretro.so FOR PLATFORM unix odroid ODROID-XU4 unix ** g++ -o parallel_n64_libretro.so ./gles2rice/src/Blender.o ./gles2rice/src/gSP_rice.o ./gles2rice/src/gDP_rice.o ./gles2rice/src/Combiner.o ./gles2rice/src/RiceConfig.o ./gles2rice/src/ConvertImage16.o ./gles2rice/src/ConvertImage.o ./gles2rice/src/RiceDebugger.o ./gles2rice/src/DecodedMux.o ./gles2rice/src/DeviceBuilder.o ./gles2rice/src/FrameBuffer.o ./gles2rice/src/GraphicsContext.o ./gles2rice/src/OGLCombiner.o ./gles2rice/src/OGLDecodedMux.o ./gles2rice/src/OGLES2FragmentShaders.o ./gles2rice/src/OGLExtCombiner.o ./gles2rice/src/OGLExtRender.o ./gles2rice/src/OGLGraphicsContext.o ./gles2rice/src/OGLRender.o ./gles2rice/src/OGLRenderExt.o ./gles2rice/src/OGLTexture.o ./gles2rice/src/RenderBase.o ./gles2rice/src/Render.o ./gles2rice/src/RenderExt.o ./gles2rice/src/RenderTexture.o ./gles2rice/src/RSP_Parser.o ./gles2rice/src/RSP_S2DEX.o ./gles2rice/src/Texture.o ./gles2rice/src/TextureManager.o ./gles2rice/src/VectorMath.o ./gles2rice/src/Video.o ./Graphics/RSP/gSP_funcs.o ./Graphics/RDP/gDP_funcs.o ./mupen64plus-video-angrylion/interface.o ./mupen64plus-video-angrylion/parallel_al.o ./mupen64plus-video-paraLLEl/parallel.o ./mupen64plus-video-paraLLEl/vi.o ./mupen64plus-video-paraLLEl/rdp.o ./mupen64plus-video-paraLLEl/rdp/vulkan.o ./mupen64plus-video-paraLLEl/rdp/vulkan_util.o ./mupen64plus-video-paraLLEl/rdp/frontend.o ./mupen64plus-video-paraLLEl/rdp/tmem.o ./mupen64plus-video-paraLLEl/rdp/rdp.o ./mupen64plus-video-paraLLEl/rdp/vulkan_symbol_wrapper.o ./libretro-common/libco/libco.o ./mupen64plus-rsp-hle/src/alist.o ./mupen64plus-rsp-hle/src/alist_audio.o ./mupen64plus-rsp-hle/src/alist_naudio.o ./mupen64plus-rsp-hle/src/alist_nead.o ./mupen64plus-rsp-hle/src/audio.o ./mupen64plus-rsp-hle/src/cicx105.o ./mupen64plus-rsp-hle/src/hle.o ./mupen64plus-rsp-hle/src/jpeg.o ./mupen64plus-rsp-hle/src/hle_memory.o ./mupen64plus-rsp-hle/src/mp3.o ./mupen64plus-rsp-hle/src/musyx.o ./mupen64plus-rsp-hle/src/re2.o ./mupen64plus-rsp-hle/src/hle_plugin.o ./mupen64plus-rsp-cxd4/rsp.o ./mupen64plus-core/src/api/callbacks.o ./mupen64plus-core/src/api/common.o ./mupen64plus-core/src/api/config.o ./mupen64plus-core/src/api/frontend.o ./mupen64plus-core/src/api/vidext_libretro.o ./mupen64plus-core/src/main/cheat.o ./mupen64plus-core/src/main/eventloop.o ./mupen64plus-core/src/main/main.o ./mupen64plus-core/src/main/device.o ./mupen64plus-core/src/main/profile.o ./mupen64plus-core/src/main/md5.o ./mupen64plus-core/src/main/rom.o ./mupen64plus-core/src/main/savestates.o ./mupen64plus-core/src/main/util.o ./mupen64plus-core/src/memory/m64p_memory.o ./mupen64plus-core/src/gb/gb_cart.o ./mupen64plus-core/src/si/n64_cic_nus_6105.o ./mupen64plus-core/src/si/pif.o ./mupen64plus-core/src/si/af_rtc.o ./mupen64plus-core/src/si/cic.o ./mupen64plus-core/src/si/eeprom.o ./mupen64plus-core/src/si/game_controller.o ./mupen64plus-core/src/si/mempak.o ./mupen64plus-core/src/si/rumblepak.o ./mupen64plus-core/src/si/transferpak.o ./mupen64plus-core/src/plugin/plugin.o ./mupen64plus-core/src/plugin/get_time_using_C_localtime.o ./mupen64plus-core/src/plugin/rumble_via_input_plugin.o ./mupen64plus-core/src/pifbootrom/pifbootrom.o ./mupen64plus-core/src/r4300/r4300.o ./mupen64plus-core/src/r4300/cached_interp.o ./mupen64plus-core/src/r4300/cp0.o ./mupen64plus-core/src/r4300/cp1.o ./mupen64plus-core/src/r4300/exception.o ./mupen64plus-core/src/r4300/instr_counters.o ./mupen64plus-core/src/r4300/interrupt.o ./mupen64plus-core/src/r4300/mi_controller.o ./mupen64plus-core/src/r4300/pure_interp.o ./mupen64plus-core/src/r4300/r4300_core.o ./mupen64plus-core/src/r4300/recomp.o ./mupen64plus-core/src/r4300/reset.o ./mupen64plus-core/src/r4300/tlb.o ./mupen64plus-core/src/dd/dd_controller.o ./mupen64plus-core/src/dd/dd_rom.o ./mupen64plus-core/src/dd/dd_disk.o ./mupen64plus-core/src/ri/ri_controller.o ./mupen64plus-core/src/ri/rdram.o ./mupen64plus-core/src/ri/rdram_detection_hack.o ./mupen64plus-core/src/si/si_controller.o ./mupen64plus-core/src/vi/vi_controller.o ./mupen64plus-core/src/rdp/rdp_core.o ./mupen64plus-core/src/rdp/fb.o ./mupen64plus-core/src/rsp/rsp_core.o ./mupen64plus-core/src/ai/ai_controller.o ./mupen64plus-core/src/pi/pi_controller.o ./mupen64plus-core/src/pi/sram.o ./mupen64plus-core/src/pi/flashram.o ./mupen64plus-core/src/pi/cart_rom.o ./mupen64plus-core/src/r4300/new_dynarec/new_dynarec.o ./mupen64plus-core/src/r4300/new_dynarec/arm/arm_cpu_features.o ./mupen64plus-core/src/r4300/empty_dynarec.o ./libretro-common/glsm/glsm.o ./libretro/libretro.o ./mupen64plus-core/src/plugin/emulate_game_controller_via_libretro.o ./libretro-common/memmap/memalign.o ./libretro-common/encodings/encoding_crc32.o ./mupen64plus-core/src/plugin/audio_libretro/audio_backend_libretro.o ./libretro-common/file/config_file.o ./libretro-common/file/config_file_userdata.o ./libretro-common/vfs/vfs_implementation.o ./libretro-common/audio/resampler/audio_resampler.o ./libretro-common/audio/resampler/drivers/null_resampler.o ./libretro-common/audio/resampler/drivers/sinc_resampler.o ./libretro-common/audio/resampler/drivers/nearest_resampler.o ./libretro-common/compat/compat_strl.o ./libretro-common/compat/compat_snprintf.o ./libretro-common/compat/compat_strcasestr.o ./libretro-common/compat/compat_posix_string.o ./libretro-common/compat/fopen_utf8.o ./libretro-common/encodings/encoding_utf.o ./libretro-common/audio/conversion/float_to_s16.o ./libretro-common/audio/conversion/s16_to_float.o ./libretro-common/features/features_cpu.o ./libretro-common/streams/file_stream.o ./libretro-common/hash/rhash.o ./libretro-common/lists/string_list.o ./libretro-common/string/stdstring.o ./libretro-common/file/file_path.o ./libretro-common/gfx/gl_capabilities.o ./libretro/brumme_crc.o ./gles2n64/src/3DMath.o ./gles2n64/src/glN64Config.o ./gles2n64/src/Combiner_gles2n64.o ./gles2n64/src/FrameBuffer_gles2n64.o ./gles2n64/src/Hash.o ./gles2n64/src/DepthBuffer.o ./gles2n64/src/F3DEX2CBFD.o ./gles2n64/src/F3D.o ./gles2n64/src/F3DDKR.o ./gles2n64/src/F3DEX2.o ./gles2n64/src/F3DEX.o ./gles2n64/src/F3DPD.o ./gles2n64/src/F3DSWSE.o ./gles2n64/src/F3DWRUS.o ./gles2n64/src/GBI.o ./gles2n64/src/gDP_gles2n64.o ./gles2n64/src/gles2N64.o ./gles2n64/src/gSP_gles2n64.o ./gles2n64/src/L3D.o ./gles2n64/src/L3DEX2.o ./gles2n64/src/L3DEX.o ./gles2n64/src/N64.o ./gles2n64/src/OpenGL.o ./gles2n64/src/RDP.o ./gles2n64/src/gles2n64_rsp.o ./gles2n64/src/S2DEX2.o ./gles2n64/src/S2DEX.o ./gles2n64/src/ShaderCombiner.o ./gles2n64/src/Textures.o ./gles2n64/src/Turbo3D.o ./gles2n64/src/ZSort.o ./gles2n64/src/VI.o ./Graphics/RSP/gSP_funcs_C.o ./Graphics/RSP/gSP_state.o ./Graphics/RDP/gDP_funcs_C.o ./Graphics/RDP/gDP_state.o ./Graphics/RDP/RDP_state.o ./Graphics/RSP/RSP_state.o ./Graphics/3dmaths.o ./Graphics/HLE/Microcode/Fast3D.o ./Graphics/plugins.o ./glide2gl/src/Glide64/glide64_3dmath.o ./glide2gl/src/Glide64/Framebuffer_glide64.o ./glide2gl/src/Glide64/Glide64_Ini.o ./glide2gl/src/Glide64/glidemain.o ./glide2gl/src/Glide64/glide64_util.o ./glide2gl/src/Glide64/Glide64_UCode.o ./glide2gl/src/Glide64/glide64_gSP.o ./glide2gl/src/Glide64/glide64_gDP.o ./glide2gl/src/Glide64/Combine.o ./glide2gl/src/Glide64/TexCache.o ./glide2gl/src/Glide64/MiClWr.o ./glide2gl/src/Glide64/TexLoad.o ./glide2gl/src/Glide64/glide64_rdp.o ./glide2gl/src/Glitch64/glitch64_combiner.o ./glide2gl/src/Glitch64/geometry.o ./glide2gl/src/Glitch64/glitchmain.o ./glide2gl/src/Glitch64/glitch64_textures.o ./mupen64plus-video-angrylion/n64video.o ./mupen64plus-video-angrylion/screen.o ./libretro-common/glsym/glsym_es2.o ./libretro-common/glsym/rglgen.o ./mupen64plus-core/src/r4300/new_dynarec/arm/linkage_arm.o ./libretro-common/audio/conversion/float_to_s16_neon.o ./libretro-common/audio/conversion/s16_to_float_neon.o ./libretro-common/audio/resampler/drivers/sinc_resampler_neon.o -shared -Wl,--no-undefined -Wl,--version-script=./libretro/link.T -pthread -lm -fPIC -lGLESv2 ./mupen64plus-core/src/r4300/recomp.o: In functioninit_block': recomp.c:(.text+0x8874): undefined reference to init_assembler' recomp.c:(.text+0x88c0): undefined reference tofree_assembler' ./mupen64plus-core/src/r4300/recomp.o: In function recompile_block': recomp.c:(.text+0x8fdc): undefined reference topasse2' recomp.c:(.text+0x902c): undefined reference to free_assembler' recomp.c:(.text+0x907c): undefined reference toinit_assembler' ./libretro-common/audio/resampler/drivers/sinc_resampler.o: In function resampler_sinc_process_neon': sinc_resampler.c:(.text+0x3d4): undefined reference toprocess_sinc_neon_asm' ./libretro-common/audio/conversion/float_to_s16.o: In function convert_float_to_s16': float_to_s16.c:(.text+0xac): undefined reference toconvert_float_s16_asm' ./libretro-common/audio/conversion/s16_to_float.o: In function convert_s16_to_float': s16_to_float.c:(.text+0xa0): undefined reference toconvert_s16_float_asm' collect2: error: ld returned 1 exit status Makefile:934: recipe for target 'parallel_n64_libretro.so' failed make: ** [parallel_n64_libretro.so] Error 1 odroid@odroid:~/3rdsource/parallel-n64$ grep -r "init_assembler" ./ ./mupen64plus-core/src/r4300/recomph.h:void init_assembler(void block_jumps_table, int block_jumps_number, void block_riprel_table, int block_riprel_number); ./mupen64plus-core/src/r4300/recomp.c: init_assembler(NULL, 0, NULL, 0); ./mupen64plus-core/src/r4300/recomp.c: init_assembler(block->jumps_table, block->jumps_number, block->riprel_table, block->riprel_number); ./mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.c:void init_assembler(void block_jumps_table, int block_jumps_number, void block_riprel_table, int block_riprel_number) ./mupen64plus-core/src/r4300/empty_dynarec.c:void init_assembler(void block_jumps_table, int block_jumps_number, void *block_riprel_table, int block_riprel_number) `

and i look into Makefile.common i found this : `ifeq ($(WITH_DYNAREC), arm) SOURCES_C += $(CORE_DIR)/src/r4300/new_dynarec/new_dynarec.c \ $(CORE_DIR)/src/r4300/new_dynarec/arm/arm_cpu_features.c

            SOURCES_ASM += \
                    $(CORE_DIR)/src/r4300/new_dynarec/arm/linkage_$(WITH_DYNAREC).S

endif ` maybe those function not registered in $(CORE_DIR)/src/r4300/new_dynarec/new_dynarec.c ?

found out there is 2 issue here

  1. dynarec 2 neon thing : undefined reference to `convert_float_s16_asm'

using latest code with last commit is : 68d89c77c37cb6d3da05245f75ea6f949096da96 no use crosscompile

bullghost commented 5 years ago

i found the cause of second issue the neon thing : undefined reference to `convert_float_s16_asm' its related to the compiling asm object

its at line 947 its will always using this line event not cross compiling $(CC_AS) $(ASFLAGS) -c $< $(OBJOUT)$@ the out put cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -O3 -DNDEBUG -fipa-pta -DGIT_VERSION=\"" 68d89c77"\" -DHAVE_NEON -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./glide2gl/src/Glitch64/inc -I./mupen64plus-core/src -I./mupen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretro -I./libretro-common/include -I./libretro -fPIC -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -marm -mfloat-abi=hard -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mfpu=neon -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DDISABLE_3POINT -c mupen64plus-video-angrylion/screen.c -o mupen64plus-video-angrylion/screen.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -O3 -DNDEBUG -fipa-pta -DGIT_VERSION=\"" 68d89c77"\" -DHAVE_NEON -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./glide2gl/src/Glitch64/inc -I./mupen64plus-core/src -I./mupen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretro -I./libretro-common/include -I./libretro -fPIC -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -marm -mfloat-abi=hard -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mfpu=neon -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DDISABLE_3POINT -c libretro-common/glsym/rglgen.c -o libretro-common/glsym/rglgen.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -c libretro-common/audio/conversion/float_to_s16_neon.S -o libretro-common/audio/conversion/float_to_s16_neon.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -c libretro-common/audio/conversion/s16_to_float_neon.S -o libretro-common/audio/conversion/s16_to_float_neon.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -c libretro-common/audio/resampler/drivers/sinc_resampler_neon.S -o libretro-common/audio/resampler/drivers/sinc_resampler_neon.o

to fix i change it to : $(CC) $(CPPFLAGS) $(CFLAGS) -c $< $(OBJOUT)$@ the output is : cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -O3 -DNDEBUG -fipa-pta -DGIT_VERSION=\"" 68d89c77"\" -DHAVE_NEON -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./glide2gl/src/Glitch64/inc -I./mupen64plus-core/src -I./mupen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretro -I./libretro-common/include -I./libretro -fPIC -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -marm -mfloat-abi=hard -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mfpu=neon -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DDISABLE_3POINT -c libretro-common/audio/conversion/float_to_s16_neon.S -o libretro-common/audio/conversion/float_to_s16_neon.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -O3 -DNDEBUG -fipa-pta -DGIT_VERSION=\"" 68d89c77"\" -DHAVE_NEON -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./glide2gl/src/Glitch64/inc -I./mupen64plus-core/src -I./mupen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretro -I./libretro-common/include -I./libretro -fPIC -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -marm -mfloat-abi=hard -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mfpu=neon -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DDISABLE_3POINT -c libretro-common/audio/conversion/s16_to_float_neon.S -o libretro-common/audio/conversion/s16_to_float_neon.o cc -DHAVE_RICE -DHAVE_GLN64 -DHAVE_GLIDE64 -DHAVE_PARALLEL -MMD -DINLINE="inline" -O3 -DNDEBUG -fipa-pta -DGIT_VERSION=\"" 68d89c77"\" -DHAVE_NEON -D__LIBRETRO__ -DM64P_PLUGIN_API -DM64P_CORE_PROTOTYPES -D_ENDUSER_RELEASE -DSINC_LOWER_QUALITY -I./glide2gl/src/Glitch64/inc -I./mupen64plus-core/src -I./mupen64plus-core/src/api -I./include -I./mupen64plus-core/src/plugin/audio_libretro -I./libretro-common/include -I./libretro -fPIC -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -marm -mfloat-abi=hard -march=armv7ve -mcpu=cortex-a15.cortex-a7 -mfpu=neon -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DDISABLE_3POINT -c libretro-common/audio/resampler/drivers/sinc_resampler_neon.S -o libretro-common/audio/resampler/drivers/sinc_resampler_neon.o need to add condition to checking is it cross compiling or not i thing for this issue

bullghost commented 5 years ago

so the 1st issue about dynarec iam need help here how to use it, by now my solution is not use it, by set WITH_DYNAREC to empty

ghost commented 4 years ago

I have the same problem on rpi4