Star Gazer
Posts: 1
Joined: Mon Feb 24, 2014 7:41 am
Location: Australia

Stellarium on Pi

Mon Feb 24, 2014 7:52 am

G'day everyone.

I'm a raw newbie at Raspberry pi and the Linux operating system.

I am very interested in amateur astronomy. I found a group of people trying to get Stellarium (astronomy program) operating on the Pi.
I have been able to install it, but I am getting the 'does not support OpenGL' error that was trying to be rectified.
Just wondering if anyone knows if there has been any success in getting the program running.

Thanks for your time.

Regards,

Jamie

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23082
Joined: Sat Jul 30, 2011 7:41 pm

Re: Stellarium on Pi

Mon Feb 24, 2014 8:33 am

Before the Pi was released I did try and get stellarium to build and run on the prototype. I did get it working but very slowly. Even when it seemed to be using the accelerated OpenGLES, it was still unusable. I didn't spend too much time on it, had to get other stuff working, so good to hear others are working on it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

texy
Forum Moderator
Forum Moderator
Posts: 5155
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Stellarium on Pi

Mon Feb 24, 2014 10:51 am

Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

OldBoggy
Posts: 3
Joined: Wed May 22, 2013 5:40 pm

Re: Stellarium on Pi

Sun Feb 22, 2015 2:12 pm

I just wondered if anyone has tried Stellarium on the Pi 2.
Since I upgraded my Dad's old Dell to Ubuntu 14.04 Stellarium has been a nightmare of OpenGL 2 errors &white screens. If it runs on the Pi the easiest solution could be to upgrade his PC to a Pi !

billw
Posts: 399
Joined: Tue Sep 18, 2012 8:23 pm

Re: Stellarium on Pi

Sun Feb 22, 2015 10:26 pm

OldBoggy wrote:I just wondered if anyone has tried Stellarium on the Pi 2.
I'm running Rasbian Jessie on a Pi 2 and Stellarium installed via apt-get runs unusably slow. ldd shows the binary is linked:
libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
and that is another link:
libGLESv2.so.2 -> libGLESv2.so.2.0.0
all in the /usr/lib/arm-linux-gnueabihf directory. So I tried a manual override of the link to make stellarium run the accelerated lib /opt/vc/lib/libGLESv2.so but then stellarium threw a EGLConfig not found error.

So far I haven't discovered how to make /opt/vc/lib/libGLESv2.so be used successfully.

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Stellarium on Pi

Sun Feb 22, 2015 10:41 pm

I have just recently started messing with astronomy as a new hobby, I may give stellarium compile a try in the summer and try integrate it with cnc telescope control, I am guessing the anholt gallium X server work will be in raspbian by then and that should make compile very simple?.

Never looked at stellarium before not sure what is possible with it but I think it already has motorised scope plugins?

User avatar
scidata
Posts: 90
Joined: Tue Jan 06, 2015 4:21 pm
Location: Toronto
Contact: Website

Re: Stellarium on Pi

Sun Feb 22, 2015 11:23 pm

Stellarium is absolutely wonderful, as a desktop app, telescope controller (using a 'scope stack' analogous to a 'web stack'), and even a micro-planetarium show controller (there's actually a market in small domes & projectors). The big problem so far with the raspi is the locked GPU. This is also a problem for computational citizen science projects.
"Self-education is, I firmly believe, the only kind of education there is" - Isaac Asimov

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Stellarium on Pi

Mon Mar 02, 2015 5:06 pm

I messed about trying to compile stellarium on sunday without success

The current version will not build due to lack of libqt4-phonon-dev in the raspbian repos

So trying previous version 0.12.0 http://netcologne.dl.sourceforge.net/pr ... 2.0.tar.gz seems to get past cmake and make -j4 on the rpi2 compiles it, running it unfortunately fails with a 'Bus error' after 'Build log after adding a stereographic projection shader: "Built successfully"'

After which I tried a compile using gles options:

cmake -DBUILD_FOR_MAEMO=1 -DOPENGL_MODE=ES2 ../..
make -j4

This failed to compile due to not finding GLES2/gl2.h when compiling src/core/OctahedronPolygon.cpp

The bus error maybe due to insufficient memory???

I did not get time to mess about fixing the paths to find the gles header files, so maybe it will compile for gles if I fix that?

OldBoggy
Posts: 3
Joined: Wed May 22, 2013 5:40 pm

Re: Stellarium on Pi

Mon Mar 02, 2015 6:49 pm

Well done for keeping at it Mung.
I am sitting here feeling that I am out of my depth & realising that I have not actually compiled anything for about 17 years !
What a depressing thought.

prefect
Posts: 1
Joined: Tue Jun 23, 2015 10:57 am

Re: Stellarium on Pi

Sat Jun 27, 2015 6:03 am

Hello,

I am planning to create mobile planetarium with pi & stellarium, but I am new with raspberry pi :). I installed stellarium on my model 2 (OS Raspberrian) and it works really slow. Is it possible to run stellarium "normal"?

