Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: omegaman on June 17, 2015, 06:59:33 AM

Title: Compiling retroarch on raspberry pi2
Post by: omegaman on June 17, 2015, 06:59:33 AM
Someone should have warned me that compiling retroacrh and all of its cores on the pi2 would be ridiculously long. I found a workaround but jeez... Thanks nitro for allowing me to jump down the rabbit hole.
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 19, 2015, 05:31:18 AM
Lol!
I choose unwisely once also with the retro pie script.
Consider it a right of passage.  ;D

Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 19, 2015, 06:09:26 AM
Nitro-

I am going to try your image today - might as well give it ago.
Title: Re: Compiling retroarch on raspberry pi2
Post by: verion on June 19, 2015, 06:14:22 AM
Can you check out if any of Luke-Nukem's shaders are working under RPi2?

https://github.com/Luke-Nukem/attract-extra/tree/master/layouts/shaders/full-shaders

CRT-Geom is the least resource hungry - I think.

You'll need
CRT-geom.vsh
CRT-geom_rgb32_dir.fsh
files.
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 20, 2015, 05:06:09 AM
Just warning to you guys:
Emulation under xwindows with sdl 1.2 enabled games is rough because it doesn't support hardware acceleration.
At least with advmame.

Retroarch may be better since I don't think it uses sdl.
Title: Re: Compiling retroarch on raspberry pi2
Post by: verion on June 20, 2015, 05:33:22 AM
I was using mame4all-pi on RPi (1st rev.) and all roms that I've tried was working flawlessly (about 10 roms)
http://sourceforge.net/projects/mame4allpi/files/

But I wasn't using any shaders just a simple scaler.

I believe this is the same mame emu that retroarch is using.
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 20, 2015, 12:56:11 PM
I was using mame4all-pi on RPi (1st rev.) and all roms that I've tried was working flawlessly (about 10 roms)
http://sourceforge.net/projects/mame4allpi/files/

But I wasn't using any shaders just a simple scaler.

I believe this is the same mame emu that retroarch is using.

IDK, i've read that libretro core has less compatability. not sure.
I'm retro-arch stupid. LOL!
I compile libretro .78 on my rpi2 and every game I ran, it only ran once then stopped launching. :)

hey, can you try indiana jones and the temple of doom?
I like that game but it doesn't work in mame4all pi.
it luanches but wont register coins.
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 23, 2015, 08:37:44 AM
nitro-

Help!!! Ok, I am ready to fall on the sword. So, I was trying different distros on the pi including your image (great job btw) and decided to do things the hard way. So, I reinstalled raspbian and started all the compile work again. First, I compiled Retroarch  and the libretro cores that I wanted etc. And everything worked fantastic.

Next, I started with FFMpeg then SFML. SFML was giving me some issues, so I read the thread with raygun and you discussing compiling it. So, I git clone raygun's repository and so forth. What do you know, SFML compiled just fine now. Ready to start next step.

This is where the fun begins. I compile Attract and install it and everything looks good. I go to run ./attract and I get the error that one of the SFML grahics 2.3 is not shareable or something along those lines. At this point I'm like what the WTF it compiled with no errors. I'm like, OK let me remake with a clean build this time. Again same error.  I rinse and repeat with SFML and attract with same result. Now, I am reaching the point of insanity because I repeating the same thing over again expecting a different result. Defeated, I reboot because what-else is there to do.

More fun, after reboot I go to login again. "Hell no!" you're not logging in. I'm like hmm, what is going on here. Some how magically my password doesn't work anymore. "Oh my", let me check the caps loc, nope, nothing wrong here. So, now panic mode is starting to set in.

One last try of heroics. Maybe, I can edit the sdcard boot cmdline.txe file on my PC then put it back in my pi where the sun doesn't shine. Passwd change shows successful and I sync and reboot. Guess what? I still can't login even though the passwd change was successful.     

All that work, is now going into the bit bucket. Sigh, how could this even happen. I need a sanity check...     
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 23, 2015, 09:03:11 AM
Update, I was able to finally reset the password and login again. I still have no clue how this could even happen.
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 23, 2015, 11:06:00 AM
Ok, if I run ldd on attract, here is what I get. So, I edited the ld.so.conf with /usr/local/lib that has the sfml libraries.

/usr/local/bin# ldd /usr/local/bin/attract
   /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x76fc4000)
   libsfml-graphics.so.2.3 => not found
   libsfml-window.so.2.3 => not found
   libsfml-network.so.2.3 => not found
   libsfml-system.so.2.3 => not found
   libasound.so.2 => /usr/lib/arm-linux-gnueabihf/libasound.so.2 (0x76eee000)
   libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76ecf000)
   libopenal.so.1 => /usr/lib/arm-linux-gnueabihf/libopenal.so.1 (0x76e7b000)
   librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76e6c000)
   libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76d9a000)
   libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76d29000)
   libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76d00000)
   libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76ce1000)
   libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76bb1000)
   libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76ba6000)
   /lib/ld-linux-armhf.so.3 (0x76fd1000)
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 23, 2015, 11:23:30 AM
And, now...  Same error even though it sees the libraries.

