Topic: libnfc-1.3.9 and Snow Leopard

Trying to compile libnfc-1.3.9 on my Snow Leopard so I can work with touchatag readers. I've installed:

- libusb (http://www.ellert.se/twain-sane/)
- libusb-compat (Homebrew)
- pcsc-lite-1.6.4 (Compiled the source code)
- updated SmartCard drivers (from the touchatag website, http://www.acs.com.hk/drivers/eng/ACR12 … 101_P.zip)

I then ran: ./configure --prefix=/opt/local

(...)
Selected drivers:
   acr122........... yes
   arygon........... yes
   pn531_usb........ yes
   pn532_uart....... no
   pn533_usb........ yes

But when I ran make:

make  all-recursive
Making all in libnfc
Making all in chips
make[3]: Nothing to be done for `all'.
Making all in buses
make[3]: Nothing to be done for `all'.
Making all in drivers
  CC     libnfcdrivers_la-acr122.lo
acr122.c:38:22: error: winscard.h: No such file or directory
acr122.c:41:24: error: wintypes.h: No such file or directory
acr122.c:70: error: expected specifier-qualifier-list before ‘SCARDHANDLE’
acr122.c:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_SCardContext’
acr122.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
acr122.c: In function ‘acr122_free_scardcontext’:
acr122.c:95: warning: implicit declaration of function ‘SCardReleaseContext’
acr122.c:95: error: ‘_SCardContext’ undeclared (first use in this function)
acr122.c:95: error: (Each undeclared identifier is reported only once
acr122.c:95: error: for each function it appears in.)
acr122.c: In function ‘acr122_list_devices’:
acr122.c:140: error: ‘SCARDCONTEXT’ undeclared (first use in this function)
acr122.c:140: error: ‘pscc’ undeclared (first use in this function)
acr122.c:150: warning: implicit declaration of function ‘acr122_get_scardcontext’
acr122.c:155: warning: implicit declaration of function ‘SCardListReaders’
acr122.c:155: error: ‘SCARD_S_SUCCESS’ undeclared (first use in this function)
acr122.c: In function ‘acr122_connect’:
acr122.c:200: error: ‘SCARDCONTEXT’ undeclared (first use in this function)
acr122.c:200: error: ‘pscc’ undeclared (first use in this function)
acr122.c:208: warning: implicit declaration of function ‘SCardConnect’
acr122.c:208: error: ‘SCARD_SHARE_EXCLUSIVE’ undeclared (first use in this function)
acr122.c:208: error: ‘SCARD_PROTOCOL_T0’ undeclared (first use in this function)
acr122.c:208: error: ‘SCARD_PROTOCOL_T1’ undeclared (first use in this function)
acr122.c:208: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:209: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:209: error: ‘SCARD_S_SUCCESS’ undeclared (first use in this function)
acr122.c:211: error: ‘SCARD_SHARE_DIRECT’ undeclared (first use in this function)
acr122.c:211: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:211: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:219: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:219: error: ‘SCARD_IO_REQUEST’ undeclared (first use in this function)
acr122.c: In function ‘acr122_disconnect’:
acr122.c:249: warning: implicit declaration of function ‘SCardDisconnect’
acr122.c:249: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:249: error: ‘SCARD_LEAVE_CARD’ undeclared (first use in this function)
acr122.c: In function ‘acr122_transceive’:
acr122.c:281: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:281: error: ‘SCARD_PROTOCOL_UNSET’ undeclared (first use in this function)
acr122.c:283: warning: implicit declaration of function ‘SCardControl’
acr122.c:283: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:284: error: ‘SCARD_S_SUCCESS’ undeclared (first use in this function)
acr122.c:289: warning: implicit declaration of function ‘SCardTransmit’
acr122.c:289: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:289: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:296: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:296: error: ‘SCARD_PROTOCOL_T0’ undeclared (first use in this function)
acr122.c:310: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:310: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c: In function ‘acr122_firmware’:
acr122.c:347: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:347: error: ‘SCARD_PROTOCOL_UNSET’ undeclared (first use in this function)
acr122.c:349: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:353: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:353: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c: In function ‘acr122_led_red’:
acr122.c:374: error: ‘acr122_spec_t’ has no member named ‘ioCard’
acr122.c:374: error: ‘SCARD_PROTOCOL_UNSET’ undeclared (first use in this function)
acr122.c:376: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:377: error: ‘SCARD_S_SUCCESS’ undeclared (first use in this function)
acr122.c:380: error: ‘acr122_spec_t’ has no member named ‘hCard’
acr122.c:380: error: ‘acr122_spec_t’ has no member named ‘ioCard’
make[3]: *** [libnfcdrivers_la-acr122.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Re: libnfc-1.3.9 and Snow Leopard

IMHO you compiled pcsc-lite but it's not installed or it's not in the path where the compiler is looking for.
As you can see:

acr122.c:38:22: error: winscard.h: No such file or directory
acr122.c:41:24: error: wintypes.h: No such file or directory

winscard.h and wintypes.h are not found by the compiler.

Verify if pcsc-lite is installed properly, did you type make install after compiling ?

Re: libnfc-1.3.9 and Snow Leopard

Thanks for the reply smile

Regarding pcsc-lite-1.6.4, I've installed it doing:

./configure --disable-libhal
make
sudo make install

At the end of this last line, it returns:

Making install in example
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.

Re: libnfc-1.3.9 and Snow Leopard

Wow fantastic !
Did you check where it was installed ?
When you ran ./configure did it find pcsc-lite ?

Re: libnfc-1.3.9 and Snow Leopard

rleo79 wrote:

Wow fantastic !
Did you check where it was installed ?
When you ran ./configure did it find pcsc-lite ?

Sorry, I'm kinda new to MacOSX. Do you mean when I did ./configure in libnfc?

Re: libnfc-1.3.9 and Snow Leopard

My ./configure of libnfc returns:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i386-apple-darwin10.4.0
checking host system type... i386-apple-darwin10.4.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdbool.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for bzero... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for usleep... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for int32_t... yes
checking return type of signal handlers... void
checking for debug flag... no
checking which drivers to build... default drivers
checking for serial autoprobe flag... no
checking for documentation request... no
checking for indent... /usr/bin/indent
checking for gindent... no
checking pkg-config is at least version 0.9.0... yes
checking for libusb... yes
checking for PC/SC... yes: darwin PC/SC framework
checking whether to use Cutter... (cached) auto
checking for CUTTER... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/nfc/Makefile
config.status: creating libnfc/chips/Makefile
config.status: creating libnfc/buses/Makefile
config.status: creating libnfc/drivers/Makefile
config.status: creating libnfc/Makefile
config.status: creating examples/Makefile
config.status: creating cmake_modules/Makefile
config.status: creating test/Makefile
config.status: creating libnfc.pc
config.status: creating Doxyfile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

Selected drivers:
   acr122........... yes
   arygon........... yes
   pn531_usb........ yes
   pn532_uart....... no
   pn533_usb........ yes

Didn't find any mention of pscs-lite hmm

Re: libnfc-1.3.9 and Snow Leopard

Hello,

Rorsch wrote:

My ./configure of libnfc returns:

[...]
checking for PC/SC... yes: darwin PC/SC framework
[...]

Didn't find any mention of pscs-lite hmm

I seems the configure script correctly detect your PC/SC framework: the MacOS stack (which is based on pcsc-lite) will be used in this case.

BTW, even it detect correctly the framework, it seems that it doesn't compile against the PC/SC internal framework because the right include directory is missing.

Romuald Conty

Re: libnfc-1.3.9 and Snow Leopard

Thanks for your help rconty. With the fixed version you sent me, make returns:

make  all-recursive
Making all in libnfc
Making all in chips
  CC     libnfcchips_la-pn53x.lo
  CCLD   libnfcchips.la
Making all in buses
  CC     libnfcbuses_la-uart.lo
  CCLD   libnfcbuses.la
Making all in drivers
  CC     libnfcdrivers_la-acr122.lo
In file included from acr122.c:38:
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:90: error: expected declaration specifiers or ‘...’ before ‘LPSCARD_READERSTATE_A’
make[3]: *** [libnfcdrivers_la-acr122.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Re: libnfc-1.3.9 and Snow Leopard

Rorsch wrote:

Thanks for your help rconty. With the fixed version you sent me, make returns:

[...]
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:90: error: expected declaration specifiers or ‘...’ before ‘LPSCARD_READERSTATE_A’
[...]

Humm, that's strange Roel just confirm to me that work...
Roel, any idea?

Romuald Conty

Re: libnfc-1.3.9 and Snow Leopard

Any idea Roel? sad

Re: libnfc-1.3.9 and Snow Leopard

Rorsch wrote:

Any idea Roel? sad

Under MacOS X, you don't need to build and install libpcsc-lite, its a part of MacOS X. Are you sure your system is clean ? because the problem seems to be in a system file...
If you have installed libpcsc-lite please remove it and retry.

Remember to "make clean" before re-run "make" on libnfc. (or "make clean all")

Romuald Conty

Re: libnfc-1.3.9 and Snow Leopard

Even make clean all returns an error:

Making clean in test
test -z "" || rm -f 
rm -rf .libs _libs
test -z "" || rm -f 
rm -f *.o
rm -f *.lo
Making clean in cmake_modules
rm -rf .libs _libs
rm -f *.lo
Making clean in include
Making clean in nfc
rm -rf .libs _libs
rm -f *.lo
Making clean in .
rm -rf .libs _libs
rm -f *.lo
Making clean in examples
 rm -f nfc-anticol nfc-list nfc-mfclassic nfc-mfultralight nfc-relay nfc-emulate nfcip-target nfcip-initiator nfc-poll pn53x-diagnose nfc-sam
rm -rf .libs _libs
test -z "libnfcutils.la" || rm -f libnfcutils.la
rm -f "./so_locations"
rm -f *.o
rm -f *.lo
Making clean in libnfc
Making clean in drivers
rm -rf .libs _libs
test -z "libnfcdrivers.la" || rm -f libnfcdrivers.la
rm -f "./so_locations"
rm -f *.o
rm -f *.lo
Making clean in buses
rm -rf .libs _libs
test -z "libnfcbuses.la" || rm -f libnfcbuses.la
rm -f "./so_locations"
rm -f *.o
rm -f *.lo
Making clean in chips
rm -rf .libs _libs
test -z "libnfcchips.la" || rm -f libnfcchips.la
rm -f "./so_locations"
rm -f *.o
rm -f *.lo
Making clean in .
test -z "libnfc.la" || rm -f libnfc.la
rm -f "./so_locations"
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
Making clean in .
test -z "Doxygen.log" || rm -f Doxygen.log
rm -rf .libs _libs
rm -f *.lo
make  all-recursive
Making all in libnfc
Making all in chips
  CC     libnfcchips_la-pn53x.lo
  CCLD   libnfcchips.la
Making all in buses
  CC     libnfcbuses_la-uart.lo
  CCLD   libnfcbuses.la
Making all in drivers
  CC     libnfcdrivers_la-acr122.lo
In file included from acr122.c:38:
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:90: error: expected declaration specifiers or ‘...’ before ‘LPSCARD_READERSTATE_A’
make[3]: *** [libnfcdrivers_la-acr122.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Sorry for the ignorant question, but how can I remove the pcsc-lite-1.6.4 I manually compiled?

Re: libnfc-1.3.9 and Snow Leopard

Rorsch wrote:

Even make clean all returns an error:

make clean all is similar to make clean && make all

Rorsch wrote:

Sorry for the ignorant question, but how can I remove the pcsc-lite-1.6.4 I manually compiled?

After compiling it, you ran make install ? If so, just make uninstall from the sources folder.

Romuald Conty

Re: libnfc-1.3.9 and Snow Leopard

I've managed to install libnfc, thank you rconty.

Strangely, when I run nfc-list it always tells me that No device was found.

I noticed that in the readme.txt for the RFID reader's drivers it says:

It will install acsccid driver package and pcscd_autostart package from OpenSC project.

Might the pcscd_autostart be causing this?

Last edited by Rorsch (2010-10-07 17:39:39)

Re: libnfc-1.3.9 and Snow Leopard

Yes, that did it smile

Thanks a lot for your help.

Re: libnfc-1.3.9 and Snow Leopard

Hi Rorsch,

What ended up fixing this problem for you?

In file included from acr122.c:38:
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:90: error: expected declaration specifiers or ‘...’ before ‘LPSCARD_READERSTATE_A’

I'm getting the same thing. Thanks!

Re: libnfc-1.3.9 and Snow Leopard

timmerk wrote:

Hi Rorsch,

What ended up fixing this problem for you?

In file included from acr122.c:38:
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:90: error: expected declaration specifiers or ‘...’ before ‘LPSCARD_READERSTATE_A’

I'm getting the same thing. Thanks!

I removed the pcscd_autostart package and rebooted the computer smile

Re: libnfc-1.3.9 and Snow Leopard

Thanks Rorsch, that worked!

Re: libnfc-1.3.9 and Snow Leopard

Rorsch wrote:

My ./configure of libnfc returns:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i386-apple-darwin10.4.0
checking host system type... i386-apple-darwin10.4.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdbool.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for bzero... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for usleep... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for int32_t... yes
checking return type of signal handlers... void
checking for debug flag... no
checking which drivers to build... default drivers
checking for serial autoprobe flag... no
checking for documentation request... no
checking for indent... /usr/bin/indent
checking for gindent... no
checking pkg-config is at least version 0.9.0... yes
checking for libusb... yes
checking for PC/SC... yes: darwin PC/SC framework
checking whether to use Cutter... (cached) auto
checking for CUTTER... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/nfc/Makefile
config.status: creating libnfc/chips/Makefile
config.status: creating libnfc/buses/Makefile
config.status: creating libnfc/drivers/Makefile
config.status: creating libnfc/Makefile
config.status: creating examples/Makefile
config.status: creating cmake_modules/Makefile
config.status: creating test/Makefile
config.status: creating libnfc.pc
config.status: creating Doxyfile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

Selected drivers:
   acr122........... yes
   arygon........... yes
   pn531_usb........ yes
   pn532_uart....... no
   pn533_usb........ yes

Didn't find any mention of pscs-lite hmm

I have exactly the same problem, just got the same errors when i tried to install libnfc-1.3.9. only difference is that I use MacOS 10.5 (Leopard). Rorsch, you we're talking about a fixed version of libnfc that solved your problem. Where can I find this 'fixed version'?

Re: libnfc-1.3.9 and Snow Leopard

attrib wrote:

I have exactly the same problem, just got the same errors when i tried to install libnfc-1.3.9. only difference is that I use MacOS 10.5 (Leopard). Rorsch, you we're talking about a fixed version of libnfc that solved your problem. Where can I find this 'fixed version'?

I think that's the version that it's now live.

Re: libnfc-1.3.9 and Snow Leopard

Am I missing something? I just downloaded the libnfc-1.3.9 at http://code.google.com/p/libnfc/downloa … n=2&q=

It has the uploaded date of Sept 07 and your post is from the date sept 28, so I don't think your version is live.
Can you send it to me or tell where to get it?

Thanks!

Re: libnfc-1.3.9 and Snow Leopard

Ok nevermind, I installed the development version and I almost got the same error you had.

make  all-recursive
Making all in libnfc
Making all in chips
make[3]: Nothing to be done for `all'.
Making all in buses
make[3]: Nothing to be done for `all'.
Making all in drivers
  CC     libnfcdrivers_la-acr122.lo
In file included from acr122.c:38:
/System/Library/Frameworks/PCSC.framework/Headers/winscard.h:88: error: syntax error before 'LPSCARD_READERSTATE_A'
make[3]: *** [libnfcdrivers_la-acr122.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

After this, I did a "make clean all" at my pcsc-lite-1.6.4 and run make again with libnfc but still got the same error.
Any idea what to do?

Re: libnfc-1.3.9 and Snow Leopard

attrib wrote:

After this, I did a "make clean all" at my pcsc-lite-1.6.4 and run make again with libnfc but still got the same error.
Any idea what to do?

Remove pcsc-lite-1.6.4 all together

Re: libnfc-1.3.9 and Snow Leopard

Thanks a lot for your help Rorsch!
I did a make uninstall on pcsc-lite and after that I did a configure/make/make install at the libnfc source without any errors.
But my ACR122U just acts strangely.

I installed the drivers from http://www.acs.com.hk/index.php?pid=dri … id=ACR122U
Tried to install from source but got an error while running ./MacOSX/configure
It couldn't find /usr/local/lib/libusb.a
But a matter of fact, it's just there. I even used "./configure LIBUSB_LIBS=/usr/local/lib/libusb.a" but with no result.

I installed the libusb binary (and later SDK) from http://www.ellert.se/twain-sane/
I even tried the latest versions from http://www.libusb.org/

After trying that I used the installer from the ACS website to get the ACR122U drivers to work.
Well that kinda work out. After a reboot the led of the ACR122 starts to turn red. When I place a MIFARE card on it, nothing happens. But now the interesting thing, when I remove the pcscd_autostart package, ACR122 starts to react when I put a card on top of it and the led turns green (as it should be). I tried to run nfc-list (because compiling libnfc seemed to be OK) but unfortunately nfc-list says that the device cannot be found:

nfc-list: INFO: No device found.

Oh and, when I reboot again my ACR122 doesn't give a light at all. No red, no green ones, it only blinks a couple of short times when MacOS 10.5 starts up.

What could I missed?
And why will it not find libusb.a correctly?
On my windows machine my ACR122 just works perfectly.
Can someone please help me out?

Re: libnfc-1.3.9 and Snow Leopard

What reader do you have?