arrache
Posts: 2
Joined: Wed Jul 01, 2015 4:34 am

Re: Stellarium on Pi

Sun Aug 16, 2015 6:55 pm

Hi I managed to get Stellarium kind of working (not really working) on my Raspi 2 running Ubuntu Mate (great distro by the way you guys should give it a try if you haven't already) but I have the same problem: the FPS is intolerably low about 0.001 :( OpenGL does not appear to be rendering...

Im going to try and oveclock the Pi to se to what extent it improves that number... I bought a pair of heat sinks, hopefully I won't overcook it. But truthfully I don't believe it will help a lot, the real solution is to get the hardware acceleration working.

We have got to get this working!! :D The Pi could have even more education applications.

arrache
Posts: 2
Joined: Wed Jul 01, 2015 4:34 am

Re: Stellarium on Pi

Mon Aug 17, 2015 1:28 am

This should come as no surprise, but the overclocking didn't seem to help, FPS are basically the same. :(

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Stellarium on Pi

Mon Aug 17, 2015 10:30 am

If I use Eric's new Mesa3d vc4 OpenGL 2 driver
viewtopic.php?p=802205#p802205
then the fps of Stellarium goes up to ~4fps

This is magnitudes better compared to 0.08fps using the fallback software cpu renderer.

At the moment there is rendering issues using the new drive, this will hopefully get sorted out if more people start to test and improve the driver.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

gzotti
Posts: 7
Joined: Wed Mar 23, 2016 6:19 pm

Re: Stellarium on Pi

Wed Mar 23, 2016 6:46 pm

I know the thread is old, but I also want to have Stellarium running on a Pi for quite some time now. Last year I built Qt5.4 and Stellarium, and came to the point to see the splash screen, but then EGL problems prevented proper display.
I just tried again to compile Qt5.6 and Stellarium in the hope that the new VC4 driver works as desktop OpenGL, however it's even simpler.

You must have Raspbian Jessie and the new drivers must be activated (raspi-config)

apt-get install stellarium

will install an outdated version 0.13.1. It is the first time I saw it running on the Raspberry after fighting with these EGL troubles last year. And the framerate is better than expected. However, this version crashes when focussing on a planet. But qt5.3.2 is also installed, so no need to build qt from scratch, which can save days :-)

You must build stellarium from sources, decribed at http://stellarium.org/wiki/index.php/Bzr_checkout.

Compilation takes ca 30 minutes on a Pi2 with make -j4.

Unfortunately, the font used to display in-screen info (star labels, info text, button labels) is garbled. So is anybody willing and able to find out what to do here? Is it the driver, Qt, something else?

Thanks!
Georg (Stellarium team)

texy
Forum Moderator
Forum Moderator
Posts: 5155
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Stellarium on Pi

Thu Mar 24, 2016 7:39 am

Hi,
yeah I found the same issue, although I couldn't get compilation to work :
viewtopic.php?f=63&t=547&p=932968&hilit ... um#p932968
Not sure what I'm doing wrong?

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

gzotti
Posts: 7
Joined: Wed Mar 23, 2016 6:19 pm

Re: Stellarium on Pi

Thu Mar 24, 2016 10:33 am

Did you obey our building instructions:

http://www.stellarium.org/wiki/index.ph ... _%28Qt5%29

(simply copy the apt-get string to get (hopefully) all packages required.)

http://www.stellarium.org/wiki/index.ph ... n_on_Linux

Still no clue what's wrong with the fonts.
G.

gzotti
Posts: 7
Joined: Wed Mar 23, 2016 6:19 pm

Re: Stellarium on Pi

Tue Mar 29, 2016 9:24 am

FYI: I managed to work around the graphics issues. For now, you have to build a special branch from sources.
Use bzr to checkout the gz_raspi branch
$ bzr co lp:~georg-zotti/stellarium/gz_raspi
then follow the building guidelines for Linux: http://stellarium.org/wiki/index.php/Co ... n_on_Linux

