User avatar
Kiste
Posts: 8
Joined: Wed Jun 27, 2012 8:06 pm

Compiling PCSX ReARMed on Arch

Sun Nov 11, 2012 6:08 pm

Hi,

I'm trying to compile PCSX ReARMed (http://notaz.gp2x.de/pcsx_rearmed.php), an ARM optimized PS1 emulator on my Raspberry Pi. But I'm getting errors when gcc tries to link the executable, I think it's caused by missing dependencies. Some people from the forum got it compiled already and did upload their binaries (http://www.raspberrypi.org/phpBB3/viewt ... 35&t=13349), but they seem to be compiled statically so I couldn't check which libraries are used. They say you just have to run

Code: Select all

git clone git://notaz.gp2x.de/~notaz/pcsx_rearmed.git
./configure
make
Here's what I did:

Code: Select all

git clone git://notaz.gp2x.de/~notaz/pcsx_rearmed.git
./configure --sound-drivers="alsa sdl" #default produces oss and sdl plugins, I want alsa and sdl
make
The configure script wanted me to install sdl, ofter installing it there was no error. Output:

Code: Select all

architecture        armv6l
platform            generic
built-in GPU        peops
sound drivers       alsa sdl
plugins             gpu_unai.so gpu_peops.so spunull.so 
C compiler          gcc
C compiler flags     -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result
libraries           -L/usr/lib -lSDL -lpthread -lasound -lpng  -ldl -lm -lz
linker flags        
enable dynarec      no
ARMv7 optimizations no
enable ARM NEON     no
tslib support       no
Now the error part of make:

Code: Select all

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/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/alsa.o plugins/dfsound/sdl.o plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o plugins/gpulib/cspace.o plugins/dfxvideo/gpulib_if.o plugins/cdrcimg/cdrcimg.o plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o frontend/main.o frontend/plugin.o frontend/common/readpng.o frontend/common/fonts.o frontend/linux/plat.o frontend/plat_sdl.o frontend/common/in_sdl.o frontend/menu.o frontend/linux/in_evdev.o frontend/common/input.o frontend/plugin_lib.o  -lpthread -L/usr/lib -lSDL -lpthread -lasound -lpng  -ldl -lm -lz -lasound -Wl,-Map=pcsx.map
plugins/dfsound/spu.o: In function `do_samples':
/home/kiste/pcsx_rearmed/plugins/dfsound/spu.c:756: undefined reference to `mix_chan_rvb'
/home/kiste/pcsx_rearmed/plugins/dfsound/spu.c:758: undefined reference to `mix_chan'
frontend/main.o: In function `emu_set_default_config':
/home/kiste/pcsx_rearmed/frontend/main.c:167: undefined reference to `new_dynarec_hacks'
/home/kiste/pcsx_rearmed/frontend/main.c:167: undefined reference to `cycle_multiplier'
frontend/main.o: In function `main':
/home/kiste/pcsx_rearmed/frontend/main.c:484: undefined reference to `stop'
libpcsxcore/cdriso.o: In function `playthread':
/home/kiste/pcsx_rearmed/libpcsxcore/cdriso.c:214: undefined reference to `stop'
libpcsxcore/cdrom.o: In function `Check_Shell':
/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:280: undefined reference to `next_interupt'
libpcsxcore/cdrom.o: In function `cdrLidSeekInterrupt':
/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:241: undefined reference to `next_interupt'
libpcsxcore/cdrom.o: In function `AddIrqQueue':
/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:420: undefined reference to `next_interupt'
libpcsxcore/cdrom.o: In function `cdrPlayInterrupt_Autopause':
/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:583: undefined reference to `next_interupt'
libpcsxcore/cdrom.o: In function `cdrInterrupt':
/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:1108: undefined reference to `next_interupt'
libpcsxcore/cdrom.o:/home/kiste/pcsx_rearmed/libpcsxcore/cdrom.c:1350: more undefined references to `next_interupt' follow
libpcsxcore/psxinterpreter.o: In function `intExecute':
/home/kiste/pcsx_rearmed/libpcsxcore/psxinterpreter.c:915: undefined reference to `stop'
libpcsxcore/sio.o: In function `sioWrite8':
/home/kiste/pcsx_rearmed/libpcsxcore/sio.c:257: undefined reference to `next_interupt'
libpcsxcore/new_dynarec/emu_if.o: In function `schedule_timeslice':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:46: undefined reference to `next_interupt'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_shutdown':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:348: undefined reference to `new_dynarec_cleanup'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_clear':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:343: undefined reference to `invalidate_block'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_execute_until':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:312: undefined reference to `new_dyna_start'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_execute':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:320: undefined reference to `stop'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_init':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:264: undefined reference to `new_dynarec_init'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:265: undefined reference to `new_dyna_pcsx_mem_init'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `gteNCLIP_arm'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `gteRTPS_nf_arm'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `gteRTPT_nf_arm'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `psxH_ptr'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `zeromem_ptr'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:291: undefined reference to `zero_mem'
libpcsxcore/new_dynarec/emu_if.o: In function `irq_test':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:75: undefined reference to `pending_exception'
libpcsxcore/new_dynarec/emu_if.o: In function `pcsx_mtc0':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:114: undefined reference to `pending_exception'
libpcsxcore/new_dynarec/emu_if.o: In function `new_dyna_restore':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:145: undefined reference to `new_dyna_pcsx_mem_load_state'
libpcsxcore/new_dynarec/emu_if.o: In function `ari64_reset':
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:296: undefined reference to `new_dyna_pcsx_mem_reset'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:297: undefined reference to `invalidate_all_pages'
/home/kiste/pcsx_rearmed/libpcsxcore/new_dynarec/emu_if.c:299: undefined reference to `pending_exception'
frontend/menu.o: In function `menu_sync_config':
/home/kiste/pcsx_rearmed/frontend/menu.c:188: undefined reference to `cycle_multiplier'
frontend/menu.o: In function `romsel_run':
/home/kiste/pcsx_rearmed/frontend/menu.c:1835: undefined reference to `new_dynarec_clear_full'
frontend/menu.o:(.data+0xa54): undefined reference to `new_dynarec_hacks'
frontend/menu.o:(.data+0xa80): undefined reference to `new_dynarec_hacks'
frontend/menu.o:(.data+0xaac): undefined reference to `new_dynarec_hacks'
frontend/menu.o:(.rodata+0x2e8): undefined reference to `new_dynarec_hacks'
frontend/plugin_lib.o: In function `watchdog_thread':
/home/kiste/pcsx_rearmed/frontend/plugin_lib.c:530: undefined reference to `stop'
frontend/plugin_lib.o: In function `update_analogs':
/home/kiste/pcsx_rearmed/frontend/plugin_lib.c:271: undefined reference to `new_dynarec_did_compile'
/home/kiste/pcsx_rearmed/frontend/plugin_lib.c:271: undefined reference to `stop'
collect2: error: ld returned 1 exit status
make: *** [pcsx] Error 1
I don't have many packages installed on my SD card, just Arch Linux ARM with xorg, spectrwm as window manager, urxvt as terminal, the base-devel group, mupdf and sxiv. Everything is up to date.
Did someone already compile this on Arch? Or does anyone know what is causing these "undefined reference" errors?

