wslay icon indicating copy to clipboard operation
wslay copied to clipboard

config error

Open txgo opened this issue 9 years ago • 11 comments

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

txgo avatar Mar 05 '15 02:03 txgo

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

tatsuhiro-t avatar Mar 05 '15 17:03 tatsuhiro-t

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

tatsuhiro-t avatar Mar 05 '15 17:03 tatsuhiro-t

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.

kazuho avatar Mar 09 '15 00:03 kazuho

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

avesus avatar May 20 '15 20:05 avesus

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

tatsuhiro-t avatar May 22 '15 15:05 tatsuhiro-t

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

jay avatar Jan 02 '16 05:01 jay

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.

tatsuhiro-t avatar Jan 03 '16 14:01 tatsuhiro-t

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 !

sebalos314 avatar Feb 06 '17 10:02 sebalos314

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

shotahino avatar Oct 28 '17 22:10 shotahino

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.

misaka00251 avatar Dec 15 '17 09:12 misaka00251

@avesus Thanks, it works!

28723249 avatar May 25 '18 03:05 28723249