PCSX ReARMed - Compile Errors


10 posts
by dcj123 » Tue Jan 29, 2013 4:27 pm
Hello everyone,

I am trying to compile PCSX ReARMed under Arch Linux on my Raspberry Pi but I am getting a compile error complaining about vchost_config.h missing. Has anyone seen this error before compiling PCSX ReARMed and if so whats the solution? I have all the dependencies I know of installed.

The error:

Code: Select all
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function âvcos_event_signalâ:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:524:8: warning: variable âokâ set but not used [-Wunused-but-set-variable]
In file included from /opt/vc/include/bcm_host.h:50:0,
                 from frontend/libpicofe/gl_platform.c:16:
/opt/vc/include/interface/vmcs_host/vcgencmd.h: At top level:
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory
compilation terminated.
make: *** [frontend/libpicofe/gl_platform.o] Error 1


I got the code with:

Code: Select all
git clone git://notaz.gp2x.de/~notaz/pcsx_rearmed.git
Posts: 36
Joined: Tue Jan 29, 2013 3:59 pm
by techs1200 » Tue Jan 29, 2013 8:08 pm
where does the file vchost_config.h reside on your system?

Code: Select all
sudo find / | grep "vchost_config.h"
Posts: 28
Joined: Thu Jan 24, 2013 7:45 pm
by dcj123 » Tue Jan 29, 2013 9:25 pm
techs1200 wrote:where does the file vchost_config.h reside on your system?

Code: Select all
sudo find / | grep "vchost_config.h"


The file appears in:

Code: Select all
/opt/vc/include/interface/vmcs_host/linux/vchost_config.h


Copying the data to /opt/vc/include/interface/vmcs_host fixed the problem but now I have a new error.

Code: Select all
/usr/bin/ld: frontend/libpicofe/gl_platform.o: undefined reference to symbol 'XGetWindowAttributes'
/usr/bin/ld: note: 'XGetWindowAttributes' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [pcsx] Error 1


Compiling with "make LDFLAGS=-lX11" bypasses that error but than errors out on:

Code: Select all
gcc -o gpuPEOPS.so -Wall -ggdb -O2 -fno-strict-aliasing -ffast-math -I../../include -mfpu=vfp -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wno-unused-result -fPIC -lX11 gpu.c draw_pl.c ../gpulib/gpulib.a
/usr/lib/gcc/armv6l-unknown-linux-gnueabihf/4.7.2/../../../crt1.o: In function `_start':
:(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[1]: *** [gpuPEOPS.so] Error 1
make[1]: Leaving directory `/home/administrator/pcsx_rearmed/plugins/dfxvideo'
make: *** [plugins/dfxvideo/gpu_peops.so] Error 2
Posts: 36
Joined: Tue Jan 29, 2013 3:59 pm
by techs1200 » Tue Jan 29, 2013 10:17 pm
Well, you shouldn't just copy a header file around like you did. You should instead add the directory the missing file was in to your C flags like this:

Code: Select all
-I/opt/vc/include/interface/vmcs_host/linux

But that's just for future reference ;)

As for your current error, an undefined reference in an *.o file is a linker error, so there must be something that is not getting properly linked in...

One more thing, if this code base is linking to X11 then it is probably going to try and use DRI to render, which is not present on the raspberry pi. Are you sure this code creates an EGL window and it uses OpenGL ES?

Ok, another thing, i looked at the website for pcsx rearmed and they mention they are using the NEON instruction set. NEON is not available on rpi, so performance might not be that good once you do get it running...

Sorry I cant help more than that...
Posts: 28
Joined: Thu Jan 24, 2013 7:45 pm
by dcj123 » Tue Jan 29, 2013 10:36 pm
techs1200 wrote:Well, you shouldn't just copy a header file around like you did. You should instead add the directory the missing file was in to your C flags like this:

Code: Select all
-I/opt/vc/include/interface/vmcs_host/linux

But that's just for future reference ;)


Thanks, I'll keep that in mind. I am not new to Linux but new to compiling code.

techs1200 wrote:One more thing, if this code base is linking to X11 then it is probably going to try and use DRI to render, which is not present on the raspberry pi. Are you sure this code creates an EGL window and it uses OpenGL ES?

Ok, another thing, i looked at the website for pcsx rearmed and they mention they are using the NEON instruction set. NEON is not available on rpi, so performance might not be that good once you do get it running...


