summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-10-10 07:47:38 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-10-14 14:27:36 +0200
commita0a4037cf2ed2dee6a4e1ff44a84a73babb52019 (patch)
tree8cd2ceef668f2ead6c39ca5ece372320b4df6546 /meta-oe
parent4e59f5680df8577048821eed12277cee994876d4 (diff)
downloadmeta-openembedded-a0a4037cf2ed2dee6a4e1ff44a84a73babb52019.tar.gz
mariadb: fix do_configure failed while multilib is used
Here is the error log from mariadb's configure test ... checking for zlib compression library... configure: error: headers or binaries were not found in /home/jiahongxu/yocto/build-20131009-mysql/ bitbake_build/tmp/sysroots/qemux86-64/usr/{include,lib} ... When multilib is used, the baselib is assigned with "lib64", here is the log from 'bitbake mariadb -e' ... 4738 # $baselib [3 operations] 4739 # set conf/bitbake.conf:10 4740 # "${BASELIB}" 4741 # set conf/bitbake.conf:11 4742 # [vardepvalue] "${baselib}" 4743 # set /home/jiahongxu/yocto/build-20131009-mysql/layers/oe-core/meta/conf/multilib.conf:2 4744 # "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or d.getVar('BASELIB', True)}" 4745 # computed: 4746 # "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or d.getVar('BASELIB', True)}" 4747 baselib="lib64" ... In this situation, the zlib locates in 'lib64' rather than 'lib'. But mariadb's confiure test still searches zlib in 'lib'. Modify mariadb's confiure to let lib dir configurable rather than hardcode could fix this issue. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch63
-rw-r--r--meta-oe/recipes-support/mysql/mariadb_5.1.67.inc2
2 files changed, 65 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch b/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
new file mode 100644
index 000000000..880c2a717
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mariadb/zlib-let-libdir-configurable.patch
@@ -0,0 +1,63 @@
1zlib: let lib dir configurable
2
3The zlib were found in $mysql_zlib_dir/lib, and the
4search will fail if zlib in $mysql_zlib_dir/lib64.
5
6Let lib dir configurable rather than hardcode.
7
8Upstream-Status: Pending
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
10---
11 config/ac-macros/zlib.m4 | 12 ++++++------
12 configure.in | 8 ++++++++
13 2 files changed, 14 insertions(+), 6 deletions(-)
14
15diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
16--- a/config/ac-macros/zlib.m4
17+++ b/config/ac-macros/zlib.m4
18@@ -106,17 +106,17 @@ case $SYSTEM_TYPE in
19 ;;
20 *)
21 # Test for libz using all known library file endings
22- if test \( -f "$mysql_zlib_dir/lib/libz.a" -o \
23- -f "$mysql_zlib_dir/lib/libz.so" -o \
24- -f "$mysql_zlib_dir/lib/libz.sl" -o \
25- -f "$mysql_zlib_dir/lib/libz.dylib" \) \
26+ if test \( -f "$mysql_zlib_dir/$base_libdir/libz.a" -o \
27+ -f "$mysql_zlib_dir/$base_libdir/libz.so" -o \
28+ -f "$mysql_zlib_dir/$base_libdir/libz.sl" -o \
29+ -f "$mysql_zlib_dir/$base_libdir/libz.dylib" \) \
30 -a -f "$mysql_zlib_dir/include/zlib.h"; then
31 ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
32- ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
33+ ZLIB_LIBS="-L$mysql_zlib_dir/$base_libdir -lz"
34 MYSQL_CHECK_ZLIB_DIR
35 fi
36 if test "x$mysql_cv_compress" != "xyes"; then
37- AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
38+ AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,$base_libdir}])
39 fi
40 ;;
41 esac
42diff --git a/configure.in b/configure.in
43index 2c6c08e..193b59a 100644
44--- a/configure.in
45+++ b/configure.in
46@@ -104,6 +104,14 @@ AC_SUBST(SHARED_LIB_MAJOR_VERSION)
47 AC_SUBST(SHARED_LIB_VERSION)
48 AC_SUBST(AVAILABLE_LANGUAGES)
49
50+AC_ARG_WITH([baselib-dir],
51+ AC_HELP_STRING([--baselib-dir=DIR],
52+ [Provide MySQL with a custom location of
53+ baselib dir. Given DIR, such as zlib binary is
54+ assumed to be in $zlib-dir/$DIR.]),
55+ [base_libdir=${withval}],
56+ [base_libdir="lib"])
57+
58 # Check whether a debug mode should be enabled.
59 AC_ARG_WITH([debug],
60 AS_HELP_STRING([--with-debug@<:@=full@:>@],
61--
621.8.1.2
63
diff --git a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc b/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
index fd9264fd0..98d135f5f 100644
--- a/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
+++ b/meta-oe/recipes-support/mysql/mariadb_5.1.67.inc
@@ -15,6 +15,7 @@ SRC_URI = "http://mirrors.coreix.net/mariadb/mariadb-${PV}/kvm-tarbake-jaunty-x8
15 file://configure-ps-cache-check.patch \ 15 file://configure-ps-cache-check.patch \
16 file://fix-cve-2013-1861-1.patch \ 16 file://fix-cve-2013-1861-1.patch \
17 file://fix-cve-2013-1861-2.patch \ 17 file://fix-cve-2013-1861-2.patch \
18 file://zlib-let-libdir-configurable.patch \
18 file://my.cnf \ 19 file://my.cnf \
19 file://mysqld.sh" 20 file://mysqld.sh"
20 21
@@ -51,6 +52,7 @@ EXTRA_OECONF = "--with-atomic-ops=up \
51 --without-man \ 52 --without-man \
52 --without-docs \ 53 --without-docs \
53 --with-zlib-dir=${STAGING_EXECPREFIXDIR} \ 54 --with-zlib-dir=${STAGING_EXECPREFIXDIR} \
55 --with-baselib-dir=${base_libdir} \
54 --with-pic \ 56 --with-pic \
55 " 57 "
56 58