Support for the Rasberry Pi?


#1

I’ve only been following the development of this device on the periphery, but with this article I started thinking about using JUCE to develop for it…

http://blog.qt.nokia.com/2011/11/24/qt-5-with-rasberry-pi-a-delicious-mix-with-home-delivery/

As it’s a linux device, I assume it’s just a matter of setting up the make files appropriately. I have to admit I’ve not looked at the details of what QT is bringing to the table, so maybe someone who spend more time in the Linux world can come in.


#2

You mean this device?


#3

There’s a good article here about the Raspberry Pi here:


Definitely on my Christmas list. 8)


#4

I’m just about to embark on building on my Raspberry pi, Raspberian - http://www.raspbian.org/
As I’m quite noob at Linux (despite working with Mr ARM Linux for a few years), I thought I’d start by following their instructions for building Quake 3 (figured that if that built, I couldn’t be too much of a stretch to build JuceDemo!)

Having successfully built Q3 (and while trying to dig up old disks to make it run), I installed the modules Jules and others suggested, and hit make…
but got this… off to find out why (unless some kind soul takes pity and tells me )

Compiling ApplicationStartup.cpp
cc1plus: error: bad value (native) for -march switch
make: *** [build/intermediate/Debug/ApplicationStartup_3bf86e16.o] Error 1
root@raspberrypi:~/src/Juce/extras/JuceDemo/Builds/Linux#


#5

[quote=“Dub”]Having successfully built Q3 (and while trying to dig up old disks to make it run), I installed the modules Jules and others suggested, and hit make…
but got this… off to find out why (unless some kind soul takes pity and tells me )

Compiling ApplicationStartup.cpp
cc1plus: error: bad value (native) for -march switch
make: *** [build/intermediate/Debug/ApplicationStartup_3bf86e16.o] Error 1
root@raspberrypi:~/src/Juce/extras/JuceDemo/Builds/Linux#[/quote]

Need a lot more info. You didn’t even say whether you’re building this on the RPi or another machine. Or what you’re trying to build. JuceDemo?

If it’s the Raspberry Pi you’re trying to compile on, then it sounds like Juce may be specifying a 386 or x64 architecture, and you need ARM. A lot of Juce will probably work, but you should expect to tweak some stuff.

You may need to manually set the architecture. I’ll bet it’s something like:
export TARGET_ARCH="arm"
make

Bruce

PS - if you’re trying to build apps to run on you Pi from another machine, you’ll need to add cross-compiler stuff. Not really a good beginner task.


#6

I guess a request - Jules, please could you add some architecture choices to the Linux options in IntroJucer?

I guess “native” doesn’t always work. I seem to remember I had a Linux i386 system it didn’t work on a while back. Maybe native should be the default choice, but i386, x64 and arm should be options.

Bruce


#7

[quote=“Bruce Wheaton”][quote=“Dub”]Having successfully built Q3 (and while trying to dig up old disks to make it run), I installed the modules Jules and others suggested, and hit make…
but got this… off to find out why (unless some kind soul takes pity and tells me )

Compiling ApplicationStartup.cpp
cc1plus: error: bad value (native) for -march switch
make: *** [build/intermediate/Debug/ApplicationStartup_3bf86e16.o] Error 1
root@raspberrypi:~/src/Juce/extras/JuceDemo/Builds/Linux#[/quote]

Need a lot more info. You didn’t even say whether you’re building this on the RPi or another machine. Or what you’re trying to build. JuceDemo?

If it’s the Raspberry Pi you’re trying to compile on, then it sounds like Juce may be specifying a 386 or x64 architecture, and you need ARM. A lot of Juce will probably work, but you should expect to tweak some stuff.

You may need to manually set the architecture. I’ll bet it’s something like:
export TARGET_ARCH="arm"
make

