Проблемы установки / компиляции mfcuk / libnfc в Windows

3921
Drake

После многих проблем, я думаю, я успешно установил / скомпилировал libnfc, используя эти инструкции .

Сейчас я пытаюсь скомпилировать / установить mfcuk. Как только я попадаю на шаг ./configure, я получаю следующую ошибку

Sam@Sam-PC /c/Users/Sam/Documents/mfcuk/mfcuk-read-only $ ./configure checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe 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 a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 ./configure: line 3739: syntax error near unexpected token `LIBNFC,' ./configure: line 3739: `PKG_CHECK_MODULES(LIBNFC, libnfc >= $LIBNFC_REQUIRED_VE RSION,, AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))' 

Я предполагаю, что это как-то связано с тем, что я что-то неправильно говорю (pkg-config?), Где находится libnfc? Любая помощь с благодарностью.

2

2 ответа на вопрос

0
Horn OK Please

A "syntax error" is usually not the expected error message if pkg-config can't find a module. But it may be that the properly installed libnfc will provide the LIBNFC macro that configure purports to be unable to find.

You could try ./autogen.sh and then re-run configure; that might help if the default shipped configure script is bad (autogen.sh regenerates configure from configure.in, provided you have the correct dependencies installed (autoconf, automake, GNU make, and, usually, libtool.)

If that doesn't work, you need to run ./configure --help and figure out the environment variables to specify to manually set the path to libnfc's headers and libraries. The paths to actually set in the environment will depend entirely on where (if anywhere) you installed libnfc... the headers are the .h files and the libs are the .dll files (or .a files if you're compiling statically).

Don't have specific experience with mfcuk but autoconf stuff should work the same between packages... I do have a fair bit of experience with autoconf on Windows/MinGW32. So post back if you get stuck.

Невозможно получить что-то отсюда, чтобы изменить ситуацию. ./autogen.sh не запускается, ничто в ./configure --help, кажется, не особенно похоже на опцию установки переменных среды для libnfc (хотя я установил их в окнах). Я попробовал --libexecdir, чтобы безрезультатно. Drake 11 лет назад 0
0
harrymc

Если пакет, который вы компилируете, это nfc-tools, то эта проблема описана в выпуске 76: Компиляция libnfc-llcp - ошибка .

Утверждается, что это было исправлено в редакции r955 от 18 октября 2011 года:

libnfc-llcp: установите mqueue.h и pkg-config в качестве требований в файле configure.ac (исправление проблемы 76)

Вы можете попытаться получить более новую версию configure.ac, чтобы исправить ошибку.

На странице загрузки перечислены последние версии nfc-eventd-0.1.5.tar.gz от ноября 2011 года, которые могут быть полезны, или вы можете попробовать исходный код svn .

Похожие вопросы