Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config error #14

Open
txgo opened this issue Mar 5, 2015 · 11 comments
Open

config error #14

txgo opened this issue Mar 5, 2015 · 11 comments

Comments

@txgo
Copy link

txgo commented Mar 5, 2015

./configure: line 16016: syntax error near unexpected token 0.20' ./configure: line 16016:PKG_PROG_PKG_CONFIG(0.20)'

@tatsuhiro-t
Copy link
Owner

The cause is probably "0.20" is not quoted by []. PKG_PROG_PKG_CONFIG([0.20]) will fix the problem.

@tatsuhiro-t
Copy link
Owner

Hm, it is already quoted. Probably, pkg-config is missing.
Could you check that pkg-config is installed on your system?

@kazuho
Copy link
Contributor

kazuho commented Mar 9, 2015

I'd bet installing pkgconfig to the environment fixes the problem. The fact that PKG_PROG_PKG_CONFIG appears in configure is a sign that pkgconfig is missing (if it is installed then the call should have been inline-expanded by autoconf).

Actually I just faced the same problem when trying to install nghttp2 on FreeBSD; install pkgconf (= pkgconfig) fixed the issue.

@avesus
Copy link

avesus commented May 20, 2015

So, what we should do? I have the same error on Ubuntu 14.04.2.

Actually, repeating all sequence AFTER installing pkg-config helps me (NOTE: don't ever touch your ./configure file!):

$ autoreconf -i
$ automake
$ autoconf
$ ./configure
$ make

@tatsuhiro-t
Copy link
Owner

It is very strange. It works for me for years. We have experimental cmake support. Probably it could work.

@jay
Copy link

jay commented Jan 2, 2016

I had this same problem in MinGW because the pkg-config that comes installed doesn't include the pkg.m4 macro so there is no PKG_PROG_PKG_CONFIG. To remedy this I built pkg-config and installed it. I had a hiccup building because it couldn't find a suitable memory barrier, so I used mfence. If you're using MinGW here's how you can do it (mostly a c&p from my e-mail to the openssl mailing list):

Get the latest version at http://pkgconfig.freedesktop.org/releases/?C=M;O=D

CFLAGS="-g -O2 -DMemoryBarrier\\(\\)=asm\\(\\\"mfence\\;\\\"\\)" ./configure --with-internal-glib >config.out 2>&1
make V=1 >make.out 2>&1
make install

So pkg.m4 can be found add /usr/local/share/aclocal to the aclocal dirlist if it's not there already:

grep -E "^/usr/local/share/aclocal$" /mingw/share/aclocal/dirlist 2>/dev/null
if [[ $? -ne 0 ]]; then echo /usr/local/share/aclocal >> /mingw/share/aclocal/dirlist; fi

@tatsuhiro-t
Copy link
Owner

aclocal.m4 included in wslay distribution includes definition of PKG_PROG_PKG_CONFIG, so it should work. It is true that pkg-config binary is required.
If you are compiling from git, then yes, you have to somehow install pkg-config.

@sebalos314
Copy link

I confirm I have had the exact same problem here, after installing pkg-config, I was still having the issue. But I did as suggested by @avesus (restarted from autoreconf -i) and I managed to build. My platform is 14.04.2 LTS for ARM64...

Thanks for this !

@shotahino
Copy link

@tatsuhiro-t Same for me. @avesus's suggestion fixed the issue.

@misaka00251
Copy link

My platform is 16.04 for ARM64, installed pkg-config and still not working using @avesus 's solution...

aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
configure.ac:731: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:731: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:731: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.

@28723249
Copy link

@avesus Thanks, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants