0

I am having issues installing openOCD. I followed this tutorial and everything works perfectly until I try to make the file. I am getting these warnings and errors:

Makefile:4314: warning: overriding recipe for target 'check-recursive'
Makefile:3729: warning: ignoring old recipe for target 'check-recursive'
make  all-recursive
make[1]: Entering directory '/home/pi/openocd'
Makefile:4314: warning: overriding recipe for target 'check-recursive'
Makefile:3729: warning: ignoring old recipe for target 'check-recursive'
Making all in jimtcl
make[2]: Entering directory '/home/pi/openocd/jimtcl'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/pi/openocd/jimtcl'
Making all in src/jtag/drivers/libjaylink
make[2]: Entering directory '/home/pi/openocd/src/jtag/drivers/libjaylink'
make  all-recursive
make[3]: Entering directory '/home/pi/openocd/src/jtag/drivers/libjaylink'
Making all in libjaylink
make[4]: Entering directory '/home/pi/openocd/src/jtag/drivers/libjaylink/libjaylink'
make[4]: Warning: File '/usr/include/stdc-predef.h' has modification time 2294104 s in the future
/bin/bash ../libtool  --tag=CC --silent  --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Werror -fvisibility=hidden -I/usr/include/libusb-1.0  -g -O2 -MT libjaylink_la-buffer.lo -MD -MP -MF .deps/libjaylink_la-buffer.Tpo -c -o libjaylink_la-buffer.lo `test -f 'buffer.c' || echo './'`buffer.c
rm: cannot remove '.libs/libjaylink_la-buffer.o': Permission denied
Assembler messages:
Fatal error: can't create .libs/libjaylink_la-buffer.o: Permission denied
Makefile:505: recipe for target 'libjaylink_la-buffer.lo' failed
make[4]: *** [libjaylink_la-buffer.lo] Error 1
make[4]: Leaving directory '/home/pi/openocd/src/jtag/drivers/libjaylink/libjaylink'
Makefile:468: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/pi/openocd/src/jtag/drivers/libjaylink'
Makefile:374: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/pi/openocd/src/jtag/drivers/libjaylink'
Makefile:3729: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/openocd'
Makefile:1599: recipe for target 'all' failed
make: *** [all] Error 2

I have tried to Google these errors, but nothing worked. I also tried to make a clean install and reinstalling some packages. But I still get the same errors.

Could you help me correct these errors or guide me to the right path?

  • You may try to compile on only one CPU, as multi-core compiling isn't reliable. Use make instead of make -j4. I would also try to run sudo make, wich may be a bad practice, but can quicly solve the permission issues. – Technico.top Jun 2 '17 at 18:25
  • Ignore that; this has nothing to do with -j4, which is totally fine and reliable. This is obviously about permissions issues. Using sudo will get around that, but it seems a little strange there's a need for that if you are running this as pi from /home/pi or a subdirectory . – goldilocks Jun 2 '17 at 19:03
  • Multi-core compilation errors may occurs (race condition) but indeed, the problem seems to come from wrong permissions. – Technico.top Jun 2 '17 at 20:12
  • @goldilocks thank you for your answer. Unfortunately, I have tried make, sudo make, and sudo make j4; but still get the same error. And yes, I am running this as pi. I also tried reflashing the OS and reinstalling openOCD, but it did not work. Any other ideas? – Luis Jun 6 '17 at 7:21
  • What are the permissions for .libs – user67191 Jun 6 '17 at 8:24
1

I was able to resolve my problem following the installation steps mentioned in this tutorial.

From the tutorial, I did the following (after reflashing Raspian to my SD):

$ sudo apt-get build-dep openocd
$ sudo apt-get install git
$ git clone git://git.code.sf.net/p/openocd/code openocd
$ cd openocd
$ ./bootstrap 
$ ./configure --enable-bcm2835gpio 
$ sudo make
$ sudo make install

I do not know how or why this worked for me, but it did. I now have openOCD working in my Pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.