WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling  (Read 1885 times)

Offline toprankingbadman

  • Newbie
  • *
  • Posts: 2
Compiling
« on: November 21, 2015, 07:58:11 AM »
Hi,

First post but long time lurker, I'd like to start by thanking the other forum members for solving several problems for me already!

I'm having trouble with adding C libraries for GPIO functions. I have been following this guide (http://www.airspayce.com/mikem/bcm2835/) but I keep getting the following errors while trying to compile:

tc@piCorePlayer:~/bcm2835-1.46$ make
make  all-recursive
make[1]: Entering directory '/home/tc/bcm2835-1.46'
Making all in src
make[2]: Entering directory '/home/tc/bcm2835-1.46/src'
gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT bcm2835.o -MD -MP -MF .deps/bcm2835.Tpo -c -o bcm2835.o bcm2835.c
In file included from /usr/include/errno.h:35:0,
                 from bcm2835.c:14:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
compilation terminated.
Makefile:549: recipe for target 'bcm2835.o' failed
make[2]: *** [bcm2835.o] Error 1
make[2]: Leaving directory '/home/tc/bcm2835-1.46/src'
Makefile:352: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/tc/bcm2835-1.46'
Makefile:292: recipe for target 'all' failed
make: *** [all] Error 2
tc@piCorePlayer:~/bcm2835-1.46$

I'm pretty sure I'm missing something obvious here but would appreciate any help. It looks to me as though the error is caused by base-dev not being loaded, however I can't seem to install 'base-dev.tcz' from the repo...

Apologies for being a noob.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1078
Re: Compiling
« Reply #1 on: November 21, 2015, 08:11:29 AM »
you need the linux kernel header files too

linux-4.1.y_api_headers.tcz

Offline toprankingbadman

  • Newbie
  • *
  • Posts: 2
Re: Compiling
« Reply #2 on: November 21, 2015, 08:37:47 AM »
you need the linux kernel header files too

linux-4.1.y_api_headers.tcz

Paul,

Thank you, that is very much appreciated.