notaz / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
405 stars 212 forks source link

pcsx_rearmed cannot build on debian armhf #175

Closed usama-makhzoum closed 3 years ago

usama-makhzoum commented 3 years ago

i have debian unstable distribution installed as chroot in my tablet. cloned master and configured it, then i faced this compilation errors when trying to make:

gcc -o pcsx libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/debug.o libpcsxcore/decode_xa.o libpcsxcore/disr3000a.o libpcsxcore/mdec.o libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o libpcsxcore/gte_arm.o libpcsxcore/gte_neon.o libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o libpcsxcore/new_dynarec/pcsxmem.o libpcsxcore/new_dynarec/emu_if.o plugins/dfsound/dma.o plugins/dfsound/freeze.o plugins/dfsound/registers.o plugins/dfsound/spu.o plugins/dfsound/out.o plugins/dfsound/nullsnd.o plugins/dfsound/arm_utils.o plugins/dfsound/oss.o plugins/dfsound/alsa.o plugins/dfsound/sdl.o plugins/dfsound/pulseaudio.o plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o plugins/cdrcimg/cdrcimg.o plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o frontend/cspace.o frontend/cspace_neon.o frontend/libpicofe/in_sdl.o frontend/libpicofe/plat_sdl.o frontend/libpicofe/plat_dummy.o frontend/libpicofe/linux/in_evdev.o frontend/plat_sdl.o frontend/libpicofe/gl.o frontend/libpicofe/gl_platform.o frontend/plugin_lib.o frontend/libpicofe/linux/plat.o frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o frontend/libpicofe/arm/neon_scale2x.o frontend/libpicofe/arm/neon_eagle2x.o frontend/menu.o frontend/libpicofe/input.o frontend/main.o frontend/plugin.o -L/usr/lib/arm-linux-gnueabihf -lSDL -lpulse -lasound -lpng -ldl -lm -lpthread -lz -lasound -lEGL -lGLESv1_CM -Wl,-Map=pcsx.map /usr/bin/ld: libpcsxcore/new_dynarec/linkage_arm.o:(.bss+0x5c): multiple definition ofpsxRegs'; libpcsxcore/r3000a.o:/home//Downloads/pcsx_rearmed/libpcsxcore/r3000a.c:30: first defined here /usr/bin/ld: libpcsxcore/new_dynarec/linkage_arm.o:(.bss+0x374): multiple definition of `rcnts'; libpcsxcore/psxcounters.o:/home//Downloads/pcsx_rearmed/libpcsxcore/psxcounters.c:71: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:253: pcsx] Error 1 `

i played a little with some source files and removed extern modifiers in some header files to keep gcc going. it is working after this hack but i wonder is it related only to gnu gcc ?

notaz commented 3 years ago

It used to rely on gcc's merging of multiple definitions into a single one, which newer gcc no longer allows. I think this was fixed by one of @gameblabla's recent changes.