Git Product home page Git Product logo

Comments (15)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
"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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
My patch is bogus. Replace "pkg-configx" by "pkg-config"

Original comment by [email protected] on 7 Jul 2014 at 11:52

from libfreefare.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
[deleted comment]

from libfreefare.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Wrong patch again. Try with the attached one.

Original comment by [email protected] on 9 Jul 2014 at 10:21

Attachments:

from libfreefare.

smortex avatar smortex commented on June 23, 2024

Directions have been integrated in 515fc66.

from libfreefare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.