Author Topic: raspberry pi 2  (Read 29557 times)

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
raspberry pi 2
« on: February 03, 2015, 10:18:05 AM »
I bet attract mode will run on the new quad core rpi providing the version of Ubuntu for arm 7 has sfml.

I have mine on order.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: raspberry pi 2
« Reply #1 on: February 03, 2015, 01:59:33 PM »
Not only that but it's my understanding the new pi 2 will run windows 10. I am thinking about picking up one myself. Hard to beat the price and the performance is not too shabby.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #2 on: February 21, 2015, 12:19:11 PM »
mine finally came in.
I loaded up a bare debian jessie image & attempted to compile attract mode but i'm pretty sure i need to do something with the compiler/make file to get it to work because it errors out.

Code: [Select]
root@jessie-rpi:/home/mame/attract-1.4.1# make
g++ -o attract obj/fe_base.o obj/fe_util.o obj/fe_util_sq.o obj/fe_info.o obj/fe_input.o obj/fe_xml.o obj/fe_settings.o obj/fe_build.o obj/fe_config.o obj/fe_presentable.o obj/fe_present.o obj/sprite.o obj/fe_image.o obj/fe_sound.o obj/fe_shader.o obj/fe_overlay.o obj/fe_window.o obj/tp.o obj/fe_text.o obj/fe_listbox.o obj/fe_vm.o obj/main.o obj/media.o obj/libexpat.a obj/libsquirrel.a obj/libsqstdlib.a obj/libaudio.a  -DDATA_PATH=\"/usr/local/share/attract/\" -O2 -Iextlibs/audio/include -I/usr/include/AL  -Iextlibs/expat -Iextlibs/squirrel/include -Iextlibs/sqrat/include  -DUSE_AVRESAMPLE -lsfml-graphics -lsfml-window -lsfml-network -lsfml-system -lavformat -lavcodec -lavutil -lswscale -lopenal -lavresample
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc_s.so.1: invalid string offset 27827 >= 20347 for section `.dynstr'
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc_s.so.1: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:255: recipe for target 'attract' failed
make: *** [attract] Error 1

I get an error trying to run the configure script for advmame .106 also.
It tell me compiler can't make executables.

Think i'll go the raspbian route & try to add the jessie respository next.

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: raspberry pi 2
« Reply #3 on: February 22, 2015, 12:12:17 PM »
That will be cool if you can get it to work nitrogen... Unless you are using glshim or the latest version of SFML (2.2) compiled for openGL ES I'm not sure how well things will work though when you hit the graphic processor.  I understand the 2 has the same graphics processor stuff as in the raspberry pi 1.
« Last Edit: March 06, 2015, 11:11:36 PM by raygun »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #4 on: February 22, 2015, 06:33:40 PM »

My research has discovered attractmode is running well on the open pandora board.
I thought the version in jessie arm was 2.2.
I'll have time to look at it this week after I get raspbian installed.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #5 on: March 05, 2015, 05:13:19 PM »
So, updating my rpi2 to jessie raspbian.
for the last day & a half.  :o

I really don't want to attempt compiling sfml on raspbian so it's worth the wait. :)
I found a simple compile guide for glshim.

if that works i'll go for attract.
« Last Edit: March 05, 2015, 05:14:50 PM by nitrogen_widget »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #6 on: March 05, 2015, 08:25:58 PM »
ok,
latest GLSHIM and attract-mode actually works.
sort of.
AM without glshim looks good but is dog slow to the point of un-usable.
AM with glshim flies.
but, at launch there are all kinds of errors about missing openGL calls and the fonts are all messed up to the point where it looks like gibberish and blank spaces.

so, I decided to compile SFML 2.2 with opengl es.
That actually compiled.
but when I try to compile attract mode with it I get these errors which I think is because opengl doesn't exist on the rpi?

Quote
//lib/libsfml-graphics.so: undefined reference to `glFramebufferTexture2DOES'
//lib/libsfml-graphics.so: undefined reference to `glGenRenderbuffersOES'
//lib/libsfml-graphics.so: undefined reference to `glCheckFramebufferStatusOES'
//lib/libsfml-graphics.so: undefined reference to `glBlendEquationSeparateOES'
//lib/libsfml-graphics.so: undefined reference to `glBindFramebufferOES'
//lib/libsfml-graphics.so: undefined reference to `glRenderbufferStorageOES'
//lib/libsfml-graphics.so: undefined reference to `glDeleteRenderbuffersOES'
//lib/libsfml-graphics.so: undefined reference to `glFramebufferRenderbufferOES'
//lib/libsfml-graphics.so: undefined reference to `glBindRenderbufferOES'
//lib/libsfml-graphics.so: undefined reference to `glDeleteFramebuffersOES'
//lib/libsfml-graphics.so: undefined reference to `glGenFramebuffersOES'
//lib/libsfml-graphics.so: undefined reference to `glBlendFuncSeparateOES'
collect2: error: ld returned 1 exit status
Makefile:259: recipe for target 'attract' failed
make: *** [attract] Error 1

