From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mail.openembedded.org (Postfix) with ESMTP id AAA3F6FA6A for ; Wed, 4 Jun 2014 05:49:15 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id ma3so6563712pbc.9 for ; Tue, 03 Jun 2014 22:49:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=pOuQE+WxE7f8RsRfAslpFLhyon24B7bidjg1goNcMVs=; b=ItxenrdqiSI9itiKRCsPiB+QhZRaW/cuWSJk8dBLsWIK7pFrRKfVSUb2p/FMJmcExm MWeJt4WHuqbDg45BKzXOKfZpCtMBB4/4DUFhL9LzpBxbPuDbbxo1N+jBnxD7RG1HX9P4 0Jra/xogZVttCeqwn7Q+SH+QSpI4DMujTiIv+mu2issSTyzEhcxIFaJVGN0FmS6gtvOl R4Ws/yIKcC6xjRB/K7LCHEbb6apOfye56QJK2XBCHBWT5bw6OREXx1gOlwyyDjk3SBKs hO9CfeD5Mu0t8QRy+1EpsM0nY6V3X/JJ66dmg9YygZe5Ay14oiT9EsVbw+TXzpB0bpon HhqA== X-Gm-Message-State: ALoCoQkXJngkcuuqKj25zfAmXIP8Mn5IZttBfH84nVt5cmU8g7NjKV/+osD01Bgwg8jClgKJXWO4 X-Received: by 10.68.143.65 with SMTP id sc1mr59579197pbb.93.1401860956936; Tue, 03 Jun 2014 22:49:16 -0700 (PDT) Received: from [10.6.18.24] (c-50-186-0-160.hsd1.or.comcast.net. [50.186.0.160]) by mx.google.com with ESMTPSA id is5sm5314209pbb.8.2014.06.03.22.49.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Jun 2014 22:49:16 -0700 (PDT) Message-ID: <538EB35A.3060608@intel.com> Date: Tue, 03 Jun 2014 22:49:14 -0700 From: Saul Wold Organization: Intel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Hongxu Jia , openembedded-core@lists.openembedded.org, ross.burton@intel.com References: <4eddf85a278e98ef2752445a9f4ce961b69a416d.1401852113.git.hongxu.jia@windriver.com> In-Reply-To: <4eddf85a278e98ef2752445a9f4ce961b69a416d.1401852113.git.hongxu.jia@windriver.com> Subject: Re: [PATCH 3/3] apr: fix cross compiling failed X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 05:49:23 -0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/03/2014 08:27 PM, Hongxu Jia wrote: > The do_compile failed: > | tools/gen_test_char > include/private/apr_escape_test_char.h > | /bin/sh: tools/gen_test_char: No such file or directory > | make[1]: *** [include/private/apr_escape_test_char.h] Error 127 > > The tools/gen_test_char was invoked at build time, and it didn't > work for the cross compiling, so we built it with $BUILD_CC. > > To make sure there was no side effect on the change, not adding this > patch, I did the test: > > 1. Built the native tools/gen_test_char on x86-64 host, and invoke > it on that host; > > 2. Built the target tools/gen_test_char which arch was arm, and invoke > it on the qemuarm; > > 3. Comparing the results, they were total the same; > ... > /* this file is automatically generated by gen_test_char, do not edit. "make include/private/apr_escape_test_char.h" to regenerate. */ > > static const unsigned char test_char_table[256] = { > 32,30,30,30,30,30,30,30,30,30,31,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,6,16,63,22,17,22,49,17, > 17,17,1,16,16,0,0,18,0,0,0,0,0,0,0,0,0,0,16,23, > 55,16,55,23,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, > 0,0,0,0,0,0,0,0,0,0,0,23,31,23,23,0,23,0,0,0, > 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, > 0,0,0,23,23,23,17,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, > 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 > }; > ... > > The do_install failed: > | DEBUG: Executing shell function do_install > | NOTE: make -j 16 DESTDIR=tmp/work/x86_64-linux/apr-native/1.5.1-r0/image > install > | tmp/work/x86_64-linux/apr-native/1.5.1-r0/apr-1.5.1/build/mkdir.sh tools > | gcc -isystem/home/pokybuild/yocto-autobuilder/yocto-slave/build-appliance/ > build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe > tools/gen_test_char.c -o tools/gen_test_char > | make[1]: Entering directory `tmp/work/x86_64-linux/apr-native/1.5.1-r0/ > apr-1.5.1' > | tmp/work/x86_64-linux/apr-native/1.5.1-r0/apr-1.5.1/build/mkdir.sh tools > | gcc -isystem/home/pokybuild/yocto-autobuilder/yocto-slave/build-appliance/ > build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe > tools/gen_test_char.c -o tools/gen_test_char > | tmp/work/x86_64-linux/apr-native/1.5.1-r0/apr-1.5.1/build/mkdir.sh > include/private > | tools/gen_test_char > include/private/apr_escape_test_char.h > | /bin/sh: tools/gen_test_char: Permission denied > > Remove the 'tools' dir creation, it always existed. And it caused > gen_test_char unexpected rebuilt at do_install time. > > Signed-off-by: Hongxu Jia > --- > meta/recipes-support/apr/apr/upgrade-and-fix.patch | 48 ++++++++++++++++++++++ > meta/recipes-support/apr/apr_1.5.1.bb | 1 + > 2 files changed, 49 insertions(+) > create mode 100644 meta/recipes-support/apr/apr/upgrade-and-fix.patch > Why not combine this with the 1.5.1 update so they are together? Sau! > diff --git a/meta/recipes-support/apr/apr/upgrade-and-fix.patch b/meta/recipes-support/apr/apr/upgrade-and-fix.patch > new file mode 100644 > index 0000000..4bca384 > --- /dev/null > +++ b/meta/recipes-support/apr/apr/upgrade-and-fix.patch > @@ -0,0 +1,48 @@ > +Makefile.in: fix cross compiling failed > + > +The tools/gen_test_char was invoked at build time, > +and it didn't work for the cross compiling, so we > +compile it with $BUILD_CC. > + > +Remove the 'tools' dir creation, it always existed. > +And it caused gen_test_char unexpected rebuilt at > +do_install time. > + > +Upstream-Status: inappropriate [oe specific] > + > +Signed-off-by: Hongxu Jia > +--- > + Makefile.in | 10 ++-------- > + 1 file changed, 2 insertions(+), 8 deletions(-) > + > +diff --git a/Makefile.in b/Makefile.in > +index 6f99733..5fe028f 100644 > +--- a/Makefile.in > ++++ b/Makefile.in > +@@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@ > + > + CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ > + build/apr_rules.out tools/gen_test_char@EXEEXT@ \ > +- tools/gen_test_char.o tools/gen_test_char.lo \ > + include/private/apr_escape_test_char.h > + DISTCLEAN_TARGETS = config.cache config.log config.status \ > + include/apr.h include/arch/unix/apr_private.h \ > +@@ -129,13 +128,8 @@ check: $(TARGET_LIB) > + etags: > + etags `find . -name '*.[ch]'` > + > +-make_tools_dir: > +- $(APR_MKDIR) tools > +- > +-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) > +-tools/gen_test_char.lo: make_tools_dir > +-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) > +- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) > ++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c > ++ $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@ > + > + include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ > + $(APR_MKDIR) include/private > +-- > +1.8.1.2 > + > diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb > index 7f2d2ca..8c77af2 100644 > --- a/meta/recipes-support/apr/apr_1.5.1.bb > +++ b/meta/recipes-support/apr/apr_1.5.1.bb > @@ -14,6 +14,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ > file://cleanup.patch \ > file://configfix.patch \ > file://run-ptest \ > + file://upgrade-and-fix.patch \ > " > > SRC_URI[md5sum] = "5486180ec5a23efb5cae6d4292b300ab" >