SFML community forums

Help => General => Topic started by: cloudncali on May 16, 2014, 08:32:16 pm

Title: Cross Compiling SFML for the Raspberry Pi
Post by: cloudncali on May 16, 2014, 08:32:16 pm
Hello,
I am currently trying to cross compile SFML on my Linux machine to run raspberry pi. But I am getting the fallowing error:
Quote
CMake Error at SFML/cmake/Config.cmake:106 (message):
  Unsupported compiler
Call Stack (most recent call first):
  SFML/CMakeLists.txt:20 (include)

I am used Crosstool-ng to make the cross compilers. My Linux Machine is running debian as is the Raspberry Pi.
I looked through Config.cmake and it seems its not recognizing the compiler binary's as GNUCXX compilers.

In short, Has any one been able to cross compile from Linux to the Raspberry Pi? Is this even supported or possible?
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: Laurent on May 16, 2014, 08:45:39 pm
Yes, it should work with the latest sources.
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: cloudncali on May 16, 2014, 08:52:15 pm
Okay, Thanks for the fast response :)

I think it may have to do with crosstool-ng, I will see what I can do.
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: Jesper Juhl on May 16, 2014, 09:52:29 pm
I'm currious as to why you don't simply build on the Pi?
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: cloudncali on May 16, 2014, 09:58:36 pm
I'm currious as to why you don't simply build on the Pi?

Its unbearably slow :P

 In other news, I got the compiler to work, I switched to the default ones for the RPi given here: https://github.com/raspberrypi/tools

But now its saying it cant find X11, But looked in /usr/lib and X11 is there. I even did an export path= to /usr/lib before and its still cant find it.
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: Laurent on May 17, 2014, 08:59:49 am
Do you load a CMake toolchain file for specifying the cross-compiliation environment?
Title: Re: Cross Compiling SFML for the Raspberry Pi
Post by: cloudncali on May 18, 2014, 01:23:53 am
Yes, but I found the issue,

Aparently CMakes FindX11.cmake file doesn't search the right directory so i had to add /usr/lib/i386-linux-gnu to the library search paths.