so, back to square one.
After I put SFML2.1 back on my rpi i'll post the errors I get with GLSHIM.
« Last Edit: March 05, 2015, 08:31:28 PM by nitrogen_widget »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #7 on: March 05, 2015, 08:50:26 PM »
Here is what I see when I launch AM with GLSHIM
Quote
pi@raspberrypi ~/Downloads/attract-1.5.1 $ LD_LIBRARY_PATH=/lib LIBGL_FB=1 attract
Starting Attract-Mode 1.5.1 (Linux)
Config: /home/pi/.attract/attract.cfg

*** Initializing display: 'daphne'
 - Loaded master romlist 'mame' in 7 ms (185 entries kept, 0 discarded)
 - Constructed 2 filters in 5 ms (370 comparisons)
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
libGL: built on Mar  6 2015 01:56:54
libGL: framebuffer output enabled
libGL backend: libGLESv1_CM.so
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
libGL: unknown attrib 100000
libGL: unknown attrib 100001
glXSwapInterval(0)
Enable LIBGL_VSYNC=1 if you want to use vsync.
glXSwapInterval(1)
Enable LIBGL_VSYNC=1 if you want to use vsync.
glXGetProcAddress: glCopyTexSubImage3D not found.
glXGetProcAddress: glDrawRangeElements not found.
glXGetProcAddress: glTexSubImage3D not found.
glXGetProcAddress: glCompressedTexImage1D not found.
glXGetProcAddress: glCompressedTexImage3D not found.
glXGetProcAddress: glCompressedTexSubImage1D not found.
glXGetProcAddress: glCompressedTexSubImage3D not found.
glXGetProcAddress: glGetCompressedTexImage not found.
glXGetProcAddress: glLoadTransposeMatrixd not found.
glXGetProcAddress: glLoadTransposeMatrixf not found.
glXGetProcAddress: glMultTransposeMatrixd not found.
glXGetProcAddress: glMultTransposeMatrixf not found.
glXGetProcAddress: glBlendColor not found.
glXGetProcAddress: glBlendEquation not found.
glXGetProcAddress: glFogCoordPointer not found.
glXGetProcAddress: glMultiDrawArrays not found.
glXGetProcAddress: glMultiDrawElements not found.
glXGetProcAddress: glPointParameteri not found.
glXGetProcAddress: glPointParameteriv not found.
glXGetProcAddress: glSecondaryColorPointer not found.
glXGetProcAddress: glWindowPos2d not found.
glXGetProcAddress: glWindowPos2dv not found.
glXGetProcAddress: glWindowPos2f not found.
glXGetProcAddress: glWindowPos2fv not found.
glXGetProcAddress: glWindowPos2i not found.
glXGetProcAddress: glWindowPos2iv not found.
glXGetProcAddress: glWindowPos2s not found.
glXGetProcAddress: glWindowPos2sv not found.
glXGetProcAddress: glWindowPos3d not found.
glXGetProcAddress: glWindowPos3dv not found.
glXGetProcAddress: glWindowPos3f not found.
glXGetProcAddress: glWindowPos3fv not found.
glXGetProcAddress: glWindowPos3i not found.
glXGetProcAddress: glWindowPos3iv not found.
glXGetProcAddress: glWindowPos3s not found.
glXGetProcAddress: glWindowPos3sv not found.
glXGetProcAddress: glMultiTexCoord1dARB not found.
glXGetProcAddress: glMultiTexCoord1dvARB not found.
glXGetProcAddress: glMultiTexCoord1fARB not found.
glXGetProcAddress: glMultiTexCoord1fvARB not found.
glXGetProcAddress: glMultiTexCoord1iARB not found.
glXGetProcAddress: glMultiTexCoord1ivARB not found.
glXGetProcAddress: glMultiTexCoord1sARB not found.
glXGetProcAddress: glMultiTexCoord1svARB not found.
glXGetProcAddress: glMultiTexCoord2dARB not found.
glXGetProcAddress: glMultiTexCoord2dvARB not found.
glXGetProcAddress: glMultiTexCoord2iARB not found.
glXGetProcAddress: glMultiTexCoord2ivARB not found.
glXGetProcAddress: glMultiTexCoord2sARB not found.
glXGetProcAddress: glMultiTexCoord2svARB not found.
glXGetProcAddress: glMultiTexCoord3dARB not found.
glXGetProcAddress: glMultiTexCoord3dvARB not found.
glXGetProcAddress: glMultiTexCoord3fARB not found.
glXGetProcAddress: glMultiTexCoord3fvARB not found.
glXGetProcAddress: glMultiTexCoord3iARB not found.
glXGetProcAddress: glMultiTexCoord3ivARB not found.
glXGetProcAddress: glMultiTexCoord3sARB not found.
glXGetProcAddress: glMultiTexCoord3svARB not found.
glXGetProcAddress: glMultiTexCoord4dARB not found.
glXGetProcAddress: glMultiTexCoord4dvARB not found.
glXGetProcAddress: glMultiTexCoord4iARB not found.
glXGetProcAddress: glMultiTexCoord4ivARB not found.
glXGetProcAddress: glMultiTexCoord4sARB not found.
glXGetProcAddress: glMultiTexCoord4svARB not found.
glXGetProcAddress: glSecondaryColorPointerEXT not found.
glXGetProcAddress: glXCreateNewContext not found.
glXGetProcAddress: glXCreatePbuffer not found.
glXGetProcAddress: glXCreatePixmap not found.
glXGetProcAddress: glXDestroyPbuffer not found.
glXGetProcAddress: glXDestroyPixmap not found.
glXGetProcAddress: glXGetCurrentReadDrawable not found.
glXGetProcAddress: glXGetSelectedEvent not found.
glXGetProcAddress: glXMakeContextCurrent not found.
glXGetProcAddress: glXQueryContext not found.
glXGetProcAddress: glXQueryDrawable not found.
glXGetProcAddress: glXSelectEvent not found.
 - Loaded layout: /usr/local/share/attract/layouts/basic/ (layout.nut)
