WiringPi / WiringPi-Perl

Perl wrapped version of Gordon's Arduino-like WiringPi for the Raspberry Pi
13 stars 11 forks source link

Build Fails #7

Open Nexis81 opened 8 years ago

Nexis81 commented 8 years ago

I'm not able to build. Below is the message I'm getting with an output of perl -v and the location of EXTERN.h on my system. Raspberry PI 2 B

:~/WiringPi-Perl# ./build.sh

`
wiringpi_wrap.c:730:20: fatal error: EXTERN.h: No such file or directory
 #include "EXTERN.h"
                    ^
compilation terminated.
WiringPi/wiringPi/wiringPi.c: In function ‘wiringPiSetup’:
WiringPi/wiringPi/wiringPi.c:315:18: warning: incompatible implicit declaration of built-in function ‘malloc’
   if ((gpioMem = malloc (BLOCK_SIZE + (PAGE_SIZE-1))) == NULL)
                  ^
gcc: error: wiringpi_wrap.o: No such file or directory

:~/WiringPi-Perl# perl -v

This is perl 5, version 20, subversion 2 (v5.20.2) built for arm-linux-gnueabihf-thread-multi-64int
(with 42 registered patches, see perl -V for more detail)

:~/WiringPi-Perl# locate EXTERN.h

/usr/lib/arm-linux-gnueabihf/perl/5.20.2/CORE/EXTERN.h
woodscooter commented 8 years ago

The version of Perl needs to be updated in the build.sh script to have the correct include path. Try the command "ls -l /usr/lib/perl/" to see what version of perl your Pi has. ( It's 5.20.2 in your case) Then edit WiringPi-Perl/build.sh to match.

There is a fix for this: It's an open pull request that's dated January 2014. Really, it's time to merge it!