Hi,
I tried to install BPI-WiringPi on BananaPi M3 with Raspian Jessie Mate…
But i have build failed Error…
root@OsaServer:~# sudo apt-get remove wiringpi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'wiringpi' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
root@OsaServer:~#
root@OsaServer:/home/pi# git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M3
Cloning into 'BPI-WiringPi'...
remote: Counting objects: 306, done.
remote: Total 306 (delta 0), reused 0 (delta 0), pack-reused 306
Receiving objects: 100% (306/306), 548.28 KiB | 480.00 KiB/s, done.
Resolving deltas: 100% (168/168), done.
Checking connectivity... done.
root@OsaServer:/home/pi# cd BPI-WiringPi
root@OsaServer:/home/pi/BPI-WiringPi# chmod +x ./build
root@OsaServer:/home/pi/BPI-WiringPi# sudo ./build
./build: 4: ./build: [[: not found
wiringPi Build script
=====================
WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
wiringPi.c:666:3: warning: excess elements in array initializer
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // ... 63
^
wiringPi.c:666:3: warning: (near initialization for ‘pinTobcm_BP’)
wiringPi.c:756:3: warning: excess elements in array initializer
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,},//PN
^
wiringPi.c:756:3: warning: (near initialization for ‘BP_PIN_MASK’)
wiringPi.c: In function ‘sunxi_gpio_unexports’:
wiringPi.c:798:13: warning: assignment makes integer from pointer without a cast
if ((fd = fopen ("/sys/class/gpio/unexport", "w")) == NULL)
^
wiringPi.c:798:56: warning: comparison between pointer and integer
if ((fd = fopen ("/sys/class/gpio/unexport", "w")) == NULL)
^
wiringPi.c:807:14: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast
fprintf (fd, "%d\n", pin) ;
^
In file included from wiringPi.c:55:0:
/usr/include/stdio.h:356:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘int’
extern int fprintf (FILE *__restrict __stream,
^
wiringPi.c:808:13: warning: passing argument 1 of ‘fclose’ makes pointer from integer without a cast
fclose (fd) ;
^
In file included from wiringPi.c:55:0:
/usr/include/stdio.h:237:12: note: expected ‘struct FILE *’ but argument is of type ‘int’
extern int fclose (FILE *__stream);
^
[Compile] softTone.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
wiringPi.c: At top level:
wiringPi.c:719:12: warning: ‘physToGpioR3’ defined but not used [-Wunused-variable]
static int physToGpioR3 [64] =//head num map to BCMpin
^
[Compile] mcp23s08.c
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3002.c
[Compile] mcp3004.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] sn3218.c
[Compile] drcSerial.c
[Compile] wpiExtensions.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]
WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] maxdetect.c
[Compile] piNes.c
[Compile] gertboard.c
[Compile] piFace.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]
GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
gpio.c: In function ‘doExports’:
gpio.c:428:5: warning: implicit declaration of function ‘sunxi_gpio_exports’ [-Wimplicit-function-declaration]
sunxi_gpio_exports();
^
gpio.c:420:20: warning: unused variable ‘pin’ [-Wunused-variable]
int i, l, first, pin;
^
gpio.c: In function ‘doUnexportall’:
gpio.c:757:5: warning: implicit declaration of function ‘sunxi_gpio_unexports’ [-Wimplicit-function-declaration]
sunxi_gpio_unexports();
^
gpio.c: At top level:
gpio.c:877:13: warning: ‘doPadDrive’ defined but not used [-Wunused-function]
static void doPadDrive (int argc, char *argv [])
^
gpio.c:965:13: warning: ‘doGbw’ defined but not used [-Wunused-function]
static void doGbw (int argc, char *argv [])
^
gpio.c:1007:13: warning: ‘doGbr’ defined but not used [-Wunused-function]
static void doGbr (int argc, char *argv [])
^
[Link]
/usr/bin/ld: gpio.o: undefined reference to symbol 'exit@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:51: recipe for target 'gpio' failed
make: *** [gpio] Error 1
Make Failed…
Please check the messages and fix any problems. If you’re still stuck,
then please email all the output and as many details as you can to
[email protected]