ClusterLabs/pcs

Compile and install pcs v0.10.14 on mipsel64, error when execute ./configure

Closed this issue · 5 comments

[root@controller pcs]# ./autogen.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
configure.ac:83: error: possibly undefined macro: PKG_CHECK_VAR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
[root@controller pcs]# ./autogen.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:16: installing './config.guess'
configure.ac:16: installing './config.sub'
configure.ac:11: installing './install-sh'
configure.ac:11: installing './missing'
autoreconf: Leaving directory `.'
Now run ./configure and make
[root@controller pcs]# ./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 how to create a pax tar archive... gnutar
checking build system type... mips64el-unknown-linux-gnu
checking host system type... mips64el-unknown-linux-gnu
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a Python interpreter with version >= 3.6... python3
checking for python3... /usr/local/bin/python3
checking for python3 version... 3.8
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.8/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.8/site-packages
checking for systemd... yes
checking for pkg-conf systemd var systemdsystemunitdir... ./configure: line 3228: syntax error near unexpected token `SYSTEMD_UNIT_DIR_TMP,'
./configure: line 3228: `	  PKG_CHECK_VAR(SYSTEMD_UNIT_DIR_TMP, systemd, systemdsystemunitdir)'
[root@controller pcs]# ./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 how to create a pax tar archive... gnutar
checking build system type... mips64el-unknown-linux-gnu
checking host system type... mips64el-unknown-linux-gnu
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a Python interpreter with version >= 3.6... python3
checking for python3... /usr/local/bin/python3
checking for python3 version... 3.8
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.8/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.8/site-packages
checking for systemd... yes
checking for pkg-conf systemd var systemdsystemunitdir... ./configure: line 3228: syntax error near unexpected token `SYSTEMD_UNIT_DIR_TMP,'
./configure: line 3228: `	  PKG_CHECK_VAR(SYSTEMD_UNIT_DIR_TMP, systemd, systemdsystemunitdir)'

what's the problem?

It seems that PKG_CHECK_VAR macro is missing in your system. For example in RHEL-based distros, this macro is provided by pkgconf-m4 package.

It seems that PKG_CHECK_VAR macro is missing in your system. For example in RHEL-based distros, this macro is provided by pkgconf-m4 package.

thanks for your reply,I checkout the file "configure.ac“,not only check the systemd,also check ruby and python and so on.
then I check my packages,pkgconfig has already installed,any other ideas?

It is possible that you have installed an old version of pkgconf-m4 package. You need pkg-config with PKG_CHECK_VAR support, that is pkg-config >= 0.28. For example on my system:

list files of pkgconf-m4 package:
$ rpm -ql pkgconf-m4
/usr/share/aclocal/pkg.m4
/usr/share/man/man7/pkg.m4.7.gz

get the version
$ head /usr/share/aclocal/pkg.m4
# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
# serial 11 (pkg-config-0.29.1)

I can see, that I have pkg-config-0.29.1. Please, make sure that you have a recent enough version of pkg-config installed.

It is possible that you have installed an old version of pkgconf-m4 package. You need pkg-config with PKG_CHECK_VAR support, that is pkg-config >= 0.28. For example on my system:

list files of pkgconf-m4 package:
$ rpm -ql pkgconf-m4
/usr/share/aclocal/pkg.m4
/usr/share/man/man7/pkg.m4.7.gz

get the version
$ head /usr/share/aclocal/pkg.m4
# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
# serial 11 (pkg-config-0.29.1)

I can see, that I have pkg-config-0.29.1. Please, make sure that you have a recent enough version of pkg-config installed.

I check the version of pkg-config on my system like yours,

[root@localhost pcs]# rpm -ql pkgconf-m4
未安装软件包 pkgconf-m4

[root@localhost pcs]# head /usr/share/aclocal/pkg.m4

pkg.m4 - Macros to locate and utilise pkg-config. -- Autoconf --
serial 1 (pkg-config-0.24)
Copyright © 2004 Scott James Remnant scott@netsplit.com.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
in addition to,the following commands are also executed.

[root@localhost pcs]# rpm -ql pkgconfig
/usr/bin/pkg-config
/usr/lib64/pkgconfig
/usr/share/aclocal/pkg.m4
/usr/share/doc/pkgconfig-0.27.1
/usr/share/doc/pkgconfig-0.27.1/AUTHORS
/usr/share/doc/pkgconfig-0.27.1/COPYING
/usr/share/doc/pkgconfig-0.27.1/NEWS
/usr/share/doc/pkgconfig-0.27.1/README
/usr/share/doc/pkgconfig-0.27.1/pkg-config-guide.html
/usr/share/man/man1/pkg-config.1.gz
/usr/share/pkgconfig

[root@localhost pcs]# pkg-config --version
0.27.1

Do you know why two ways(pkg-config --version and head /usr/share/aclocal/pkg.m4) get different versions?

Sorry, I don't have such a detailed knowledge about pkg-config. Try reaching out to support / community of your Linux distribution.

Since the root of the issue is outside of pcs, I'm closing this.