I hope you could understand my English and are able to help me :-)

User avatar
Kiste
Posts: 8
Joined: Wed Jun 27, 2012 8:06 pm

Re: Compiling PCSX ReARMed on Arch

Wed Nov 21, 2012 3:14 pm

Hi,

I know where the mistake was :)
The way the Makefile is checking if it's compiling on ARM or not isn't working on Arch, beacause Arch's gcc is armv6l and Raspbian's should be arm only (correct me if I'm wrong!)
So after making some differences to the Makefile PCSX was compiling :D

Regards,
Kiste

steev
Posts: 87
Joined: Fri Jan 27, 2012 5:08 pm

Re: Compiling PCSX ReARMed on Arch

Wed Nov 28, 2012 10:50 am

Thank you, that helped :)

Now I'm stuck on this error:

Code: Select all

as   -o libpcsxcore/gte_arm.o libpcsxcore/gte_arm.s
libpcsxcore/gte_arm.s: Assembler messages:
libpcsxcore/gte_arm.s:161: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:162: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:163: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:164: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:165: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:197: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:201: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:202: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:228: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:229: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:234: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:235: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:236: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:262: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:265: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:266: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:433: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:509: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:510: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:511: Error: non-constant expression in ".if" statement
libpcsxcore/gte_arm.s:512: Error: non-constant expression in ".if" statement
make: *** [libpcsxcore/gte_arm.o] Error 1
Any ideas?

grimpirate
Posts: 40
Joined: Fri Oct 19, 2012 6:16 pm

Re: Compiling PCSX ReARMed on Arch

Sun Dec 02, 2012 4:12 am

This may have an obvious answer, but isn't there a pacman package already available for pcsx?

Code: Select all

pacman -S pcsxr
Or is there some reason you're compiling it from source?

steev
Posts: 87
Joined: Fri Jan 27, 2012 5:08 pm

Re: Compiling PCSX ReARMed on Arch

Sun Dec 02, 2012 9:13 am

I could not find that package in the Arch Linux ARM repos.

I ended up just compiling it on Raspbian and copying the binaries over to Arch/

grimpirate
Posts: 40
Joined: Fri Oct 19, 2012 6:16 pm

Re: Compiling PCSX ReARMed on Arch

Mon Dec 03, 2012 3:22 am

My apologies, I just realized that it's available for arm v5 and arm v7, not for arm v6 which is the RasPi's architecture.

Return to “Arch”

Who is online

Users browsing this forum: No registered users and 2 guests