Bruce[/quote]
Yes. I hadn’t even thought about the cross-platform-ness of the build. D’Oh! that does seem familiar.
And Yes, building [JuceDemo] on the pi itself.
I couldn’t find a lot of explanation of the error, other than others had just removed the offending line from the makefile.
Thanks, though. I’ll give that a go.


#8

[quote=“Bruce Wheaton”]

PS - if you’re trying to build apps to run on you Pi from another machine, you’ll need to add cross-compiler stuff. Not really a good beginner task.[/quote]
Oh, and should probably say, I’m trying to use just what a noob with a Raspberry pi owner might have access to.
I’m thnking, if we do have people using Juce, they can quite quickly move over to other popular platforms, and learn a good deal of really handy stuff from here.


#9

This seems to do something to keep it busy overnight :

From http://www.raspbian.org/RaspbianFAQ:

though it does emit many errors, and it does take a very long time to build
(I’m using this as post as a notepad so I can rerun this another time, the pi being way too slow when busy building to do anything else)


#10

Ok, getting there.
Now I’m getting this error…

../../../../modules/juce_gui_basics/juce_gui_basics.cpp:122:35: fatal error: X11/Xcursor/Xcursor.h: No such file or directory
Looks as though the default raspbian install (downloaded from Raspberry pi’s site Raspbian “wheezy” ) doesn’t include x11r7 - I’m not too sure if I can just grab x11r7 from somewhere, I need to install it from somewhere or (gulp) rebuild a kernal with x11r7 installed (see? I told you I was a Linux noob!)
I’ll read around a bit.


#11

I got Quake 3 Arena to build and run (which brought back some memories), then I had another go at Juce.

Well, as the source file comment suggested, I installed the “libxinerama-dev” package, and everything built (after a few hours!) :smiley:

I ran the executable and after a few (20) seconds the old familiar JuceDemo opening page! Yay ! I couldn’t get the animation radio buttons to work, though. I’ll build the debug version and give it another go.

I did notice some odd behaviour, though - If I moved the window it appered to move relatively(!) - i.e. it accellerated away from the mouse. It crashed if I tried to change the demo page, though.

I’ll re-edit this post with a list f everything I did ( which wasn’t a lot!. Updated some modules, Removed the Unit test switches from makefile, built a release version, and modified the machine architecture settings ) so that other Raspberry pi users can find it.

{Thinks} I wonder how easy it’d be to change the demo order (as others ar seeing OpenGL funnies, and having the Demo open on the widgets page might be an nteresting test…)


#12

Crosscompining: I’ve had trouble building Juce apps under Eclipse (on Win 7) - but many others seem to be OK. In theory this should work, though. and should be much faster to develop on.

Simple compiling (on the Pi)- I can build JuceDemo on the Pi (it can take a few hours and needs to be regularly checked). You can build under the X or the commandline. To maximize build memory, I tend to run raspi-config and change the memory_split to minimum for graphics while compiling. BUT when running Juce apps, switching memory_split to favour graphics seems to be better (at least for Introjucer!).

Newer versions of Raspbian:
I recently tried rebuiling Quake, but couldn’t get it to run :frowning: I haven’t found out what I’ve done wrong yet :frowning:
The latest version of Raspian now recognises simple Line-in audio input/out and simple MIDI in/out USB dongles - though I found I had to plug the USB Line-in/out device into one of the Raspi’s USB connectors to get it to work (The MIDI dongle’s plugged into the USB Hub)

Oh, I’m sure I’ve noted this somewhere, GCC’s arch settings ought to be something like -march=armv6 -mfloat-abi=hard -mfpu=vfp


#13

http://www.rawmaterialsoftware.com/viewtopic.php?f=5&t=9763


#14

Recent changes (g++ -std=c++11 parameter) requires gcc 4.7

I had to update the pi's Gcc/g++ compiler for my pi (I also did a dist-upgrade)

Some handy info here

http://helloraspberrypi.blogspot.co.uk/2014/06/install-gcc-47-on-raspberry-pi-and-set.html