From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 841FAE00596 for ; Fri, 4 May 2012 20:58:39 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 04 May 2012 20:58:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="149564973" Received: from unknown (HELO [10.255.12.143]) ([10.255.12.143]) by fmsmga001.fm.intel.com with ESMTP; 04 May 2012 20:58:38 -0700 Message-ID: <4FA4A56E.8050602@linux.intel.com> Date: Fri, 04 May 2012 20:58:38 -0700 From: Saul Wold User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120424 Thunderbird/12.0 MIME-Version: 1.0 To: edwin.zhai@intel.com References: <1555a6151b58fb142606f7e6cda23f0c95ac0c87.1335944480.git.edwin.zhai@intel.com> In-Reply-To: <1555a6151b58fb142606f7e6cda23f0c95ac0c87.1335944480.git.edwin.zhai@intel.com> Cc: poky@yoctoproject.org Subject: Re: [PATCH 1/1] pango: Fix modules load failure in multilib environment X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 03:58:39 -0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 05/02/2012 12:43 AM, edwin.zhai@intel.com wrote: > From: Zhai Edwin > > Multi-libs of Pango need different modules, thus different config files and > utils. This patch separate config file and utils into different directory to > avoid conflict. > > [YOCTO #2356] got fixed. > > Signed-off-by: Zhai Edwin > --- > .../pango/pango-1.28.4/multilib-fix.patch | 90 ++++++++++++++++++++ > meta/recipes-graphics/pango/pango.inc | 12 ++- > meta/recipes-graphics/pango/pango_1.28.4.bb | 7 +- > 3 files changed, 101 insertions(+), 8 deletions(-) > create mode 100644 meta/recipes-graphics/pango/pango-1.28.4/multilib-fix.patch > > diff --git a/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix.patch b/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix.patch > new file mode 100644 > index 0000000..87d7a0a > --- /dev/null > +++ b/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix.patch > @@ -0,0 +1,90 @@ > +Fix modules load failure in multilib environment. > + > +Multi-lib need different configs produced by different utils, so need keep both > +of them by putting them in different directory. > + > +Signed-off-by: Zhai Edwin > + > +Upstream-Status: Inappropriate [other] - Upstream may have nice fix in future > + > +Index: pango-1.28.4/pango/pango-utils.c > +=================================================================== > +--- pango-1.28.4.orig/pango/pango-utils.c 2012-04-28 16:23:48.000000000 +0800 > ++++ pango-1.28.4/pango/pango-utils.c 2012-05-02 10:19:14.000000000 +0800 > +@@ -678,6 +678,19 @@ > + > + #endif > + > ++#ifndef G_OS_WIN32 > ++/* return the relative baselib dir */ > ++const char * > ++pango_get_baselib_directory (void) > ++{ > ++ char *libdir = g_strdup(LIBDIR); > ++ char *baselib = g_strdup( g_strrstr(libdir, "lib")); > ++ g_free(libdir); > ++ > ++ return baselib; > ++} > ++#endif > ++ > + /** > + * pango_get_sysconf_subdirectory: > + * > +Index: pango-1.28.4/pango/modules.c > +=================================================================== > +--- pango-1.28.4.orig/pango/modules.c 2010-09-22 03:37:01.000000000 +0800 > ++++ pango-1.28.4/pango/modules.c 2012-05-02 10:42:57.000000000 +0800 > +@@ -523,12 +523,17 @@ > + > + char *file_str = pango_config_key_get ("Pango/ModuleFiles"); > + char **files; > ++ char *baselib = pango_get_baselib_directory(); > + int n; > + > + dlloaded_modules = g_hash_table_new (g_str_hash, g_str_equal); > + > + if (!file_str) > + file_str = g_build_filename (pango_get_sysconf_subdirectory (), > ++#ifndef G_OS_WIN32 > ++/* For multilib case, keep multiple config file for different libs */ > ++ baselib, > ++#endif > + "pango.modules", > + NULL); > + > +@@ -550,6 +555,7 @@ > + > + g_strfreev (files); > + g_free (file_str); > ++ g_free (baselib); > + > + dlloaded_engines = g_slist_reverse (dlloaded_engines); > + } > +@@ -631,6 +637,7 @@ > + { > + const char *engine_type = g_quark_to_string (info->engine_type_id); > + const char *render_type = g_quark_to_string (info->render_type_id); > ++ char *baselib = pango_get_baselib_directory(); > + > + init_modules(); > + > +@@ -640,6 +647,10 @@ > + if (!no_module_warning) > + { > + gchar *filename = g_build_filename (pango_get_sysconf_subdirectory (), > ++#ifndef G_OS_WIN32 > ++/* For multilib case, keep multiple config file for different libs */ > ++ baselib, > ++#endif > + "pango.modules", > + NULL); > + g_critical ("No modules found:\n" > +@@ -652,6 +663,7 @@ > + filename, > + filename); > + g_free (filename); > ++ g_free (baselib); > + > + no_module_warning = TRUE; > + } > diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc > index a2d5dc3..2184da3 100644 > --- a/meta/recipes-graphics/pango/pango.inc > +++ b/meta/recipes-graphics/pango/pango.inc > @@ -32,9 +32,11 @@ EXTRA_AUTORECONF = "" > # seems to go wrong with default cflags > FULL_OPTIMIZATION_arm = "-O2" > > +# keep multiple version of utils under ${bindir} in multilib environment > EXTRA_OECONF = "--disable-glibtest \ > --enable-explicit-deps=no \ > - --disable-debug" > + --disable-debug \ > + --bindir=${bindir}/${baselib}" > > LEAD_SONAME = "libpango-1.0*" > LIBV = "1.6.0" > @@ -44,8 +46,8 @@ if [ "x$D" != "x" ]; then > exit 1 > fi > > -if ! [ -e $D${sysconfdir}/pango ] ; then > - mkdir -p $D${sysconfdir}/pango > +if ! [ -e $D${sysconfdir}/pango/${baselib} ] ; then > + mkdir -p $D${sysconfdir}/pango/${baselib} > fi > } > > @@ -54,9 +56,9 @@ python populate_packages_prepend () { > > modules_root = d.expand('${libdir}/pango/${LIBV}/modules') > > - do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + 'pango-querymodules> /etc/pango/pango.modules') > + do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${baselib}/pango-querymodules> /etc/pango/${baselib}/pango.modules') > } > > -FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}" > +FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/${baselib}/* ${libdir}/libpango*${SOLIBS}" This change to ${bindir}/${baselib} does not seem right to me, that would be /usr/bin/usr/lib. It also results in a packaging issue: ERROR: For recipe pango, the following files/directories were installed but not shipped in any package: ERROR: /usr/bin/lib/.debug ERROR: /usr/bin/lib/.debug/pango-querymodules ERROR: /usr/bin/lib/.debug/pango-view Please review this patch Thanks Sau! > FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug" > FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la" > diff --git a/meta/recipes-graphics/pango/pango_1.28.4.bb b/meta/recipes-graphics/pango/pango_1.28.4.bb > index 8d71de0..e72e8a2 100644 > --- a/meta/recipes-graphics/pango/pango_1.28.4.bb > +++ b/meta/recipes-graphics/pango/pango_1.28.4.bb > @@ -2,10 +2,11 @@ require pango.inc > > LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" > > -PR = "r7" > +PR = "r8" > > -SRC_URI += "file://no-tests.patch" > -SRC_URI += "file://noconst.patch" > +SRC_URI += "file://no-tests.patch \ > + file://noconst.patch \ > + file://multilib-fix.patch" > > SRC_URI[archive.md5sum] = "3f3989700f04e9117d30544a9078b3a0" > SRC_URI[archive.sha256sum] = "7eb035bcc10dd01569a214d5e2bc3437de95d9ac1cfa9f50035a687c45f05a9f"