Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gubertoli opened this issue Jun 8, 2017 · 1 comment

Comments

@gubertoli
Copy link

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

@jguilfoy
Copy link

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"))
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants