Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cross Compiling SFML for the Raspberry Pi  (Read 3656 times)

0 Members and 1 Guest are viewing this topic.

cloudncali

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://jakesmakes.tumblr.com/
Cross Compiling SFML for the Raspberry Pi
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #1 on: May 16, 2014, 08:45:39 pm »
Yes, it should work with the latest sources.
Laurent Gomila - SFML developer

cloudncali

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://jakesmakes.tumblr.com/
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #2 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.

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #3 on: May 16, 2014, 09:52:29 pm »
I'm currious as to why you don't simply build on the Pi?

cloudncali

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://jakesmakes.tumblr.com/
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #4 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #5 on: May 17, 2014, 08:59:49 am »
Do you load a CMake toolchain file for specifying the cross-compiliation environment?
Laurent Gomila - SFML developer

cloudncali

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • http://jakesmakes.tumblr.com/
Re: Cross Compiling SFML for the Raspberry Pi
« Reply #6 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.