ERROR: EGL Error detected: EGL_BAD_CONTEXT (0x3006)
Failed to destroy EGL context.
Failed to destroy EGL context.

This is what AM looks like after launch.
« Last Edit: March 05, 2015, 09:16:44 PM by nitrogen_widget »

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: raspberry pi 2
« Reply #8 on: March 06, 2015, 11:15:24 PM »
that's too bad glshim doesn't seem to work.  One other thing I was thinking might work would be to try installing wayland http://wayland.freedesktop.org/ which I understand has had some work done on it to tie into the raspberry pi's graphics hardware.  You should then be able to run attractmode using xwayland.... 

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #9 on: March 07, 2015, 08:18:25 AM »
that's too bad glshim doesn't seem to work.  One other thing I was thinking might work would be to try installing wayland http://wayland.freedesktop.org/ which I understand has had some work done on it to tie into the raspberry pi's graphics hardware.  You should then be able to run attractmode using xwayland....

Ill look at that.
but i'm not even sure it runs on the rpi yet.

i wish I knew what graphics.so problem was with the source and what was different between with the arm version.

I registered on the open pandora forums and see if the guy who got attractmode running with glshim on that will help me out.

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: raspberry pi 2
« Reply #10 on: March 09, 2015, 10:30:37 PM »
I registered on the open pandora forums and see if the guy who got attractmode running with glshim on that will help me out.

I hope so, it would be great to get this working finally on the pi

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: raspberry pi 2
« Reply #11 on: March 21, 2015, 11:00:59 PM »
Hey nitrogen_widget,

I've got attract-mode up and running now on my raspberry pi (original B) with the most recent raspbian wheezy.  I was horsing around with the hello_triangle raspberry pi sample code and SFML and surprise of surprises I was able to get something that actually seems to work!

So if you can bring yourself to trying to compile sfml again, try using the code from my SFML repository:

https://github.com/mickelson/SFML/tree/rpi

The cmake command to set things up should look something like this:

Code: [Select]
cmake -DEGL_INCLUDE_DIR=/opt/vc/include -DEGL_LIBRARY=/opt/vc/lib/libEGL.so -DFREETYPE_INCLUDE_DIR_freetype2=/usr/include -DFREETYPE_INCLUDE_DIR_ft2build=/usr/include/freetype2 -DGLES_INCLUDE_DIR=/opt/vc/include -DGLES_LIBRARY=/opt/vc/lib/libGLESv1_CM.so -DSFML_BCMHOST=1 .

Do a make and a sudo make install after that and you should be able to build and run attract-mode with no further changes.

video playback is painful for me since the decoding is still in software ... you might get better results with your pi 2 though.

*** Edit: updated link to the "rpi" branch of mickelson/sfml
« Last Edit: December 03, 2015, 10:28:24 PM by raygun »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #12 on: March 22, 2015, 06:49:50 AM »
AWESOME!
Someone did get back to me from the open pandora forum but since they didn't have an RPI and their pandora code wouldn't work for me and I had no clue how to make it work for me i was kinda dead in the water.

I'll compile it up tonight and let you know.

But question, what about .mng videos?
Those seem to run fine on my rpi 1 with advmenu.

« Last Edit: March 22, 2015, 06:58:00 AM by nitrogen_widget »

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: raspberry pi 2
« Reply #13 on: March 22, 2015, 09:49:28 AM »
SFML compiled fine after i installed a few more dependencies.
but when I tried to compile AM I get this.

Quote
pi@raspberrypi ~/Downloads/attract-1.5.1 $ make -j5
g++ -o attract obj/fe_base.o obj/fe_util.o obj/fe_util_sq.o obj/fe_info.o obj/fe_input.o obj/fe_romlist.o obj/fe_xml.o obj/fe_settings.o obj/fe_build.o obj/fe_config.o obj/fe_presentable.o obj/fe_present.o obj/sprite.o obj/fe_image.o obj/fe_sound.o obj/fe_shader.o obj/fe_overlay.o obj/fe_window.o obj/tp.o obj/fe_text.o obj/fe_listbox.o obj/fe_vm.o obj/main.o obj/media.o obj/libsquirrel.a obj/libsqstdlib.a obj/libaudio.a  -DDATA_PATH=\"/usr/local/share/attract/\" -O2 -Iextlibs/audio/include -I/usr/include/freetype2 -I/usr/include/AL  -Iextlibs/squirrel/include -Iextlibs/sqrat/include  -DUSE_FONTCONFIG -DUSE_AVRESAMPLE -lsfml-graphics -lsfml-window -lsfml-network -lsfml-system -lfontconfig -lfreetype -lavformat -lavcodec -lavutil -lswscale -lopenal -lavresample  -lexpat
obj/fe_image.o: In function `FeTextureContainer::fix_masked_image()':
fe_image.cpp:(.text+0x1190): undefined reference to `sf::Image::~Image()'
fe_image.cpp:(.text+0x11ac): undefined reference to `sf::Image::~Image()'
obj/fe_window.o: In function `FeWindow::initial_create()':
fe_window.cpp:(.text+0x1e4): undefined reference to `sf::Window::setSize(sf::Vector2<unsigned int> const&)'
obj/main.o: In function `main':
main.cpp:(.text.startup+0x630): undefined reference to `sf::Image::~Image()'
main.cpp:(.text.startup+0x17f0): undefined reference to `sf::Image::~Image()'
collect2: error: ld returned 1 exit status
Makefile:259: recipe for target 'attract' failed
make: *** [attract] Error 1


I'm using the 1.5.1 version

any ideas?

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: raspberry pi 2
« Reply #14 on: March 22, 2015, 01:59:50 PM »
try doing a clean rebuild of attract:

Code: [Select]
make clean
make