Libnfc installation for acr122u nfc reader compatibility

Posted on

Hi everyone, this is my first time asking a technical question in a community, so please excuse my clumsiness

I'm working on a Rhel 8 and I have to read nfc data with an nfc reader ACR122U, for configuring it, I need several libraries as pcsc-lite,libnfc.

I'm currently stuck on the libnfc install:

You cannot install it via package manager unless you download the .rpm file, which I tried, (first i had a log error saying that it couldn't find the libc.so package which is installed on my labtop, i avoid the issue by adding the option --skip broken)
I tried to see if the library was successfully installed with the CLI pkg-config --modversion linfc which returned me that there was no match
I looked inside my package rpm (libnfc-1.8.0) and there wasn't any header file neither .pc file, and it is the case for every libnfc rpm package available (they all start at lowest 1.8.0 version, whereas the 1.7.0 version contain the header and .pc files)

Another alternative is to download the libnfc repo via git which contain the necessary files, to configure/make/make install it.
When I execute ./configure the repo, everything is doing good except for this part

checking for libusb... no
checking for libusb-legacy... no
checking for libusb-config... no
checking usb.h usability... no
checking usb.h presence... no
checking for usb.h... no
configure: error: The libusb headers are missing

Fair enough I need the libusb library. There is a version of it on Rhel which is called libusbx coming with another one called libusbx-devel based on libusb-1.0. The thing is that even with those installed on my machine, with the headers, and the PKG_CONFIG_PATH leading to the repertory where libusb-1.0 stands, I still got this error (I also noticed that in the /usr/lib64/pkgconfig directory there wasn't the .pc file for libsub-1.0). So I uninstall those packages and tried to install libusb via the git repo which actually worked, I cheked the content of the directory(contain libusb-1.0.h ilibusb-1.0.pc) and I mentionned the PKG_CONFIG_PATH leading to it. When I execute the CLI pkg-config --modversion libusb-1.0, i get the current version installed which is the 1.0.26.

But still I still face the same error message when I ./configure my libnfc repo.
Does anyone have an idea on the subject?

Here are several links:
rpm repo for libnfc:"https://rpmfind.net/linux/rpm2html/search.php?query=libnfc"
git repo for libusb :"https://github.com/libusb/libusb/releases/tag/v1.0.26
Does anyone have an idea on the subject?

Many thanks in advance,

Arnaud Martin
Developper intern

Responses