[buildgear-devel] compiling error when building libcap-2.22 for raspberrypi mini-distribution

Martin Lund martin.lund at keep-it-simple.com
Fri Apr 5 14:07:10 MDT 2013


Hi Vasile,

It turns out that libcap has a hardcoded check for PAM headers on the 
build system.

Specifically in libcap-2.22/Make.Rules it does:
line 68: PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h 
]; then echo yes ; else echo no ; fi)

Meaning, if you have pam_modules.h on your build system it would enable 
PAM support when cross compiling libcap. That of course fails because we 
don't support PAM in the stock mini-distribution.

To fix it we simple override the PAM_CAP option at compile time - I've 
already pushed this fix to cross-core. Also, I've cleaned up the 
Buildfile a bit:
https://github.com/mini-distribution/cross-core/commit/7ed89b238df64301488697a2a6baf9e086a17fae

If you want to test it now you can checkout and update the master branch 
of the cross-core submodule.

/Martin

On 2013-04-05 20:10, Elis POPESCU wrote:
> Hi,
>
> Apparently I'm having some problems when compiling the raspberrypi 
> mini-distribution for fs. I get an error when libcap-2.22 is compiled, 
> as you can see here:
>
> make[1]: Leaving directory 
> `/home/elisescu/workspace/raspberrypi/raspberrypi/build/work/cross/libcap/src/libcap-2.22/libcap' 
>                                            [26/252]
> make -C pam_cap all
> make[1]: Entering directory 
> `/home/elisescu/workspace/raspberrypi/raspberrypi/build/work/cross/libcap/src/libcap-2.22/pam_cap'
> arm-bcm2835-linux-gnueabi-gcc -O2 -D_LARGEFILE64_SOURCE 
> -D_FILE_OFFSET_BITS=64 -Dlinux -Wall -Wwrite-strings -Wpointer-arith 
> -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmiss
> ing-prototypes -Wnested-externs -Winline -Wshadow -g  -fPIC 
> -I/home/elisescu/workspace/raspberrypi/raspberrypi/build/work/cross/libcap/src/libcap-2.22/pam_cap/../libcap/include
>  -I/home/elisescu/workspace/raspberrypi/raspberrypi/build/work/cross/libcap/src/libcap-2.22/pam_cap/../libcap/include 
> -c pam_cap.c -o pam_cap.o
> pam_cap.c:19:34: fatal error: security/pam_modules.h: No such file or 
> directory
> compilation terminated.
> make[1]: *** [pam_cap.o] Error 1
> make[1]: Leaving directory 
> `/home/elisescu/workspace/raspberrypi/raspberrypi/build/work/cross/libcap/src/libcap-2.22/pam_cap'
> make: *** [all] Error 2
> ERROR: build() failed.
>
> I'm using Ubuntu 12.10 and buildgear 0.9.15beta. The command used to 
> build was: buildgear build fs.
>
> Vasile.
>
>
> _______________________________________________
> buildgear-devel mailing list
> buildgear-devel at buildgear.org
> http://buildgear.org/mailman/listinfo/buildgear-devel_buildgear.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildgear.org/pipermail/buildgear-devel_buildgear.io/attachments/20130405/a6bc6db0/attachment.html>


More information about the buildgear-devel mailing list