Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: dbals on May 24, 2015, 08:22:06 AM

Title: Help compiling for rpi 1
Post by: dbals on May 24, 2015, 08:22:06 AM
Trying to get this to compile but keep running into errors that I don't understand.


This is on a rpi 1 B+ (just wanna run Pac-man(s), Donkey Kong and a few other 4-way games)
I have the latest Raspbian Wheezy installed.

Using this guide:   https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-%28Rasbian-Wheezy%29

When I get to this command:  sudo make install cmake libxcb-randr0-dev libflac-dev libogg-dev libvorbis-dev libopenal-dev libjpeg8-dev libfreetype6-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util0-dev libxcb-ewmh-dev libxcb-keysyms1-dev libxcb-icccm4-dev libudev-dev libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavresample-dev libfontconfig1-dev

I get this error:  No rule to make target install.   stop


Any help would be appreciated,
Dan

Title: Re: Help compiling for rpi 1
Post by: raygun on May 24, 2015, 08:38:22 AM
Hi,

There was an error in the guide, its fixed now.  The "sudo make install ..." in the command you were trying to run should have been "sudo apt-get install ..."

Thanks for the note, hopefully the guide is correct now.  Please let me know if you have any further problems!
Title: Re: Help compiling for rpi 1
Post by: dbals on May 24, 2015, 07:19:13 PM
Thank you-  I did get further but...

When I run this:
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_OPENGL_ES=1 ..


I get:

/home/pi/develop/sfml-pi$ 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_C
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/share/cmake-2.8/Modules/FindX11.cmake:420 (MESSAGE):
  Could not find X11

Call Stack (most recent call first):
  src/SFML/Window/CMakeLists.txt:186 (find_package)


-- Configuring incomplete, errors occurred!


Again, any help would be appreciated.
Dan


Title: Re: Help compiling for rpi 1
Post by: raygun on May 24, 2015, 09:50:15 PM
try:

sudo apt-get install libx11-dev

... and then rerun the cmake command.  Hopefully that's it for missing dependencies!
Title: Re: Help compiling for rpi 1
Post by: dbals on May 25, 2015, 09:55:26 PM
I've gotten further  :)  thanks.

But I get this error when running sudo make install

[ 17%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
In file included from /opt/vc/include/interface/vcos/vcos_assert.h:149:0,
                 from /opt/vc/include/interface/vcos/vcos.h:114,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from /home/pi/develop/sfml-pi/src/SFML/Window/EGLCheck.hpp:32,
                 from /home/pi/develop/sfml-pi/src/SFML/Window/EglContext.hpp:33,
                 from /home/pi/develop/sfml-pi/src/SFML/Window/GlContext.cpp:69:
/opt/vc/include/interface/vcos/vcos_types.h:38:33: fatal error: vcos_platform_types.h: No such file or directory
compilation terminated.
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:77: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
CMakeFiles/Makefile2:152: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make: *** [all] Error 2
Makefile:113: recipe for target 'all' failed


Thank you
Title: Re: Help compiling for rpi 1
Post by: raygun on May 26, 2015, 08:14:12 AM
ok, I guess it has become apparent that I didn't test the guide and just went from my scrawling of notes...  :P

The cmake command in the guide was wrong, so I've fixed it in the guide and I really hope it works now.

You will need to delete the cmakecache file in your build directory and rerun the cmake command.  That should fix this problem during the make.

new cmake command:

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 ..

Title: Re: Help compiling for rpi 1
Post by: nitrogen_widget on May 26, 2015, 09:59:52 AM
it's wrong?
It worked for me.
eventually.
I did feel like I was going through dependency hell though.

But, i'm using DietPi distro which is a chopped down raspbian so i expected i needed more depends.
Title: Re: Help compiling for rpi 1
Post by: dbals on May 26, 2015, 10:20:33 AM
Thank you-  will try tonight and keep you posted
Title: Re: Help compiling for rpi 1
Post by: dbals on May 26, 2015, 07:27:38 PM
I really am trying,

this is now the error:

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 ..
-- Could NOT find XLIB_XCB (missing:  XLIB_XCB_LIBRARY)
CMake Error at cmake/Modules/FindXCB.cmake:67 (message):
  XlibXcb library not found
Call Stack (most recent call first):
  src/SFML/Window/CMakeLists.txt:209 (find_package)


Thank you for your patience,
Dan
Title: Re: Help compiling for rpi 1
Post by: nitrogen_widget on May 26, 2015, 07:56:12 PM
good old "XLIB" is missing.
or one of the packages containing it is. XLIB_XCB according to the message.
but that isn't all you need.
i don't know what exactly is needed so I just installed every xlib dev package in the repository. :)

Title: Re: Help compiling for rpi 1
Post by: dbals on May 26, 2015, 09:12:54 PM
found it-

sudo apt-get install libx11-xcb-dev

 :)
Title: Re: Help compiling for rpi 1
Post by: dbals on May 26, 2015, 09:51:14 PM
Compiled!

Thank you!
Title: Re: Help compiling for rpi 1
Post by: dbals on May 26, 2015, 10:21:01 PM
I hope this is my last question:

when I try to launch attract, I get this error:

error while loading shared libraries: libsfml-graphics.so.2: cannot shared object file: no such file or directory
Title: Re: Help compiling for rpi 1
Post by: raygun on May 26, 2015, 11:15:17 PM
Great! progress!

For the unfound .so, try running "ldconfig" (you might have to do sudo ldconfig, I'm not sure)

If the problem still happens, double check that you did the "sudo make install" step for sfml in the build instructions.

Title: Re: Help compiling for rpi 1
Post by: dbals on May 27, 2015, 03:10:02 PM
It works!   Yes!

THANK YOU,
Dan
Title: Re: Help compiling for rpi 1
Post by: nitrogen_widget on May 27, 2015, 04:49:22 PM
It works!   Yes!

THANK YOU,
Dan

(http://cdn.niketalk.com/0/00/003ac0a2_24w6lvt.gif)


now, feed it at least 128MB of ram minimum. :)
Title: Re: Help compiling for rpi 1
Post by: raygun on May 30, 2015, 10:06:16 PM
Awesome!  Thanks for being the guinea pig for my guide =)
Title: Re: Help compiling for rpi 1
Post by: dbals on June 02, 2015, 05:08:28 AM
Happy to just get it going, so far I enjoy the default layout but will try more soon....  now I just have to get mame working- that will be my next thread  ???

Dan