[Buildroot] Issue compiling the library linux_libnfc-nci (from NXP)

Yann E. MORIN yann.morin.1998 at free.fr
Sun Oct 24 19:54:37 UTC 2021


Alassane, All,

On 2021-10-24 20:28 +0200, Alassane spake thusly:
> I'm trying to add the following package to buildroot and trying to compile it :  linux_libnfc-nci (
> [1]https://github.com/NXPNFCLinux/linux_libnfc-nci ).
> It was supposed not too be complicated but i'm actually struggling with that. the "configure" file is missing from the linux
> repository. To get the "configure" file, we must run the "bootstrap.sh" script, which is in the git repository, and
> contains the following commands:
> 
>  mkdir -p m4
>  aclocal
>  autoheader
>  libtoolize
>  automake --add-missing
>  autoreconf -fi
>  rm -Rf autom4te.cache

Usually, the proper solution to to just run autoreconf in your package,
by instructing Buildroot to do so. Assuming you name the package
linux_libnfc-nci, it should be enough to just write:

    LINUX_LIBNFC_NCI_AUTORECONF = YES

in your .mk file, and not call bootstrap at all.

You *may* need to create the m4 directory first with a pre-cnofigure
hook, but usually that has not been needed for a while now. If running
autoreconf fails because of a missign m4 directory, then you could try
adding something like:

    define LINUX_LIBNFC_NCI_M4
        mkdir -p $(@D)/m4
    endef
    LINUX_LIBNFC_NCI_PRE_CONFIGURE_HOOKS += LINUX_LIBNFC_NCI_M4

Regards,
Yann E. MORIN.

> I'm able to install this library on my host but i'm not able and even able to manually cross compile it but it doesn't work when
> trying to cross-compile it through buildroot (as a package), because of this "configure" file missing (the error i have is :
> "/bin/bash: ./configure: No such file or directory").
> Does anyone know how can i generate this "configure" file using buildroot? is it possible to run the "boostrap" with a specific line
> in the ".mk" file?
> Can i manually run the "bootstrap.sh" script and copy the "configure" file in the package build folder? is this a good method?
> I hope this is clear and that someone will be able to help with that.
> Kind regards
> Thank you
> 
> Links:
> 1. https://github.com/NXPNFCLinux/linux_libnfc-nci

> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list