Well I got it to compile but it only supported a SDL window and it was very, very, VERY small thus rendering any game unplayable. Performance was awesome actually if you can see it, game tested was Silent Hill. Oh well, I was just playing around; its not a huge deal. I like ePSXe on windows anyway.

techs1200 wrote:Sorry I cant help more than that...


I appreciate your time, I guess this is solved. Unplayable but it compiled and I honestly don't know what made it want to compile.
Posts: 36
Joined: Tue Jan 29, 2013 3:59 pm
by steev » Tue Jan 29, 2013 11:11 pm
dcj123 wrote:Well I got it to compile but it only supported a SDL window and it was very, very, VERY small thus rendering any game unplayable. Performance was awesome actually if you can see it, game tested was Silent Hill. Oh well, I was just playing around; its not a huge deal. I like ePSXe on windows anyway.


If you compile the libretro (Retroarch) version you will get full screen.

./configure --platform=libretro
make
mv libretro.so libretro-pcsx_rearmed.so

Then you can run it like:
retroarch -L libretro-pcsx_rearmed.so /path/to/iso

Performance usually isn't that great, but some games (like Resident Evil 2) run very close to full speed.
Posts: 57
Joined: Fri Jan 27, 2012 5:08 pm
by dcj123 » Wed Jan 30, 2013 12:20 am
steev wrote:
dcj123 wrote:Well I got it to compile but it only supported a SDL window and it was very, very, VERY small thus rendering any game unplayable. Performance was awesome actually if you can see it, game tested was Silent Hill. Oh well, I was just playing around; its not a huge deal. I like ePSXe on windows anyway.


If you compile the libretro (Retroarch) version you will get full screen.

./configure --platform=libretro
make
mv libretro.so libretro-pcsx_rearmed.so

Then you can run it like:
retroarch -L libretro-pcsx_rearmed.so /path/to/iso

Performance usually isn't that great, but some games (like Resident Evil 2) run very close to full speed.


Ah, yes I just found a few other threads here and here that says the same thing basically. Unfortunately it didn't compile because of an audio problem, I don't believe libsdl is installed and there isn't one in Arch Linux's ARM repository.

Code: Select all
plugins/dfsound/sdl.o: In function `InitSDL':
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:48: undefined reference to `SDL_WasInit'
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:51: undefined reference to `SDL_Init'
plugins/dfsound/sdl.o: In function `sdl_init':
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:76: undefined reference to `SDL_OpenAudio'
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:92: undefined reference to `SDL_PauseAudio'
plugins/dfsound/sdl.o: In function `InitSDL':
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:49: undefined reference to `SDL_InitSubSystem'
plugins/dfsound/sdl.o: In function `sdl_init':
/home/administrator/pcsx_rearmed/plugins/dfsound/sdl.c:85: undefined reference to `SDL_CloseAudio'
collect2: error: ld returned 1 exit status
make: *** [libretro.so] Error 1


I am going to try this on Debian though, I have two SD cards. As for performance, I am overclocking so that might be why it was fast when it was working.
Posts: 36
Joined: Tue Jan 29, 2013 3:59 pm
by steev » Wed Jan 30, 2013 1:05 am
By any chance are you configuring with --platform=libretro and --sound-drivers=sdl?
I think those 2 options don't work together, let it select the libretro sound driver when building for libretro.
Posts: 57
Joined: Fri Jan 27, 2012 5:08 pm
by dcj123 » Wed Jan 30, 2013 5:45 pm
steev wrote:By any chance are you configuring with --platform=libretro and --sound-drivers=sdl?
I think those 2 options don't work together, let it select the libretro sound driver when building for libretro.


Yes and no, both failed.

I ended up compiling under Raspbian and moving the files over to Arch Linux. RetroArch compiled under Arch Linux though, performance was decent.

Thxs
Posts: 36
Joined: Tue Jan 29, 2013 3:59 pm
by OMightyBuggy » Thu Mar 21, 2013 2:27 am
I used to have this compiled on Raspbian (sd card failed) and for some reason any time I have tried to compile it since, it has not worked. Followed many different versions of instructions and got nothing. Used others recompiled images and they don't even work as half as good as when I compiled my own. Was there a change in the build that broke the build? I have also noticed that other threads have posts from 2011 and 2012 and not much new has been posted.

Keep running into, "make: *** [frontend/libpicofe/gl_platform.o] Error 1". Nothing suggested fixes it on Raspbian.
User avatar
Posts: 21
Joined: Wed Jan 25, 2012 6:52 pm
Location: Mesa, AZ