Compilation takes about 30 minutes (make -j4) and should not cause any surprises.
Then call with a command line switch: stellarium --fix-text [or stellarium -t], else the screen text is broken. I hope this can be fixed, as the workaround (esp. when displaying the object info) is quite costly. Else, somewhere around 9fps on a Pi2 is better than I had expected! Now it's time to upgrade your telescope controllers and robotic Dobsons with onboard touch screens all driven by a single Pi2 :-)

Now, who can build and upgrade the Qt5.6 packages on the repo to work as well as Qt5.3.2?
Kind regards and Clear Skies,
Georg (Stellarium team)

gzotti
Posts: 7
Joined: Wed Mar 23, 2016 6:19 pm

Re: Stellarium on Pi

Tue Mar 29, 2016 11:31 am

Short update: The special branch is now merged into trunk. Just

bzr co lp:stellarium

Build as described before, and start with --fix-text (or -t) option.
Have fun and write us about your applications!

Regards, Georg.

ait
Posts: 127
Joined: Sun Oct 30, 2011 6:51 pm

Re: Stellarium on Pi

Tue Mar 29, 2016 6:28 pm

hello Georg,
works good on my RPI 3 with raspbian jessie.
8 FPS with 1280x1024 resolution.
Thank you.
Ait

happyDaisy
Posts: 1
Joined: Sat Aug 27, 2016 7:20 am

Re: Stellarium on Pi

Sat Aug 27, 2016 11:09 am

I have been trying to compile from source for the last few days and keep getting hit up with a duplicate typedef issue.
Here is what I have done:

Code: Select all

