Skip to content

Compilation problem with put_log function #746

@amorirReverse

Description

@amorirReverse

Good morning,
I have a problem. when I try to use your project and compile it, it tells me that log_put is not defined but it is defined in the project with the LOG macro. here are screenshots.

`vagrant@bullseye:/vagrant/libs/libnfc$ make
make all-recursive
make[1]: Entering directory '/vagrant/libs/libnfc'
Making all in libnfc
make[2]: Entering directory '/vagrant/libs/libnfc/libnfc'
Making all in chips
make[3]: Entering directory '/vagrant/libs/libnfc/libnfc/chips'
CC libnfcchips_la-pn53x.lo
CCLD libnfcchips.la
make[3]: Leaving directory '/vagrant/libs/libnfc/libnfc/chips'
Making all in buses
make[3]: Entering directory '/vagrant/libs/libnfc/libnfc/buses'
CC libnfcbuses_la-empty.lo
CC libnfcbuses_la-spi.lo
CC libnfcbuses_la-uart.lo
CC libnfcbuses_la-usbbus.lo
CC libnfcbuses_la-i2c.lo
CCLD libnfcbuses.la
make[3]: Leaving directory '/vagrant/libs/libnfc/libnfc/buses'
Making all in drivers
make[3]: Entering directory '/vagrant/libs/libnfc/libnfc/drivers'
CC libnfcdrivers_la-acr122_usb.lo
acr122_usb.c: In function ‘acr122_usb_receive’:
acr122_usb.c:615:14: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
615 | int error, status;
| ^~~~~~
CC libnfcdrivers_la-acr122s.lo
CC libnfcdrivers_la-arygon.lo
CC libnfcdrivers_la-pn53x_usb.lo
CC libnfcdrivers_la-pn532_uart.lo
CC libnfcdrivers_la-pn532_spi.lo
CC libnfcdrivers_la-pn532_i2c.lo
CCLD libnfcdrivers.la
make[3]: Leaving directory '/vagrant/libs/libnfc/libnfc/drivers'
Making all in .
make[3]: Entering directory '/vagrant/libs/libnfc/libnfc'
CC libnfc_la-conf.lo
In file included from conf.c:28:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-iso14443-subr.lo
In file included from iso14443-subr.c:33:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-mirror-subr.lo
In file included from mirror-subr.c:33:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-nfc.lo
In file included from nfc.c:75:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
nfc.c: In function ‘nfc_register_driver’:
nfc.c:210:105: warning: ISO C99 requires at least one argument for the "..." in a variadic macro
210 | , NFC_LOG_PRIORITY_DEBUG, "nfc_register_driver returning NFC_EINVARG");
| ^

nfc.c: In function ‘nfc_device_validate_modulation’:
nfc.c:1306:118: warning: ISO C99 requires at least one argument for the "..." in a variadic macro
1306 | RIORITY_DEBUG, "nfc_device_validate_modulation returning NFC_EINVARG");
| ^

nfc.c:1310:114: warning: ISO C99 requires at least one argument for the "..." in a variadic macro
1310 | RIORITY_DEBUG, "nfc_device_validate_modulation returning NFC_EINVARG");
| ^

CC libnfc_la-nfc-device.lo
In file included from nfc-device.c:36:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-nfc-emulation.lo
CC libnfc_la-nfc-internal.lo
In file included from log.h:31,
from nfc-internal.h:43,
from nfc-internal.c:34:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-target-subr.lo
CC libnfc_la-log.lo
In file included from log.h:31,
from log.c:27:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CC libnfc_la-log-internal.lo
In file included from log-internal.h:31,
from log-internal.c:28:
config.h:5: warning: "SYSCONFDIR" redefined
5 | #define SYSCONFDIR "/etc"
|
: note: this is the location of the previous definition
CCLD libnfc.la
make[3]: Leaving directory '/vagrant/libs/libnfc/libnfc'
make[2]: Leaving directory '/vagrant/libs/libnfc/libnfc'
Making all in utils
make[2]: Entering directory '/vagrant/libs/libnfc/utils'
CC nfc-barcode.o
CC nfc-utils.lo
CCLD libnfcutils.la
CCLD nfc-barcode
/usr/bin/ld: ../libnfc/.libs/libnfc.so: undefined reference to log_put' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:546: nfc-barcode] Error 1 make[2]: Leaving directory '/vagrant/libs/libnfc/utils' make[1]: *** [Makefile:487: all-recursive] Error 1 make[1]: Leaving directory '/vagrant/libs/libnfc' make: *** [Makefile:394: all] Error 2 vagrant@bullseye:/vagrant/libs/libnfc$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions