WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Installing RPI::WiringPi for Perl  (Read 4221 times)

Offline VMat

  • Newbie
  • *
  • Posts: 14
Installing RPI::WiringPi for Perl
« on: January 21, 2017, 08:53:12 PM »
Hi,

I'm trying to install RPI::WiringPi from CPAN to play with an LCD and a few buttons - I want to use Perl because I'm already familiar with the language and because this might end up becoming a Squeezecenter plugin. I understand roughly what's involved in the process, but I don't have all the skills to troubleshoot it. Maybe someone could help me?

I started with a fresh piCore install (V3.10), plus extending the FS, etc. - I already have Squeezecenter and Squeezeplayer running.

Then I installed a few extensions based on my gut feeling, e.g. (not necessarily in this order):

  • perl5
  • wiringpi
  • wiringpi-dev
  • compile
  • binutils-dev
  • setuptools
  • gcc
  • gcc_base-dev
  • gcc_libs
  • gcc_libs-dev

among others. After each new extension is installed I do:

Code: [Select]
sudo perl -MCPAN -e shell
install RPi::WiringPi

But there's always an error somewhere, dependency errors, runtime errors, memory errors... Last one was apparently an I/O error! But I guess this one will go away if I reboot the Pi.

Now... is there an easier way to do this? Something pre-compiled for the Pi (B - armv6), or step-by-step instructions to compile this specific module? I can start it from scratch if needed (meaning, re-flash piCore 3.10 to the SD card), no big deal.

Thanks in advance,

VMat

« Last Edit: January 21, 2017, 09:05:57 PM by VMat »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Installing RPI::WiringPi for Perl
« Reply #1 on: January 22, 2017, 02:25:37 AM »
First of all there are no piCore V3.10 version, actual version is 8.1.x Probably you are referring picoreplayer?

On piCore-8.1.5 installation of RPi::WiringPi fails. Same happenes installing it in Raspbian, so it is not piCore specific, it is a bug in the package. You can fix it yourself, report to its author, etc.

My personal advice to drop anything Perl at all and go for a usable language.


« Last Edit: January 22, 2017, 03:26:12 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline VMat

  • Newbie
  • *
  • Posts: 14
Re: Installing RPI::WiringPi for Perl
« Reply #2 on: January 22, 2017, 02:56:16 AM »
First of all there are no piCore V3.10 version, actual version is 8.1.x Probably you are referring picoreplayer?

That's right, sorry. It's picoreplayer. I keep both in the same folder, and when I wrote my post I looked at one and thought of the other...


On piCore-8.1.5 installation of RPi::WiringPi fails. Same happenes installing it in Raspbian, so it is not piCore specific, it is a bug in the package. You can fix it yourself, report buf to its authore, etc.

My personal advice to drop anything Perl at all and go for a usable language.

Oh, my... I was hoping you, of all people, would be the one to bring me good news... :)

I'm not going to give it up so quickly, though. It's good to know that it's a known bug. Do you know any forum threads on the subject, that I could get some clues from?

Thanks a lot,

VMat

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: Installing RPI::WiringPi for Perl
« Reply #3 on: January 22, 2017, 03:04:39 AM »
Instead of trying to install directly from cpan, wny not download the  RPi::WiringPi source tarball and compile that instead?

Offline VMat

  • Newbie
  • *
  • Posts: 14
Re: Installing RPI::WiringPi for Perl
« Reply #4 on: January 22, 2017, 05:41:04 PM »
Instead of trying to install directly from cpan, wny not download the  RPi::WiringPi source tarball and compile that instead?

I thought that's what cpan was doing in the background. But I will give it a try, thanks!

Vmat