in reply to Re: XS, raspberry pi, and a hundred bucks
in thread XS, raspberry pi, and a hundred bucks

Thanks for buying the book! :)


Buy a Pi 3 and a NoIR Camera Board v2. Make sure you've got a 2.1A USB charger plug with a good quality cable. You'll also need a good micro SD card. Mine all range from 16-64GB. Spend a little more here; a quality card makes a difference. All in all, you should be right there in around $100.

I got a pi 3B+, NoIR Camera Board v2, 3000 mA power, 32 gig micro sd card. I can hardly believe that it already works. I did not fdisk the sd card as it was already loaded with a perfectly-good unix. Output is vivid and quick.

I learned XS over time and don't remember the reading I did. WiringPi, which is the backend to RPi::WiringPi which the Raspberry Pi book is based on is an XS module. Most of the code wraps an external C/C++ library, but there is some XS involved. A very trivial XS module I've written is Bit::Manip. There's not much XS there either, but it's a good example of how to present C functions to Perl code, how the files all hang together and such.

It was very helpful for me to work through the first 2 examples, EX-1. XS interface description is comprehensive, and difficult. Before this, I never understood what was happening in the command:

h2xs -A -n Mytest

It finally covers page 176 of Intermediate Perl to work through it.

Regarding the install, things are moving forward pretty well, but I have run into my first roadblock. I'm getting 404's beginning with this guy:


and it tanks whatever is to follow.

E: Failed to fetch +g/gst-plugins-base1.0/gir1.2-gst-plugins-base-1.0_1.14.4-2_armhf.deb + 404 Not Found [IP: 80] E: Failed to fetch +g/gst-plugins-ugly1.0/gstreamer1.0-plugins-ugly_1.14.4-1_armhf.deb 4 +04 Not Found [IP: 80] E: Failed to fetch +g/gst-plugins-base1.0/libgstreamer-plugins-base1.0-dev_1.14.4-2_armhf +.deb 404 Not Found [IP: 80] E: Failed to fetch +g/gst-plugins-bad1.0/gir1.2-gst-plugins-bad-1.0_1.14.4-1+b1_armhf.deb + 404 Not Found [IP: 80] E: Unable to fetch some archives, maybe run apt-get update or try with + --fix-missing? pi@raspberrypi:~ $ sudo apt-get update Hit:1 buster InRelease Get:2 buster InRelease [15.0 +kB] Reading package lists... Done E: Repository ' buster InRelea +se' changed its 'Suite' value from 'stable' to 'oldstable' N: This must be accepted explicitly before updates for this repository + can be applied. See apt-secure(8) manpage for details.

I've isolated the commands that result in 404-errors:

sudo apt-get install gstreamer1.0-plugins-ugly sudo apt-get install gir1.2-gst-plugins-bad-1.0 sudo apt-get install gir1.2-gst-plugins-base-1.0 sudo apt-get install libgstreamer-plugins-base1.0-dev

Since the problem seems to be in the plugins department, I thought I might be able to get away with, but no dice:

checking for GST... no configure: error: You need to install or upgrade the GStreamer development packages on your system. On debian-based systems these are libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev. on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel or similar. The minimum version required is 1.0.0. configure failed

I think this brands me as a debian user:

$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster $ cat /etc/apt/sources.list deb buster main contrib non- +free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source +' #deb-src buster main contrib + non-free rpi $

I took a look around to see what what I could checking both gst-plugins-base1.0 and gstreamer. I seem not to have a lot of elbow grease when it comes to distributions, if it veers off the main path....

Q1) Do I look for newer versions or change my settings?

Thx all for comments,

Replies are listed 'Best First'.
Re^3: XS, raspberry pi, and a hundred bucks
by Aldebaran (Curate) on Mar 10, 2022 at 00:28 UTC
    Q1) Do I look for newer versions or change my settings?

    The syntax I was lacking was this:

    sudo apt-get update --allow-releaseinfo-change

    , along with:

    sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove

    and then this command just chugs away...

    sudo apt-get install wiringpi cpanminus libperl-dev libgdbm-dev libdb- +dev libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugin +s-good gstreamer1.0-plugins-ugly gobject-introspection gir1.2-gst-plu +gins-bad-1.0 gstreamer1.0-tools gir1.2-gst-plugins-base-1.0 gir1.2-gs +treamer-1.0 libglib-object-introspection-perl autoconf automake libto +ol pkg-config libgstreamer-plugins-base1.0-dev libraspberrypi-dev git + opencv-data

    Then to complete the "Hurry Up and Wait" chapter of stevieb's guide for rpi's:

    cd gst-rpicamsrc ./ --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/ make sudo make install

    These commands seem to be successful, with the results being a whole bunch of .so files:

    $ cd /usr/lib/arm-linux-gnueabihf/gstreamer-1.0 $ ls include ... $

    Thanks all for comments. Also, let me repost haukex's very useful guide to configuring rpi's. More on this topic at Re: CPAN 2.29 stuck with Net::SSLeay.