google / u2f-ref-code

U2F reference implementations
BSD 3-Clause "New" or "Revised" License
588 stars 182 forks source link

How to build u2f-test/HID #170

Open stephenwwu opened 6 years ago

stephenwwu commented 6 years ago

I can't build the code under Linux. The README only specify one command "make". Error message

Package hidapi-hidraw was not found in the pkg-config search path. Perhaps you should add the directory containing hidapi-hidraw.pc' to the PKG_CONFIG_PATH environment variable No package 'hidapi-hidraw' found make: *** No rule to make targethidapi/linux/hid.c', needed by `hid.o'. Stop.

Coconop commented 5 years ago

Looking at the makefile, it tests if you have hidapi-hidraw in your pkg-config. If so it will use it, otherwise it will use local sources. Indeed, the README also specifies :

DEPENDENCIES: git clone https://github.com/signal11/hidapi git clone -b lollipop-release https://android.googlesource.com/platform/system/core

So it means that you should have downloaded hidapi and core folders in the u2f-tests/HID/ folder to build correctly.