rajualluri
Posts: 2
Joined: Sun May 19, 2013 3:17 am

Issue installing Device::BCM2835 using CPAN

Sun May 19, 2013 3:23 am

I am trying to install Device::BCM2835 perl module using CPAN. I already installed libbcm2835 from http://www.airspayce.com/mikem/bcm2835/ . When I try to install perl module, I get stuck at the first test as follows. Is this a known thing? What is the workaround?

Code: Select all

cpan[1]> install Device::BCM2835
Reading '/home/pi/.cpan/Metadata'
  Database was generated on Sat, 18 May 2013 22:17:02 GMT
Running install for module 'Device::BCM2835'
Running make for M/MI/MIKEM/Device-BCM2835-1.8.tar.gz
Fetching with HTTP::Tiny:
http://mir2.ovh.net/ftp.cpan.org/authors/id/M/MI/MIKEM/Device-BCM2835-1.8.tar.gz
Checksum for /home/pi/.cpan/sources/authors/id/M/MI/MIKEM/Device-BCM2835-1.8.tar.gz ok
Scanning cache /home/pi/.cpan/build for sizes
............................................................................DONE

  CPAN.pm: Building M/MI/MIKEM/Device-BCM2835-1.8.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Device::BCM2835
Writing MYMETA.yml and MYMETA.json
cp lib/Device/BCM2835.pm blib/lib/Device/BCM2835.pm
AutoSplitting blib/lib/Device/BCM2835.pm (blib/lib/auto/Device/BCM2835)
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp  -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap  BCM2835.xs > BCM2835.xsc && mv BCM2835.xsc BCM2835.c
Please specify prototyping behavior for BCM2835.xs (see perlxs manual)
cc -c  -I/usr/local/projects/bcm2835/src -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.8\" -DXS_VERSION=\"1.8\" -fPIC "-I/usr/lib/perl/5.14/CORE"   BCM2835.c
Running Mkbootstrap for Device::BCM2835 ()
chmod 644 BCM2835.bs
rm -f blib/arch/auto/Device/BCM2835/BCM2835.so
LD_RUN_PATH="/lib/arm-linux-gnueabihf" cc  -shared -L/usr/local/lib -fstack-protector BCM2835.o  -o blib/arch/auto/Device/BCM2835/BCM2835.so 	\
	   -lbcm2835 -lrt  	\

chmod 755 blib/arch/auto/Device/BCM2835/BCM2835.so
cp BCM2835.bs blib/arch/auto/Device/BCM2835/BCM2835.bs
chmod 644 blib/arch/auto/Device/BCM2835/BCM2835.bs
Manifying blib/man3/Device::BCM2835.3pm
  MIKEM/Device-BCM2835-1.8.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Device-BCM2835.t .. 1/5
Regards,
Raju

festy
Posts: 12
Joined: Thu Jun 28, 2012 3:57 am

Re: Issue installing Device::BCM2835 using CPAN

Sun May 19, 2013 9:46 pm

I ran into this the other day upgrading to bcm2835-1.25 and Device::BCM2835-1.8.
The test script appears to get stuck in a loop calling bcm2835_peri_read().
I installed the module manually, skipping the 'make test' step and haven't had any problems.

rajualluri
Posts: 2
Joined: Sun May 19, 2013 3:17 am

Re: Issue installing Device::BCM2835 using CPAN

Sun May 19, 2013 10:35 pm

Thanks Festy. Let me try that.

nonix
Posts: 1
Joined: Mon Feb 06, 2012 1:15 pm

Re: Issue installing Device::BCM2835 using CPAN

Mon Jun 10, 2013 1:08 pm

I've got the same issue. I have installed the module using cpan -f -i Device::BCM2835 once it reached the test line PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.tt/Device-BCM2835.t .. 1/5

just hit ^C then the make install continues to install the module.

Hope this helps,
N.

User avatar
solar3000
Posts: 1011
Joined: Sat May 18, 2013 12:14 am

Re: Issue installing Device::BCM2835 using CPAN

Sun Jun 16, 2013 1:01 am

I did:
./configure
make
make check
make install


after installing the 300 prerequisites of course
Antikythera

