btrfs-progs: autogen: Some compatibility fixs
PATCH v2 2/3 btrfs-progs: autogen: Make build success in CentOS 6 and 7
In reply to Zhao Leibtrfs-progs build failed in CentOS 6 and 7:
#./autogen.sh
...
configure.ac:131: error: possibly undefined macro: PKG_CHECK_VAR
If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.
...
Seems PKG_CHECK_VAR is new in pkgconfig 0.28 (24-Jan-2013):
http://redmine.audacious-media-player.org/boards/1/topics/736
And the max available version for CentOS 7 in yum-repo and rpmfind.net is: pkgconfig-0.27.1-4.el7
http://rpmfind.net/linux/rpm2html/search.php?query=pkgconfig&submit=Search+...&system=centos&arch=
I updated my pkgconfig to 0.30, but still failed at above error. (Maybe it is my setting problem)
To make user in centos 6 and 7 building btrfs-progs without more changes, we can avoid using PKG_CHECK_VAR in following way found in:
https://github.com/audacious-media-player/audacious-plugins/commit/f95ab6f939ecf0d9232b3165f9241d2ea9676b9e
Changelog v1->v2:
1: Add AC_SUBST(UDEVDIR)
Suggested by: Jeff Mahoney <[email protected]>
--- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configure.ac +2 -1
@@ -128,7 +128,8 @@ PKG_STATIC(UUID_LIBS_STATIC, [uuid]) PKG_CHECK_MODULES(ZLIB, [zlib]) PKG_STATIC(ZLIB_LIBS_STATIC, [zlib]) -PKG_CHECK_VAR([UDEVDIR], [udev], [udevdir]) +UDEVDIR="$(pkg-config udev --variable=udevdir)" +AC_SUBST(UDEVDIR) dnl lzo library does not provide pkg-config, let use classic way AC_CHECK_LIB([lzo2], [lzo_version], [
Signature · 1 line
1.8.5.1
v2 cover btrfs-progs: autogen: Some compatibility fixs
Changelog v1->v2:
1: btrfs-progs: autogen: Make build success in CentOS 6 and 7
Add AC_SUBST(UDEVDIR), suggested by: Jeff Mahoney <[email protected]>
Zhao Lei (3):
btrfs-progs: autogen: Avoid chdir fail on dirname with blank
btrfs-progs: autogen: Make build success in CentOS 6 and 7
btrfs-progs: autogen: Don't show success message on fail
autogen.sh | 9 +++++---- configure.ac | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.5.1
PATCH v2 3/3 btrfs-progs: autogen: Don't show success message on fail
When autogen.sh failed, the success message is still in output:
# ./autogen.sh
...
configure.ac:131: error: possibly undefined macro: PKG_CHECK_VAR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation. Now type './configure' and 'make' to compile.
#
Fixed by check return value of autoconf.
After patch:
# ./autogen.sh
...
configure.ac:132: error: possibly undefined macro: PKG_CHECK_VAR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
#--- autogen.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
autogen.sh +4 -3
@@ -64,9 +64,10 @@ echo " automake: $(automake --version | head -1)" chmod +x version.sh rm -rf autom4te.cache -aclocal $AL_OPTS -autoconf $AC_OPTS -autoheader $AH_OPTS +aclocal $AL_OPTS && +autoconf $AC_OPTS && +autoheader $AH_OPTS || +exit 1 # it's better to use helper files from automake installation than # maintain copies in git tree
Signature · 1 line
1.8.5.1
PATCH v2 1/3 btrfs-progs: autogen: Avoid chdir fail on dirname with blank
In reply to Zhao LeiIf source put in dir with blanks, as:
/var/lib/jenkins/workspace/btrfs progs
autogen will failed:
./autogen.sh: line 95: cd: /var/lib/jenkins/workspace/btrfs: No such file or directory
Can be fixed by adding quotes into cd command.
--- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
autogen.sh +1 -1
@@ -92,7 +92,7 @@ find_autofile config.guess find_autofile config.sub find_autofile install-sh -cd $THEDIR +cd "$THEDIR" echo echo "Now type '$srcdir/configure' and 'make' to compile."
Signature · 1 line
1.8.5.1
David Sterba
AppliedQuoted 8 lines · Zhao Lei
Changelog
v1->v2:
1: btrfs-progs: autogen: Make build success in CentOS 6 and 7
AddAC_SUBST(UDEVDIR), suggested by: Jeff Mahoney <[email protected]>Zhao Lei (3):
btrfs-progs: autogen: Avoid chdir fail on dirname with blank
btrfs-progs: autogen: Make build success in CentOS 6 and 7
btrfs-progs: autogen: Don't show success message on fail
Applied, thanks.