instrument-panel
instrument-panel copied to clipboard
Problems installing instrument-panel on a rapberry pi
Hello Scott,
I installed your magnificent instrument-panel on my windows computer. It works very well with MS2020, so i can expand building my cockpit in a very beautiful and exciting way.
But now I tried to install the program on a raspberry pi 3B. I followed your steps.
I Followed your instructions for installing the allegro-5 software. But the download of the instrument-panel did not work well. You can see what happened below:
pi@raspberrypi:~ $ tag=curl -s https://github.com/scott-vincent/instrument-panel/releases/latest|cut -d'"' -f 2|cut -d'/' -f 8
;wget https://github.com/scott-vincent/instrument-panel/releases/download/$tag/instrument-panel-$tag-raspi4.tar.gz
--2022-12-28 14:06:53-- https://github.com/scott-vincent/instrument-panel/releases/download//instrument-panel--raspi4.tar.gz
Resolving github.com (github.com)... 140.82.121.4 Connecting to github.com (github.com)|140.82.121.4|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2022-12-28 14:06:53 ERROR 404: Not Found.
pi@raspberrypi:~ $ tar -xf instrument-panel-v* --one-top-level tar: unrecognized option '--one-top-level' Try 'tar --help' or 'tar --usage' for more information. pi@raspberrypi:~ $ rm instrument-panel-v*.gz rm: cannot remove ‘instrument-panel-v*.gz’: No such file or directory pi@raspberrypi:~ $
Then I downloaded the instrument-panel-v1.7.2-raspi4.tar.gz from your latest releases first on my windows computer. After that I copied this file to the raspberry pi. Then I unpacked the file in the next directory: /home/pi/instrument-panel
If I start the program with the programpicto, only a black window appears.
Then I tried to start the program with the commands you mentioned, the following happened
pi@raspberrypi:~ $ cd instrument-panel-v*/release/* bash: cd: instrument-panel-v*/release/*: No such file or directory pi@raspberrypi:~ $ nano settings/instrument-panel.json (change HOST to the IP address of your PC) bash: syntax error near unexpected token `(' pi@raspberrypi:~ $ ./instrument-panel bash: ./instrument-panel: Is a directory pi@raspberrypi:~ $
Nothing seems to work.
Also I tried your allegro-test: pi@raspberrypi:~/allegro-test $ ./make.sh Building allegro_test allegro_test.cpp: In function ‘bool init()’: allegro_test.cpp:82:29: error: could not convert ‘al_init_font_addon()’ from ‘void’ to ‘bool’ if (!al_init_font_addon()) { ^ allegro_test.cpp:82:29: error: in argument to unary ! allegro_test.cpp:107:43: error: ‘al_set_new_window_title’ was not declared in this scope al_set_new_window_title("Allegro Test"); ^ allegro_test.cpp:122:63: error: ‘ALLEGRO_OPENGL_ES_PROFILE’ was not declared in this scope al_set_new_display_flags(flags | ALLEGRO_OPENGL_3_0 | ALLEGRO_OPENGL_ES_PROFILE);
Again only a black window appears.
When i ping between the window computer and the raspberry pi, that does go well.
The big question is, what am i doing wrong? And might you be able help me?
It would be really great, cause it would be a real nice upgrade to the cockpit i am building.
With regards,
Peter
Ps i’m dutch so english is not my native language so please excuse me for any grammar mistakes.
Try the following commands. Run each one separately and make sure they complete ok before trying the next one:
wget https://github.com/scott-vincent/instrument-panel/releases/download/v1.7.2/instrument-panel-v1.7.2-raspi4.tar.gz
tar -xf instrument-panel-v1.7.2-raspi4.tar.gz --one-top-level
cd instrument-panel-v1.7.2-raspi4/release/v1.7.2
./instrument-panel
You will also need to edit the settings file and insert the IP address of your PC. The following commands will edit the correct file:
cd settings
nano instrument-panel.json
@scott-vincent , he is using a Raspberry Pi 3B. Isn't the requirements RPi 4?
I did everything you mentioned and i also changed the IP address. This brings me some steps further. But now it gives an error in loading the liballegro.so.5.2
pi@raspberrypi:~ $ cd instrument-panel-v1.7.2-raspi4/release/v1.7.2 pi@raspberrypi:~/instrument-panel-v1.7.2-raspi4/release/v1.7.2 $ ./instrument-panel ./instrument-panel: error while loading shared libraries: liballegro.so.5.2: cannot open shared object file: No such file or directory
When i install the liballegro5-dev again, it says that it is already installed.
pi@raspberrypi:~ $ sudo apt install liballegro5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
liballegro5-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 404 not upgraded.
Sounds like you don't have the correct version of Allegro5 installed as it isn't finding it. You can use the ldd command to see where shared libraries are being loaded from. So on my Pi, if I type:
cd instrument-panel ldd instrument-panel
I get the following output:
pi@RasPi4:/data/share/vs_cpp/instrument-panel/instrument-panel $ ldd instrument-panel linux-vdso.so.1 (0xbef27000) /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f91000) libwiringPi.so => /usr/local/lib/libwiringPi.so (0xb6f5e000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6f32000) liballegro.so.5.2 => /lib/arm-linux-gnueabihf/liballegro.so.5.2 (0xb6e32000) liballegro_image.so.5.2 => /lib/arm-linux-gnueabihf/liballegro_image.so.5.2 (0xb6e13000) liballegro_font.so.5.2 => /lib/arm-linux-gnueabihf/liballegro_font.so.5.2 (0xb6df9000) libstdc++.so.6 => /lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6c71000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6c02000) libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6bd5000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6a81000) librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6a69000) libcrypt.so.1 => /lib/arm-linux-gnueabihf/libcrypt.so.1 (0xb6a1d000) /lib/ld-linux-armhf.so.3 (0xb6fa6000) libX11.so.6 => /lib/arm-linux-gnueabihf/libX11.so.6 (0xb68f7000) libXcursor.so.1 => /lib/arm-linux-gnueabihf/libXcursor.so.1 (0xb68de000)
You can see it is loading liballegro.so.5.2 from here:
/lib/arm-linux-gnueabihf
So what output do you get if you type this command?
ls /lib/arm-linux-gnueabihf/liballegro*
You may find you only have an older version of Allegro5 available for Raspberry Pi 3B. My software was built and developed on Raspberry Pi 4.
the ldd command shows the missing files.
pi@raspberrypi:~/instrument-panel $ ldd instrument-panel
./instrument-panel: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ./instrument-panel) ./instrument-panel: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version
GLIBCXX_3.4.22' not found (required by ./instrument-panel)
./instrument-panel: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29' not found (required by ./instrument-panel)
linux-vdso.so.1 (0x7ef6c000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76fa6000)
libwiringPi.so => /usr/lib/libwiringPi.so (0x76f72000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76f4a000)
liballegro.so.5.2 => not found
liballegro_image.so.5.2 => not found
liballegro_font.so.5.2 => not found
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76e6e000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76df3000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76dc6000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c85000)
/lib/ld-linux-armhf.so.3 (0x76fbb000)
The command ls /lib/arm-linux-gnueabihf/liballegro* gives the next list.
/usr/lib/arm-linux-gnueabihf/liballegro_acodec.so /usr/lib/arm-linux-gnueabihf/liballegro_main.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_acodec.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_main.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_acodec.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_memfile.so /usr/lib/arm-linux-gnueabihf/liballegro_audio.so /usr/lib/arm-linux-gnueabihf/liballegro_memfile.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_audio.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_memfile.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_audio.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_physfs.so /usr/lib/arm-linux-gnueabihf/liballegro_color.so /usr/lib/arm-linux-gnueabihf/liballegro_physfs.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_color.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_physfs.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_color.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_primitives.so /usr/lib/arm-linux-gnueabihf/liballegro_dialog.so /usr/lib/arm-linux-gnueabihf/liballegro_primitives.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_dialog.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_primitives.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_dialog.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro.so /usr/lib/arm-linux-gnueabihf/liballegro_font.so /usr/lib/arm-linux-gnueabihf/liballegro.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_font.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_font.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro.so.5.2 /usr/lib/arm-linux-gnueabihf/liballegro_image.so /usr/lib/arm-linux-gnueabihf/liballegro_ttf.so /usr/lib/arm-linux-gnueabihf/liballegro_image.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_ttf.so.5.0 /usr/lib/arm-linux-gnueabihf/liballegro_image.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_ttf.so.5.0.10 /usr/lib/arm-linux-gnueabihf/liballegro_main.so
I am afraid that the solution must be: buying a raspberry pi vs 4.
Yes, the only other solution would be to build lib Allegro yourself but I think that would be too difficult for you. You would have to follow all the instructions here:
https://liballeg.org/download.html
Even if you manage that I suspect you would then need to build my software yourself too as the pre-built version is for the Pi 4.
Hello Vincent, First of all, a happy new year.
I downloaded allegro-5.2.8.0.tar.gz, and builded it. Using Cmake. That was succesfull.
After that i downloaded your instrument-panel-v1.7.2-raspi4.tar.gz i started a build with tghe command: sh make.sh The building does start, but gives a long list with the next error: extended initializer lists only available with -std=c++11 or -std=gnu++11
Maybe you have an idea for solving this, Otherwise I think it ends for me and i have to buy a Raspberry Pi 4, when that comes available again. ( Not at this moment)
Anyway, I thank you for all your help. I learned a lot of it. When I finish building my cockpit, I will post some photos of it.
With regards Peter
I too have an issue getting this to run, using RPI 4B+ 8GB, running Raspberry Pi OS "Bullseye"
Allegro5-dev installed without issues
First error encountered: the CURL command provided results in a malformed URL and gives that error the previous user encountered (note double slash after "download":
https://github.com/scott-vincent/instrument-panel/releases/download//instrument-panel--raspi4.tar.gz
I got around that doing the wget and decompression manually, resulting in the following structure in my home directory: ├── instrument-panel-v1.7.4-raspi4 │ ├── instrument-panel │ ├── bitmaps │ │ ├── adf.png snip │ │ └── xpdr-savage-cub.png │ ├── instrument-panel │ └── settings │ ├── default-settings.json │ ├── instrument-panel.json │ └── savage-cub.json
I edited the settings/instrument-panel.json file to point to the computer running MS Flight Sim by IP, and confirmed both Pi and PC are on the same subnet
When it comes time to actually start the application though, I get an error as if the file doesn't exist: me@pi:~/instrument-panel-v1.7.4-raspi4 $ ./instrument-panel bash: ./instrument-panel: No such file or directory
Also confirmed the file should be executable and with appropriate permissions: -rwxr-xr-x 1 me me 238300 Jan 5 02:37 instrument-panel
So I'm a bit confused by what's happening here. Is the OS too new maybe?