Как собрать MFOC из исходников на Kali Linux? - PullRequest
0 голосов
/ 25 февраля 2019

Мне нужно настроить и сделать GitHub |MFOC , но когда я запускаю ./configure, он говорит:

# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... 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 whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
#Here the error
./configure: line 3930: syntax error near unexpected token `libnfc,'
./configure: line 3930: `PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))'

Я подумал о 3 возможных причинах ошибки:

  1. Ошибка возникает, потому что естьразличия между запрошенным путем или именем.

На самом деле, Synaptic говорит, что libnfc в моем Kali Linux имеет вид:

library: libnfc5, 1.7.1-b4
binaries: libnfc-bin, 1.7.1-b4

Так что, возможно, проблема в том, что 5 впереди libnfc

Ожидаемый путь отличается

Libnfc 1.7.1 не поддерживается, так как последнее обновление (строка 16 из ChangeLog ) для 1,7.0.

Можете ли вы помочь мне, пожалуйста?


Я сообщаю о помощи для настройки, может быть, это интересно

# ./configure -help
`configure' configures mfoc 0.10.7 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/mfoc]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Ответы [ 2 ]

0 голосов
/ 04 марта 2019

Спасибо @ Бодо, я просто клонировал не ту ветку.Я знаю, что я отличный нуб, но постепенно я учусь.Еще раз большое спасибо.

0 голосов
/ 03 марта 2019

Сообщение об ошибке не означает, что в вашей системе что-то не так с libnfc. Что-то не так в скрипте оболочки configure.

Скрипт configure не выполнил проверку для libnfc.Сообщение об ошибке о синтаксической ошибке в сценарии оболочки в строке, предназначенной для этой проверки.

./configure: line 3930: syntax error near unexpected token `libnfc,'
./configure: line 3930: `PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))'

Это не совсем соответствует номерам строк в сценарииты показываешь на пастбине.Здесь ошибка в строке 3963.

Фрагмент скрипта, начинающийся со строки 3949

...
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
$as_echo "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
   AM_V='$(V)'
 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
 AM_V=$AM_DEFAULT_VERBOSITY
 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'


# Checks for pkg-config modules.
LIBNFC_REQUIRED_VERSION=1.7.0
PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))

PKG_CONFIG_REQUIRES="libnfc"



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if ${ac_cv_c_inline+:} false; then :
 $as_echo_n "(cached) " >&6
else
 ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
...

Перед строкой комментария # Checks for pkg-config modules. он выглядит как обычный скрипт конфигурации.

Неверная строка PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])). Это код макросов M5 для автоинструментов, а не скрипт оболочки.

С { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 он снова выглядит нормально.

configureскрипт генерируется из configure.in или configure.ac.Этот источник - макрос-скрипт M5, использующий специальные макросы autotools.Весь текст, который не является известным макросом, копируется в выходной файл без изменений.

Проблемная строка PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])) представляет собой вызов макроса M5 PKG_CHECK_MODULES() с несколькими параметрами, последним из которых является другой вызов макроса AC_MSG_ERROR() саргумент в кавычках.

Я не знаю, почему это закончилось в скрипте настройки, но это, очевидно, неправильно.Возможно, в скрипте configure.ac есть ошибка, возможно, для генерации скрипта configure была использована неправильная версия автоинструментов.

...