oot@raspberrypi:~# ldd /usr/local/bin/attract
   /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x76f13000)
   libsfml-graphics.so.2.3 => /usr/local/lib/libsfml-graphics.so.2.3 (0x76ed4000)
   libsfml-window.so.2.3 => /usr/local/lib/libsfml-window.so.2.3 (0x76eab000)
   libsfml-network.so.2.3 => /usr/local/lib/libsfml-network.so.2.3 (0x76e8e000)
   libsfml-system.so.2.3 => /usr/local/lib/libsfml-system.so.2.3 (0x76e7c000)
   libasound.so.2 => /usr/lib/arm-linux-gnueabihf/libasound.so.2 (0x76da6000)
   libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76d87000)
   libopenal.so.1 => /usr/lib/arm-linux-gnueabihf/libopenal.so.1 (0x76d33000)
   librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76d24000)
   libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76c52000)
   libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76be1000)
   libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76bb8000)
   libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76b99000)
   libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76a69000)
   libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0x76a09000)
   libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0x769fb000)
   libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0x769dd000)
   libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x768c9000)
   libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0x768b3000)
   libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x7682a000)
   libjpeg.so.8 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.8 (0x767ef000)
   libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x767cf000)
   libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0x767c6000)
   libxcb-image.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-image.so.0 (0x767ba000)
   libxcb-randr.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-randr.so.0 (0x767aa000)
   libudev.so.0 => /lib/arm-linux-gnueabihf/libudev.so.0 (0x76795000)
   libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76789000)
   /lib/ld-linux-armhf.so.3 (0x76f20000)
   libglapi.so.0 => /usr/lib/arm-linux-gnueabihf/libglapi.so.0 (0x76762000)
   libXdamage.so.1 => /usr/lib/arm-linux-gnueabihf/libXdamage.so.1 (0x76758000)
   libXfixes.so.3 => /usr/lib/arm-linux-gnueabihf/libXfixes.so.3 (0x7674b000)
   libxcb-glx.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-glx.so.0 (0x76732000)
   libXxf86vm.so.1 => /usr/lib/arm-linux-gnueabihf/libXxf86vm.so.1 (0x76724000)
   libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0x76712000)
   libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0x76705000)
   libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0x766dd000)
   libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x766d3000)
   libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x766c6000)
   libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0x766bb000)
   libxcb-util.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-util.so.0 (0x766ae000)
root@raspberrypi:~#
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 23, 2015, 07:22:04 PM

Did you try sudo ldconfig ?
This registers the libraries on the system.
I know you edited the location but I always just ran the ldconfig command.
Sometimes it doesn't do it automatically when you install them in the system.

Also I believe attractmode looks for the sfml files in usr/local/share  (dev libs location) I think. so if they ended up there properly you would of gotten a good compile of AM.

I assume you ran sudo make install after compiling sfml?
Did you check /usr/local/lib to see if the sfml libs are actually there?

FYI I'm away from my rpi so going by memory.
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 24, 2015, 06:20:13 AM
Yes, I did a make install afterwards. I think what happened was my system got corrupted because weird things started to happen. Anyway, I started from scratch again. I got retroarch and FFmpeg installed last night. Now, I'm doing SFML but ran into some depend issues. Sorting that out now.
Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 24, 2015, 07:20:49 AM
NItro-

Success! You were right about ldconfig. I didn't update the SFML libs. I basically got to the same point with the same error. I could gouge my own eyes out. :p I could have saved my self some time if I would have followed Raygun's wiki. Lessons learned, and I needed to brush up on my Linux skills anyway. One thing is for sure though, even without doing ldconfig my system somehow got corrupted and I think the rights of /usr/libs got out of whack.

Question, where are you loading the attact config files? /home/pi/.config? 
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 24, 2015, 05:13:04 PM
nice.
one good way to learn this stuff is to beat your head against the wall then ask online. LOL!

i'm using dietpi so i'm in home/.attract for my config.
just like on a regular linux PC.



Title: Re: Compiling retroarch on raspberry pi2
Post by: omegaman on June 26, 2015, 02:36:05 PM
I got say, I am loving the raspberry pi right now. All my nes, snes stuff runs great with the libretrocores. Setting up all the different retroarch configs for it was a little tedious but not too bad. I'm going to try the mame libretrocores tonight and see how they perform. One step closer to modding an old nes console for my pi project. I'll have to post some pictures when I'm done.
Title: Re: Compiling retroarch on raspberry pi2
Post by: nitrogen_widget on June 26, 2015, 06:04:15 PM
I got say, I am loving the raspberry pi right now. All my nes, snes stuff runs great with the libretrocores. Setting up all the different retroarch configs for it was a little tedious but not too bad. I'm going to try the mame libretrocores tonight and see how they perform. One step closer to modding an old nes console for my pi project. I'll have to post some pictures when I'm done.

Cant wait until end of the year.
I'll get my CHIP $9 linux computer.
And the Attract mode challenge will begin anew. LOL!