fidokomik
Posts: 1
Joined: Mon Feb 05, 2018 9:42 pm

Re: Issue installing Device::BCM2835 using CPAN

Mon Feb 05, 2018 9:46 pm

I have similar problem. Any idea how to solve it?

Code: Select all

cpan[1]> install Device::BCM2835
Reading '/root/.cpan/Metadata'
  Database was generated on Tue, 23 Jan 2018 07:29:02 GMT
Running install for module 'Device::BCM2835'
Checksum for /root/.cpan/sources/authors/id/M/MI/MIKEM/Device-BCM2835-1.93.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
Configuring M/MI/MIKEM/Device-BCM2835-1.93.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Device::BCM2835
Writing MYMETA.yml
  MIKEM/Device-BCM2835-1.93.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MI/MIKEM/Device-BCM2835-1.93.tar.gz
cp lib/Device/BCM2835.pm blib/lib/Device/BCM2835.pm
AutoSplitting blib/lib/Device/BCM2835.pm (blib/lib/auto/Device/BCM2835)
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap  BCM2835.xs > BCM2835.xsc && mv BCM2835.xsc BCM2835.c
Please specify prototyping behavior for BCM2835.xs (see perlxs manual)
cc -c  -I/usr/local/projects/bcm2835/src -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.93\" -DXS_VERSION=\"1.93\" -fPIC "-I/usr/lib/perl/5.14/CORE"   BCM2835.c
In file included from BCM2835.xs:9:0:
const-c.inc: In function ‘constant_17’:
const-c.inc:721:20: error: ‘RPI_V2_GPIO_P1_10’ undeclared (first use in this function)
const-c.inc:721:20: note: each undeclared identifier is reported only once for each function it appears in
const-c.inc:726:20: error: ‘RPI_V2_GPIO_P1_40’ undeclared (first use in this function)
const-c.inc:747:20: error: ‘RPI_V2_GPIO_P1_11’ undeclared (first use in this function)
const-c.inc:752:20: error: ‘RPI_V2_GPIO_P1_21’ undeclared (first use in this function)
const-c.inc:757:20: error: ‘RPI_V2_GPIO_P1_31’ undeclared (first use in this function)
const-c.inc:769:20: error: ‘RPI_V2_GPIO_P1_12’ undeclared (first use in this function)
const-c.inc:774:20: error: ‘RPI_V2_GPIO_P1_22’ undeclared (first use in this function)
const-c.inc:779:20: error: ‘RPI_V2_GPIO_P1_32’ undeclared (first use in this function)
const-c.inc:791:20: error: ‘RPI_V2_GPIO_P1_03’ undeclared (first use in this function)
const-c.inc:796:20: error: ‘RPI_V2_GPIO_P1_13’ undeclared (first use in this function)
const-c.inc:801:20: error: ‘RPI_V2_GPIO_P1_23’ undeclared (first use in this function)
const-c.inc:806:20: error: ‘RPI_V2_GPIO_P1_33’ undeclared (first use in this function)
const-c.inc:811:20: error: ‘RPI_V2_GPIO_P5_03’ undeclared (first use in this function)
const-c.inc:818:20: error: ‘RPI_V2_GPIO_P1_24’ undeclared (first use in this function)
const-c.inc:823:20: error: ‘RPI_V2_GPIO_P5_04’ undeclared (first use in this function)
const-c.inc:830:20: error: ‘RPI_V2_GPIO_P1_05’ undeclared (first use in this function)
const-c.inc:835:20: error: ‘RPI_V2_GPIO_P1_15’ undeclared (first use in this function)
const-c.inc:840:20: error: ‘RPI_V2_GPIO_P1_35’ undeclared (first use in this function)
const-c.inc:845:20: error: ‘RPI_V2_GPIO_P5_05’ undeclared (first use in this function)
const-c.inc:852:20: error: ‘RPI_V2_GPIO_P1_16’ undeclared (first use in this function)
const-c.inc:857:20: error: ‘RPI_V2_GPIO_P1_26’ undeclared (first use in this function)
const-c.inc:862:20: error: ‘RPI_V2_GPIO_P1_36’ undeclared (first use in this function)
const-c.inc:867:20: error: ‘RPI_V2_GPIO_P5_06’ undeclared (first use in this function)
const-c.inc:874:20: error: ‘RPI_V2_GPIO_P1_07’ undeclared (first use in this function)
const-c.inc:879:20: error: ‘RPI_V2_GPIO_P1_37’ undeclared (first use in this function)
const-c.inc:886:20: error: ‘RPI_V2_GPIO_P1_08’ undeclared (first use in this function)
const-c.inc:891:20: error: ‘RPI_V2_GPIO_P1_18’ undeclared (first use in this function)
const-c.inc:896:20: error: ‘RPI_V2_GPIO_P1_38’ undeclared (first use in this function)
const-c.inc:903:20: error: ‘RPI_V2_GPIO_P1_19’ undeclared (first use in this function)
const-c.inc:908:20: error: ‘RPI_V2_GPIO_P1_29’ undeclared (first use in this function)
const-c.inc: In function ‘constant_18’:
const-c.inc:1214:20: error: ‘BCM2835_REGBASE_ST’ undeclared (first use in this function)
const-c.inc: In function ‘constant_19’:
const-c.inc:1376:20: error: ‘BCM2835_REGBASE_CLK’ undeclared (first use in this function)
const-c.inc:1439:20: error: ‘BCM2835_REGBASE_PWM’ undeclared (first use in this function)
const-c.inc: In function ‘constant_20’:
const-c.inc:1508:20: error: ‘BCM2835_REGBASE_BSC0’ undeclared (first use in this function)
const-c.inc:1513:20: error: ‘BCM2835_REGBASE_SPI0’ undeclared (first use in this function)
const-c.inc:1518:20: error: ‘RPI_BPLUS_GPIO_J8_10’ undeclared (first use in this function)
const-c.inc:1523:20: error: ‘RPI_BPLUS_GPIO_J8_40’ undeclared (first use in this function)
const-c.inc:1530:20: error: ‘BCM2835_REGBASE_BSC1’ undeclared (first use in this function)
const-c.inc:1535:20: error: ‘RPI_BPLUS_GPIO_J8_11’ undeclared (first use in this function)
const-c.inc:1540:20: error: ‘RPI_BPLUS_GPIO_J8_21’ undeclared (first use in this function)
const-c.inc:1545:20: error: ‘RPI_BPLUS_GPIO_J8_31’ undeclared (first use in this function)
const-c.inc:1552:20: error: ‘RPI_BPLUS_GPIO_J8_12’ undeclared (first use in this function)
const-c.inc:1557:20: error: ‘RPI_BPLUS_GPIO_J8_22’ undeclared (first use in this function)
const-c.inc:1562:20: error: ‘RPI_BPLUS_GPIO_J8_32’ undeclared (first use in this function)
const-c.inc:1569:20: error: ‘RPI_BPLUS_GPIO_J8_03’ undeclared (first use in this function)
const-c.inc:1574:20: error: ‘RPI_BPLUS_GPIO_J8_13’ undeclared (first use in this function)
const-c.inc:1579:20: error: ‘RPI_BPLUS_GPIO_J8_23’ undeclared (first use in this function)
const-c.inc:1584:20: error: ‘RPI_BPLUS_GPIO_J8_33’ undeclared (first use in this function)
const-c.inc:1591:20: error: ‘RPI_BPLUS_GPIO_J8_24’ undeclared (first use in this function)
const-c.inc:1598:20: error: ‘RPI_BPLUS_GPIO_J8_05’ undeclared (first use in this function)
const-c.inc:1603:20: error: ‘RPI_BPLUS_GPIO_J8_15’ undeclared (first use in this function)
const-c.inc:1608:20: error: ‘RPI_BPLUS_GPIO_J8_35’ undeclared (first use in this function)
const-c.inc:1615:20: error: ‘RPI_BPLUS_GPIO_J8_16’ undeclared (first use in this function)
const-c.inc:1620:20: error: ‘RPI_BPLUS_GPIO_J8_26’ undeclared (first use in this function)
const-c.inc:1625:20: error: ‘RPI_BPLUS_GPIO_J8_36’ undeclared (first use in this function)
const-c.inc:1632:20: error: ‘RPI_BPLUS_GPIO_J8_07’ undeclared (first use in this function)
const-c.inc:1637:20: error: ‘RPI_BPLUS_GPIO_J8_37’ undeclared (first use in this function)
const-c.inc:1644:20: error: ‘RPI_BPLUS_GPIO_J8_08’ undeclared (first use in this function)
const-c.inc:1649:20: error: ‘RPI_BPLUS_GPIO_J8_18’ undeclared (first use in this function)
const-c.inc:1654:20: error: ‘RPI_BPLUS_GPIO_J8_38’ undeclared (first use in this function)
const-c.inc:1661:20: error: ‘RPI_BPLUS_GPIO_J8_19’ undeclared (first use in this function)
const-c.inc:1666:20: error: ‘RPI_BPLUS_GPIO_J8_29’ undeclared (first use in this function)
const-c.inc:1760:20: error: ‘BCM2835_REGBASE_GPIO’ undeclared (first use in this function)
const-c.inc:1778:20: error: ‘BCM2835_REGBASE_PADS’ undeclared (first use in this function)
const-c.inc: In function ‘constant_21’:
const-c.inc:1993:20: error: ‘BCM2835_I2C_REASON_OK’ undeclared (first use in this function)
const-c.inc: In function ‘constant_27’:
const-c.inc:2279:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_1’ undeclared (first use in this function)
const-c.inc:2291:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_2’ undeclared (first use in this function)
const-c.inc:2303:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_4’ undeclared (first use in this function)
const-c.inc:2322:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_8’ undeclared (first use in this function)
const-c.inc: In function ‘constant_28’:
const-c.inc:2348:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_32’ undeclared (first use in this function)
const-c.inc:2367:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_64’ undeclared (first use in this function)
const-c.inc:2386:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_16’ undeclared (first use in this function)
const-c.inc: In function ‘constant_29’:
const-c.inc:2414:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_512’ undeclared (first use in this function)
const-c.inc:2426:20: error: ‘BCM2835_I2C_CLOCK_DIVIDER_626’ undeclared (first use in this function)
const-c.inc:2431:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_128’ undeclared (first use in this function)
const-c.inc:2443:20: error: ‘BCM2835_I2C_CLOCK_DIVIDER_148’ undeclared (first use in this function)
const-c.inc:2450:20: error: ‘BCM2835_I2C_CLOCK_DIVIDER_150’ undeclared (first use in this function)
const-c.inc:2455:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_256’ undeclared (first use in this function)
const-c.inc:2467:20: error: ‘BCM2835_I2C_REASON_ERROR_NACK’ undeclared (first use in this function)
const-c.inc:2474:20: error: ‘BCM2835_I2C_REASON_ERROR_CLKT’ undeclared (first use in this function)
const-c.inc:2481:20: error: ‘BCM2835_I2C_REASON_ERROR_DATA’ undeclared (first use in this function)
const-c.inc: In function ‘constant_30’:
const-c.inc:2503:20: error: ‘BCM2835_I2C_CLOCK_DIVIDER_2500’ undeclared (first use in this function)
const-c.inc:2517:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_1024’ undeclared (first use in this function)
const-c.inc:2536:20: error: ‘BCM2835_PWM_CLOCK_DIVIDER_2048’ undeclared (first use in this function)
Makefile:335: recipe for target 'BCM2835.o' failed
make: *** [BCM2835.o] Error 1
  MIKEM/Device-BCM2835-1.93.tar.gz
  /usr/bin/make -- NOT OK
Failed during this command:
 MIKEM/Device-BCM2835-1.93.tar.gz             : make NO

cpan[2]> 

stevieb9
Posts: 5
Joined: Fri Jan 13, 2017 2:40 pm

Re: Issue installing Device::BCM2835 using CPAN

Mon Feb 12, 2018 4:46 pm

I'm not sure how to solve the issue with that distribution, but depending on what you want to do with Perl, perhaps my RPi::WiringPi or my direct wiringPi wrapper WiringPi::API may do the job.

Return to “Other languages”

Who is online

Users browsing this forum: hansotten and 2 guests