Bug 921817
| Summary: | autogen should warn if pkg-config missing | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Justin Clift <jclift> |
| Component: | build | Assignee: | Amar Tumballi <amarts> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | pre-release | CC: | gluster-bugs, kkeithle, kwade, vbellur, vraman |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-3.4.0 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-07-24 17:54:25 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Potential fix for review: http://review.gluster.org/4672 CHANGE: http://review.gluster.org/4672 (Warn on missing pkg-config, plus trivial comparator typo fix.) merged in master by Anand Avati (avati) REVIEW: http://review.gluster.org/4720 (config: better (i.e. more portable) test for libxml2) posted (#6) for review on master by Kaleb KEITHLEY (kkeithle) COMMIT: http://review.gluster.org/4720 committed in master by Anand Avati (avati) ------ commit 544945a128b4de9c6b767939fb4c4c216b095d23 Author: Kaleb S. KEITHLEY <kkeithle> Date: Mon Mar 25 08:22:16 2013 -0400 config: better (i.e. more portable) test for libxml2 Over the weekend I tried to build on MacOS X¹ and ran into the following issues: 1) The recent change to autogen.sh to test for pkg-config falls down. 2) After removing the pkg-config test in autogen.sh, w/o pkg-config the PKG_CHECK_MODULES macro invocation in configure[.ac] falls down. N.B. Solaris users run into this too, even through there's a (broken) pkg-config package that can be installed. 3) There are other problems in the code related to fuse that are beyond the scope of this. It seems that pkg-config is only a requirement for the definition of the PKG_CHECK_MODULES macro used to detect libxml2. Since this seems to be inherently unportable — at least to MacOS X and Solaris — I'd like to: A) Change the use of the PKG_CHECK_MODULES macro to the more portable AM_PATH_XML2 macro provided by the libxml2 package in /usr/.../share/aclocal/libxml.m4 2) Revisit the decision to add the check for pkg-config in autogen.sh in BZ 921817. For now this is just an rfc. If people are agreeable I'll reenter this change against BZ 921817. ¹Mountain Lion 10.8.3, XCode 4.6.1 Change-Id: I237b1ed8919088345b8fd943423b2a6ad289981b BUG: 921817 Signed-off-by: Kaleb S. KEITHLEY <kkeithle> Reviewed-on: http://review.gluster.org/4720 Reviewed-by: Justin Clift <jclift> Tested-by: Justin Clift <jclift> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Anand Avati <avati> Interestingly, this now happens again when pkg-config isn't present:
$ ./autogen.sh
... GlusterFS autogen ...
Generate gf-error-codes.h ...
gf-error-codes.h -> libglusterfs/src/gf-error-codes.h
Running aclocal...
Running autoheader...
Running glibtoolize...
Running autoconf...
configure.ac:316: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Running automake...
configure.ac:203: installing `./config.sub'
configure.ac:16: installing `./missing'
configure.ac:16: installing `./install-sh'
configure.ac:203: installing `./config.guess'
api/examples/Makefile.am: installing `./depcomp'
api/examples/Makefile.am:10: installing `./py-compile'
Running autogen.sh in argp-standalone ...
configure.ac:10: installing `./missing'
configure.ac:10: installing `./install-sh'
Makefile.am: installing `./depcomp'
Please proceed with configuring, compiling, and installing.
$
Looks like we've started using PKG_CHECK_MODULES again:
$ grep -ri "PKG_CHECK_MODULES" *
api/examples/configure.ac:PKG_CHECK_MODULES([GLFS], [glusterfs-api >= 3])
configure.ac: PKG_CHECK_MODULES([GLIB], [glib-2.0],
configure.ac:PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0],
Any thoughts on the right way to proceed?
REVIEW: http://review.gluster.org/7674 (configure.ac: prefer autoconf over pkg-config) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle) |
Description of problem: If pkg-config isn't available when gluster autogen.sh is run, the autoconf step displays an error message that's misleading and doesn't really address the problem: configure.ac:242: error: possibly undefined macro: AC_DEFINE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autogen.sh should probably detect when pkg-config is missing, and direct the user to install it. Version-Release number of selected component (if applicable): upstream git repo, master branch, as of Fri 15th March 2013 How reproducible: Every time. Steps to Reproduce: 1. Ensure pkg-config isn't installed. (ie sudo yum remove pkgconfig) 2. git clone upstream gluster repo 3. ./autogen.sh Actual results: $ ./autogen.sh ... GlusterFS autogen ... Running aclocal... Running autoheader... Running glibtoolize... Running autoconf... configure.ac:242: error: possibly undefined macro: AC_DEFINE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. Running automake... configure.ac:151: installing `./config.sub' configure.ac:11: installing `./missing' configure.ac:11: installing `./install-sh' configure.ac:151: installing `./config.guess' api/src/Makefile.am: installing `./depcomp' xlators/features/marker/utils/syncdaemon/Makefile.am:3: installing `./py-compile' configure.ac:10: installing `./missing' configure.ac:10: installing `./install-sh' Makefile.am: installing `./depcomp' Please proceed with configuring, compiling, and installing. $ Expected results: Completely successful autogen, with no configure.ac error. Additional info: This error occurs on both RHEL 6.4 x64 and OSX 10.7. (tested on both)