Linux NFC library build error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Linux NFC library build error

374 次查看
gredpath
Contributor III

I have setup up a new raspberry pi 4 and I am following the instructions AN13287 to build the library. The library build fails in module linux_nf_api.cpp:382:51 ndef_buffer_length <=0 are there some additional make file options  should be using?

I have installed the programs as set out in the app note.

Any help would be appreciated.

Thanks

George

libtool: compile: g++ -DHAVE_CONFIG_H -I. -DCONFIG_PATH=\"/usr/local/etc/\" -I./src/include -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nxp_nci_hal_libnfc-nci/src/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/gki/common -I./src/nxp_nci_hal_libnfc-nci/src/nfa/include -I./src/nxp_nci_hal_libnfc-nci/src/nfa/int -I./src/nxp_nci_hal_libnfc-nci/src/nfc/include -I./src/nxp_nci_hal_libnfc-nci/src/nfc/int -I./src/nxp_nci_hal_libnfc-nci/src/hal/include -I./src/nxp_nci_hal_libnfc-nci/src/hal/int -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware/nfc/1.1/ -I./src/android/utility/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/libnfc-utils/inc -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/android/utility/hardware/ -I./src/android/utility/android/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/inc/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/dnld/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/hal/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware -I./src/nfcandroid_nfc_hidlimpl/halimpl/self-test -I./src/nfcandroid_nfc_hidlimpl/halimpl/mifare -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml/transport -I./src/nfcandroid_nfc_hidlimpl/halimpl/src/include -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/ -I./src/nxp_nci_hal_libnfc-nci/utils/include -I./src/nxp_nci_hal_libnfc-nci/utils -I./src/nfcandroid_nfc_hidlimpl/extns/impl/ -I./src/android/secure_element/extns/impl/ -I./src/android/utility/base/ -I./src/libnfc-utils/inc -I./src/service/interface -I./src/service/utils -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/inc -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/common -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/mifare -I./src/nxp_nci_hal_nfc/nci/jni/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log -DNDEBUG -pthread -w -DNFC_NXP_NOT_OPEN_INCLUDED=TRUE -DNXP_HW_SELF_TEST -DNXP_NFC_NATIVE_ENABLE_HCE=TRUE -DNFC_NXP_LLCP_SECURED_P2P=FALSE -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE -DNXP_NEW_MW_API_COMPATIBILITY -DNXP_EXTNS=TRUE -DLINUX -DSNEP_ENABLED -I./firmware/pn7160 -O2 -MT src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/phNxpExtns.lo -MD -MP -MF src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/.deps/phNxpExtns.Tpo -c src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/phNxpExtns.cpp -o src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/phNxpExtns.o >/dev/null 2>&1
depbase=`echo src/service/linux_nfc_api.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -DCONFIG_PATH='"/usr/local/etc/"' -I./src/include -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nxp_nci_hal_libnfc-nci/src/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/gki/common -I./src/nxp_nci_hal_libnfc-nci/src/nfa/include -I./src/nxp_nci_hal_libnfc-nci/src/nfa/int -I./src/nxp_nci_hal_libnfc-nci/src/nfc/include -I./src/nxp_nci_hal_libnfc-nci/src/nfc/int -I./src/nxp_nci_hal_libnfc-nci/src/hal/include -I./src/nxp_nci_hal_libnfc-nci/src/hal/int -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware/nfc/1.1/ -I./src/android/utility/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/libnfc-utils/inc -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/android/utility/hardware/ -I./src/android/utility/android/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/inc/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/dnld/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/hal/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware -I./src/nfcandroid_nfc_hidlimpl/halimpl/self-test -I./src/nfcandroid_nfc_hidlimpl/halimpl/mifare -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml/transport -I./src/nfcandroid_nfc_hidlimpl/halimpl/src/include -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/ -I./src/nxp_nci_hal_libnfc-nci/utils/include -I./src/nxp_nci_hal_libnfc-nci/utils -I./src/nfcandroid_nfc_hidlimpl/extns/impl/ -I./src/android/secure_element/extns/impl/ -I./src/android/utility/base/ -I./src/libnfc-utils/inc -I./src/service/interface -I./src/service/utils -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/inc -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/common -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/mifare -I./src/nxp_nci_hal_nfc/nci/jni/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log -DNDEBUG -pthread -w -DNFC_NXP_NOT_OPEN_INCLUDED=TRUE -DNXP_HW_SELF_TEST -DNXP_NFC_NATIVE_ENABLE_HCE=TRUE -DNFC_NXP_LLCP_SECURED_P2P=FALSE -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE -DNXP_NEW_MW_API_COMPATIBILITY -DNXP_EXTNS=TRUE -DLINUX -DSNEP_ENABLED -I./firmware/pn7160 -O2 -MT src/service/linux_nfc_api.lo -MD -MP -MF $depbase.Tpo -c -o src/service/linux_nfc_api.lo src/service/linux_nfc_api.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -DCONFIG_PATH=\"/usr/local/etc/\" -I./src/include -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nxp_nci_hal_libnfc-nci/src/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/gki/common -I./src/nxp_nci_hal_libnfc-nci/src/nfa/include -I./src/nxp_nci_hal_libnfc-nci/src/nfa/int -I./src/nxp_nci_hal_libnfc-nci/src/nfc/include -I./src/nxp_nci_hal_libnfc-nci/src/nfc/int -I./src/nxp_nci_hal_libnfc-nci/src/hal/include -I./src/nxp_nci_hal_libnfc-nci/src/hal/int -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware/nfc/1.1/ -I./src/android/utility/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/libnfc-utils/inc -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/android/utility/hardware/ -I./src/android/utility/android/ -I./src/nxp_nci_hal_libnfc-nci/src/gki/ulinux -I./src/nxp_nci_hal_libnfc-nci/src/include -I./src/nfcandroid_nfc_hidlimpl/halimpl/utils/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/inc/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/common/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/dnld/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/hal/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/android/hardware -I./src/nfcandroid_nfc_hidlimpl/halimpl/self-test -I./src/nfcandroid_nfc_hidlimpl/halimpl/mifare -I./src/nfcandroid_nfc_hidlimpl/halimpl/tml/transport -I./src/nfcandroid_nfc_hidlimpl/halimpl/src/include -I./src/nxp_nci_hal_libnfc-nci/src/fuzzers/inc/ -I./src/nxp_nci_hal_libnfc-nci/utils/include -I./src/nxp_nci_hal_libnfc-nci/utils -I./src/nfcandroid_nfc_hidlimpl/extns/impl/ -I./src/android/secure_element/extns/impl/ -I./src/android/utility/base/ -I./src/libnfc-utils/inc -I./src/service/interface -I./src/service/utils -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/inc -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/common -I./src/nxp_nci_hal_nfc/nci/jni/extns/pn54x/src/mifare -I./src/nxp_nci_hal_nfc/nci/jni/ -I./src/nfcandroid_nfc_hidlimpl/halimpl/log -DNDEBUG -pthread -w -DNFC_NXP_NOT_OPEN_INCLUDED=TRUE -DNXP_HW_SELF_TEST -DNXP_NFC_NATIVE_ENABLE_HCE=TRUE -DNFC_NXP_LLCP_SECURED_P2P=FALSE -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE -DNXP_NEW_MW_API_COMPATIBILITY -DNXP_EXTNS=TRUE -DLINUX -DSNEP_ENABLED -I./firmware/pn7160 -O2 -MT src/service/linux_nfc_api.lo -MD -MP -MF src/service/.deps/linux_nfc_api.Tpo -c src/service/linux_nfc_api.cpp -fPIC -DPIC -o src/service/.libs/linux_nfc_api.o
src/service/linux_nfc_api.cpp: In function 'int doReadT4tData(unsigned char*, unsigned char*, int*)':
src/service/linux_nfc_api.cpp:382:51: error: ordered comparison of pointer with integer zero ('int*' and 'int')
382 | if (ndef_buffer == NULL || ndef_buffer_length <= 0) {
| ~~~~~~~~~~~~~~~~~~~^~~~
make[1]: *** [Makefile:1920: src/service/linux_nfc_api.lo] Error 1
make[1]: Leaving directory '/home/gredpath/linux_libnfc-nci'
make: *** [Makefile:895: all] Error 2

0 项奖励
回复
1 回复

351 次查看
danielchen
NXP TechSupport
NXP TechSupport

HI @gredpath :

 

There is a patch for 64bit inside the source package.   Please apply it manually.  then you can fix this issue.

danielchen_0-1720427621786.png

 

 

Regards

Daniel

 

标记 (1)
0 项奖励
回复