1. Dowload Raspian Jessie Lite from https://www.raspberrypi.org/downloads/raspbian/
2. Use Image Writer to write to a micro sd card
3. Boot in using the following credentials: pi:raspberry
4 Run the following commands
sudo su
vi /etc/apt/sources.list
uncomment the line
apt-get update
apt-get upgrade -y
(the following sourced from http://stellarium.org/wiki/index.php/Bu ... cies_(Qt5))

Code: Select all

apt-get install build-essential cmake zlib1g-dev libgl1-mesa-dev gcc g++ graphviz doxygen gettext bzr \
     qtdeclarative5-dev qtdeclarative5-dev-tools libqt5declarative5  qtquick1-5-dev qtscript5-dev libqt5svg5-dev \
     qttools5-dev-tools qttools5-dev libqt5opengl5-dev qtquick1-qml-plugins qtmultimedia5-dev libqt5multimedia5-plugins \
     libqt5serialport5 libqt5serialport5-dev 
(the following sourced from http://projectable.me/3d-printed-raspbe ... ht-part-1/)

Code: Select all

adduser --disabled-password --disabled-login --gecos "" stellarium  
usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input stellarium
apt-get install --no-install-recommends raspi-gpio xcompmgr dbus-x11 libgl1-mesa-dri xserver-xorg xinit bzr qtmultimedia5-dev
raspi-config
Expand hard drive
Set Advanced OpenGL driver enabled
Set localisation settings
Finish
reboot
log in with same credentials and sudo su

Code: Select all

vi /etc/kbd/config
Change variables to below
BLANK_TIME=0  
BLANK_DPMS=off  
POWERDOWN_TIME=0 
vi /etc/X11/xinit/xinitrc
add variables to end of file
xset s noblank  
xset s off  
xset -dpms  
scp Stellerium bzr project (Trunk) to /usr/src/stellerium
cd /usr/src/stellerium
mkdir -p builds/unix  
cd builds/unix  
cmake ../..  
make -j4
Here is where it goes awry

Code: Select all

[ 47%] Building CXX object plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/qrc_CompassMarks.cpp.o
[ 47%] Building CXX object plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanets.cpp.o
plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/build.make:62: recipe for target 'plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/CompassMarks.cpp.o' failed
make[2]: *** [plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/CompassMarks.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 47%] Building CXX object plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanet.cpp.o
CMakeFiles/Makefile2:2900: recipe for target 'plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/all' failed
make[1]: *** [plugins/CompassMarks/src/CMakeFiles/CompassMarks-static.dir/all] Error 2
[ 48%] Building CXX object plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/gui/ExoplanetsDialog.cpp.o
CMakeFiles/Makefile2:2706: recipe for target 'plugins/AngleMeasure/src/CMakeFiles/AngleMeasure-static.dir/all' failed
make[1]: *** [plugins/AngleMeasure/src/CMakeFiles/AngleMeasure-static.dir/all] Error 2
[ 48%] Building CXX object plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/qrc_Exoplanets.cpp.o
In file included from /usr/src/stellarium-0.15.0/src/core/StelPainter.hpp:23:0,
                 from /usr/src/stellarium-0.15.0/plugins/Exoplanets/src/Exoplanets.cpp:21:
/usr/src/stellarium-0.15.0/src/core/StelOpenGL.hpp:199:16: error: conflicting declaration ‘typedef double GLdouble’
 typedef double GLdouble;
                ^
In file included from /usr/src/stellarium-0.15.0/src/core/StelOpenGL.hpp:24:0,
                 from /usr/src/stellarium-0.15.0/src/core/StelPainter.hpp:23,
                 from /usr/src/stellarium-0.15.0/plugins/Exoplanets/src/Exoplanets.cpp:21:
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:98:17: note: previous declaration as ‘typedef GLfloat GLdouble’
 typedef GLfloat GLdouble;
                 ^
[ 48%] Building CXX object plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanets-static_automoc.cpp.o
In file included from /usr/src/stellarium-0.15.0/src/core/StelPainter.hpp:23:0,
                 from /usr/src/stellarium-0.15.0/plugins/Exoplanets/src/Exoplanet.cpp:23:
/usr/src/stellarium-0.15.0/src/core/StelOpenGL.hpp:199:16: error: conflicting declaration ‘typedef double GLdouble’
 typedef double GLdouble;
                ^
In file included from /usr/src/stellarium-0.15.0/src/core/StelOpenGL.hpp:24:0,
                 from /usr/src/stellarium-0.15.0/src/core/StelPainter.hpp:23,
                 from /usr/src/stellarium-0.15.0/plugins/Exoplanets/src/Exoplanet.cpp:23:
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopengl.h:98:17: note: previous declaration as ‘typedef GLfloat GLdouble’
 typedef GLfloat GLdouble;
                 ^
plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/build.make:69: recipe for target 'plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanets.cpp.o' failed
make[2]: *** [plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanets.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/build.make:92: recipe for target 'plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanet.cpp.o' failed
make[2]: *** [plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/Exoplanet.cpp.o] Error 1
CMakeFiles/Makefile2:2997: recipe for target 'plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/all' failed
make[1]: *** [plugins/Exoplanets/src/CMakeFiles/Exoplanets-static.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
From what I gather I may need to set OPENGL_MODE=ES in the cmake options. But I am not having much luck when I try.

Any thoughts, research on the subject leads to solutions for older versions of Stellerium, but the don't appear to have helped me... (Will post the link when I find it again)

edit:
So it is not detecting the define for QT_OPENGL_ES_2
I ended up editing /usr/src/stellarium-0.15.0/src/core/StelOpenGL.hpp and changing
‘typedef double GLdouble’ to
'typedef GLfloat GLdouble'
considering there are preprocessing instructions in place to do that for me if the define was functioning correctly this is not the ideal solution to me.

Any ideas? (Not a C/C++ programmer I am afraid so I am just poking at things)

edit2:
the fix described above worked
about 30 fps @ 800x480

paul13mj
Posts: 1
Joined: Sat Oct 14, 2017 7:15 pm

Re: Stellarium on Pi

Sat Oct 14, 2017 7:18 pm

Hello, im new.

I created an account just to ask this very question.

I just bought a RBP3 1gb to run stellarium and controll my goto telescope system.

I kept on reading and reading but i could not find a solid answer how to run stellarium on a RBP

Can anyone assist me with this? :D

gzotti
Posts: 7
Joined: Wed Mar 23, 2016 6:19 pm

Re: Stellarium on Pi

Sat Oct 14, 2017 8:21 pm

I had high hopes that Raspbian Stretch would bring Mesa 17 in addition to Qt5.7. The graphics driver developer Eric Anholt has done a great job, fixed the error mentioned previously, but the current Mesa 13 has another severe bug which breaks Stellarium. Eric reported to have fixed that as well, but Raspbian still comes with the buggy Mesa 13.

Getting Stellarium to run properly currently will require you to build Mesa 17 from sources. I have not found time to do that, but would encourage you to try and write whether you could make it work (and how!!). Other than that, you will likely have to add Stellarium's ppa repository as described in the Stellarium User Guide (section 2.3.3), then the installable package will be all that is required to install. I don't know by heart which version is available from Raspbian, but it is likely outdated.

I keep reading elsewhere what new features newer versions of Mesa are getting. I hope that some time in the future (weeks from now !!??) Raspbian will be updated to use Mesa 17 or later.

Kind regards,
Georg (Team Stellarium)

Return to “General discussion”