Comments (15)
"If you look through the autoconf mailing list archive, you will see this
debated ad-nauseum. I'm not saying that you should avoid using pkg-config
(although I do believe it is best to do so), but please be aware that many
people to recommend avoiding it completely."
http://stackoverflow.com/questions/8578181/using-the-pkg-config-macro-pkg-check-
modules-failing
Please replace pkg-config with something else.
Original comment by [email protected]
on 3 Jul 2014 at 5:51
from libfreefare.
I search the documentation and it looks like it is not easy to make ./configure
fail with a clear message when pkg-config is not found (using
PKG_PROG_PKG_CONFIG).
In the ./configure output you had:
checking for pkg-config... no
checking for LIBNFC... no
configure: error: libnfc >= 1.7.0 is mandatory.
I agree it is not obvious that the line "checking for pkg-config... no" is
important.
If you have a better solution than pkg-config please provide it.
Original comment by [email protected]
on 4 Jul 2014 at 3:57
from libfreefare.
Yes
Here you are
http://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-
a-bash-script
$ command -v pkg-config >/dev/null 2>&1 || { echo >&2 "I require foo but it's
not installed. Aborting."; exit 1; }
OR
$ type pkg-config >/dev/null 2>&1 || { echo >&2 "I require foo but it's not
installed. Aborting."; exit 1; }
OR
$ hash pkg-config 2>/dev/null || { echo >&2 "I require foo but it's not
installed. Aborting."; exit 1; }
Many thanks
Original comment by [email protected]
on 4 Jul 2014 at 5:52
from libfreefare.
I propose the attach patch.
It would be better to not fail if libnfc is not found by pkg-config and try to
link with libnfc using $LIBNFC_LIBS and only fail if nothing works. This is
what I do for PCSC in my CCID driver for example.
Original comment by [email protected]
on 6 Jul 2014 at 4:59
Attachments:
from libfreefare.
Output WITHOUT pkg-config installed:
checking for pkg-config... no
checking for LIBNFC... no
configure: error: libnfc >= 1.7.0 is mandatory.
Does not work.
Bear in mind that "set | grep pkg" does not return anything even after
pkg-config installation. Checking for path variable is not reliable in this
case.
Original comment by [email protected]
on 6 Jul 2014 at 7:58
from libfreefare.
I would suggest using the:
command -v pkg-config >/dev/null 2>&1 || { echo >&2 "I require pkg-config but
it's not installed. Aborting."; exit 1; }
Original comment by [email protected]
on 6 Jul 2014 at 8:18
from libfreefare.
For your comment #5 I guess you have not applied my proposed patch or you have
not regenerated the ./configure script.
Original comment by [email protected]
on 7 Jul 2014 at 7:27
from libfreefare.
Yes you are right. Sorry for that.
The output without pkg-config is:
checking openssl/rand.h usability... yes
checking openssl/rand.h presence... yes
checking for openssl/rand.h... yes
checking for pkg-configx... no
configure: error: Please install pkg-config
:) Works
Original comment by [email protected]
on 7 Jul 2014 at 11:02
from libfreefare.
Does not work. I installed pkg-config and output is:
checking openssl/rand.h usability... yes
checking openssl/rand.h presence... yes
checking for openssl/rand.h... yes
checking for pkg-configx... no
configure: error: Please install pkg-config
[root@alarmpi libfreefare-0.4.0]# pkg-config
Must specify package names on the command line
Original comment by [email protected]
on 7 Jul 2014 at 11:08
from libfreefare.
This is output of set command on my system with pkg-config installed:
[root@alarmpi libfreefare-0.4.0]# set
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostco
mplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="3" [2]="18" [3]="1" [4]="release"
[5]="armv6l-unknown-linux-gnueabihf")
BASH_VERSION='4.3.18(1)-release'
COLUMNS=127
DIRSTACK=()
EUID=0
GROUPS=()
HISTFILE=/root/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/root
HOSTNAME=alarmpi
HOSTTYPE=armv6l
IFS=$' \t\n'
LANG=C
LINES=44
LOGNAME=root
MACHTYPE=armv6l-unknown-linux-gnueabihf
MAIL=/var/spool/mail/root
MAILCHECK=60
OLDPWD=/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnueabihf
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl
PIPESTATUS=([0]="1")
PPID=328
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}"
"${PWD/#$HOME/\~}"'
PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '
PWD=/root/libfreefare-0.4.0
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:moni
tor
SHLVL=1
SSH_CLIENT='192.168.0.2 8741 22'
SSH_CONNECTION='192.168.0.2 8741 192.168.0.7 22'
SSH_TTY=/dev/pts/0
TERM=xterm
UID=0
USER=root
XDG_RUNTIME_DIR=/run/user/0
XDG_SESSION_ID=c1
_=--prefix=/usr
Original comment by [email protected]
on 7 Jul 2014 at 11:19
from libfreefare.
My patch is bogus. Replace "pkg-configx" by "pkg-config"
Original comment by [email protected]
on 7 Jul 2014 at 11:52
from libfreefare.
[deleted comment]
from libfreefare.
I tried that but it didn't work either.
[root@alarmpi ~]# pkg-config --version
0.28
[root@alarmpi ~]# whereis pkg-config
pkg-config: /usr/bin/pkg-config /usr/share/man/man1/pkg-config.1.gz
[root@alarmpi ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl
configure.ac line 61 changed to <<AC_CHECK_PROG(PKG_CONFIG, pkg-config)>>
[root@alarmpi libfreefare-0.4.0]# autoconf configure.ac > configure
[root@alarmpi libfreefare-0.4.0]# ./configure --prefix=/usr
... snip ...
checking for pkg-config... no
configure: error: Please install pkg-config
Original comment by [email protected]
on 7 Jul 2014 at 12:14
from libfreefare.
Wrong patch again. Try with the attached one.
Original comment by [email protected]
on 9 Jul 2014 at 10:21
Attachments:
from libfreefare.
Directions have been integrated in 515fc66.
from libfreefare.
Related Issues (20)
- ARM issue desfire_crc32 wrong direction HOT 3
- Unknown key version - card locked after desfire test HOT 1
- Support for NTAG 424, DESFire Lite, and some limited DESFire EV2 HOT 13
- Why doesn't it support mifare plus? HOT 2
- MIFARE DESFire EV2 fails some unit tests HOT 1
- Cut a 1.0.0 release HOT 6
- Create a 0.4.x branch HOT 4
- Wiki, Website and Forum not available HOT 2
- libnfc.driver.acr122_usb: Command Code verification failed when calling mifare_classic_write() HOT 1
- Wrong implementation for CRC padding in mifare_cryto_postprocess_data
- Specs for setting encrypted transfer modes with DESFire tags HOT 2
- PCSC detection for PN532 board via SPI
- mifare_desfire_get_key_settings() discards encryption type bits HOT 5
- Failure to compile HOT 1
- Just some explanation needed HOT 1
- Why freefare_get_tags() not detect smartphone NFC?
- QUESTION: libfreefare portable to non-android system
- unable to dump application 0x9011f2
- DESFire key diversification - problem with random UID
- JCOB CARD EV3 8k Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libfreefare.