96BoardsGPIO icon indicating copy to clipboard operation
96BoardsGPIO copied to clipboard

[make ERROR] Makefile:459: recipe for target 'lib96BoardsGPIO_la-gpio.lo' failedMakefile:459: recipe for target 'lib96BoardsGPIO_la-gpio.lo' failed

Open gubertoli opened this issue 7 years ago • 1 comments

Trying to configure 96BoardsGPIO and getting error:

linaro@linaro-alip:~/Desktop/dev/96BoardsGPIO$ make Making all in lib make[1]: Entering directory '/home/linaro/Desktop/dev/96BoardsGPIO/lib' /bin/bash ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME="96BoardsGPIO" -DPACKAGE_TARNAME="96boardsgpio" -DPACKAGE_VERSION="0.1" -DPACKAGE_STRING="96BoardsGPIO\ 0.1" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="96boardsgpio" -DVERSION="0.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -I../lib -g -O2 -MT lib96BoardsGPIO_la-gpio.lo -MD -MP -MF .deps/lib96BoardsGPIO_la-gpio.Tpo -c -o lib96BoardsGPIO_la-gpio.lo test -f 'gpio.c' || echo './'gpio.c libtool: compile: gcc -DPACKAGE_NAME="96BoardsGPIO" -DPACKAGE_TARNAME="96boardsgpio" -DPACKAGE_VERSION="0.1" "-DPACKAGE_STRING="96BoardsGPIO 0.1"" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="96boardsgpio" -DVERSION="0.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -I../lib -g -O2 -MT lib96BoardsGPIO_la-gpio.lo -MD -MP -MF .deps/lib96BoardsGPIO_la-gpio.Tpo -c gpio.c -fPIC -DPIC -o .libs/lib96BoardsGPIO_la-gpio.o gpio.c: In function ‘gpio_id’: gpio.c:63:17: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration] char *fixed = strdup(pin_name); ^~~~~~ gpio.c:63:17: warning: incompatible implicit declaration of built-in function ‘strdup’ gpio.c: In function ‘gpio_open’: gpio.c:98:41: error: ‘LS_SHARED’ undeclared (first use in this function) gpio *g = libsoc_gpio_request(gpio_id, LS_SHARED); ^~~~~~~~~ gpio.c:98:41: note: each undeclared identifier is reported only once for each function it appears in gpio.c:101:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if (!strcmp(direction, "in")) ^~~~~~ Makefile:459: recipe for target 'lib96BoardsGPIO_la-gpio.lo' failed make[1]: *** [lib96BoardsGPIO_la-gpio.lo] Error 1 make[1]: Leaving directory '/home/linaro/Desktop/dev/96BoardsGPIO/lib' Makefile:459: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

linaro@linaro-alip:~/Desktop/dev/96BoardsGPIO$ uname -a Linux linaro-alip 4.9.27-linaro-lt-qcom #1 SMP PREEMPT Wed May 10 19:59:33 UTC 2017 aarch64 GNU/Linux

gubertoli avatar Jun 08 '17 03:06 gubertoli

Looks like it needs LS_GPIO_SHARED installed of LS_SHARED

diff --git a/lib/gpio.c b/lib/gpio.c index 844c964..6cb8804 100644 --- a/lib/gpio.c +++ b/lib/gpio.c @@ -95,7 +95,7 @@ int gpio_open(unsigned int gpio_id, const char *direction) { int rc = -1; gpio_list *ptr;

  •   gpio *g = libsoc_gpio_request(gpio_id, LS_SHARED);
    
  •   gpio *g = libsoc_gpio_request(gpio_id, LS_GPIO_SHARED);
      if (!g)
              return rc;
      if (!strcmp(direction, "in"))
    

jguilfoy avatar Jul 12 '17 21:07 jguilfoy