Created attachment 1706 [details] compile log in alsa-tools-$PN.bb we configure automake for cross compiling with 'export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls ${STAGING_DATADIR_NATIVE} | grep automake)' in which the grep can return a multi-line value, if multiple version of automake are present in STAGING_DATADIR_NATIVE, for example after an upgrade of automake. this breaks compilation. suggested solution: pipe the value of grep into tail -n1 to only take the newest version of automake: export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls ${STAGING_DATADIR_NATIVE} | grep automake | tail -n1)
to be complete: git-rev: master:18d486c58a55d91c56678d5355958d7a2c7fd1e9
(In reply to comment #0) > Created attachment 1706 [details] > compile log > > in alsa-tools-$PN.bb we configure automake for cross compiling with > 'export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls > ${STAGING_DATADIR_NATIVE} | grep automake)' > > in which the grep can return a multi-line value, if multiple version of > automake are present in STAGING_DATADIR_NATIVE, for example after an upgrade > of automake. this breaks compilation. > > suggested solution: pipe the value of grep into tail -n1 to only take the > newest version of automake: > > export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls ${STAGING_DATADIR_NATIVE} > | grep automake | tail -n1) Hi, thanks for reporting this, I had upgraded automake from 1.13 to automake, according to your descriptions, there are both automake-1.13 and automake-1.14 under ${STAGING_DATADIR_NATIVE}, but that should not happen in theory,, since the automake-1.13's files in the STAGING_DATADIR_NATIVE will be removed automatically when we build the automake-1.14. I have also reverted the upgrade and run "bitbake alsao-tools", then upgrade to automake-1.14 and build alsa-tools again, but can't reproduce the problem, so mark it as NI, though, I think that you have showed enough info.
That seems fairly conclusive. I was wondered to see that automake-1.13 files weren't deleted during upgrade and can't say why. Infact, for me, they stayed. I will revert later on and see if I can examine that closer. Question is, can we 100%-ly garantuee there will be only one folder automake-* in $STAGING_DATADIR_NATIVE at any time? I'm not that into the toolchain, but if the sysroot is always cleared of old versions, the alsa-tools recipe is fine the way it is, and I have to determine, why the folder haven't got removed in my case... But if things like that can happen, or simply to be more robust, the grep is quite unsafe. Maybe we can catch this case and raise a warning like: $AUTOMAKE_DIR = $(ls ${STAGING_DATADIR_NATIVE} | grep automake); if[ `wc -l < $AUTOMAKE_DIR` > 1 ] bbwarn("multiple versions of automake present, choosing latest"); $AUTOMAKE_DIR = echo $AUTOMAKE_DIR | tail -n1 fi export $AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$AUTOMAKE_DIR Sorry for Syntax errors, I'm not thaaaat into bash :) I'll anyway report wether i was able to reproduce the error and investigate, why automake-1.13 wasn't removed from sysroot.
(In reply to comment #3) > That seems fairly conclusive. I was wondered to see that automake-1.13 files > weren't deleted during upgrade and can't say why. Infact, for me, they > stayed. I will revert later on and see if I can examine that closer. Thanks. > Question is, can we 100%-ly garantuee there will be only one folder > automake-* in $STAGING_DATADIR_NATIVE at any time? I'm not that into the > toolchain, but if the sysroot is always cleared of old versions, the > alsa-tools recipe is fine the way it is, and I have to determine, why the > folder haven't got removed in my case... > > But if things like that can happen, or simply to be more robust, the grep is > quite unsafe. Maybe we can catch this case and raise a warning like: > > $AUTOMAKE_DIR = $(ls ${STAGING_DATADIR_NATIVE} | grep automake); > if[ `wc -l < $AUTOMAKE_DIR` > 1 ] > bbwarn("multiple versions of automake present, choosing latest"); > $AUTOMAKE_DIR = echo $AUTOMAKE_DIR | tail -n1 > fi > export $AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$AUTOMAKE_DIR > Yes, it is a good idea, but it has other problems, alsa-tools' do_configure doesn't work, I think that it's do_configure should be "make configure", but currently it is: do_configure () { autotools_do_configure autotools_copy_aclocal } I need do more investigation to see if we can fix both the do_configue and automake issue. > > Sorry for Syntax errors, I'm not thaaaat into bash :) > > I'll anyway report wether i was able to reproduce the error and investigate, > why automake-1.13 wasn't removed from sysroot. Thanks, that would be great.
After more investigations, the: do_configure () { autotools_do_configure autotools_copy_aclocal } is for the ACLOCAL_FLAGS, so it is ok, and the following patch will fix your concern, I will send it to the mailing list later: Subject: [PATCH] alsa-tools: fix the AUTOMAKE_DIR There should be only one automake under the STAGING_DATADIR_NATIVE in theory, but der_steffi@gmx.de has reported an odd problem which seemed like that there are more than one. However, the "automake --print-libdir" is the regular way to locate automake libdir. [YOCTO #5706] Reported-by: der_steffi@gmx.de Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb index c3b97a3..5b0f6ae 100644 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb @@ -32,7 +32,7 @@ do_configure () { do_compile_prepend () { #Automake dir is not correctly detected in cross compilation case - export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls ${STAGING_DATADIR_NATIVE} | grep automake) + export AUTOMAKE_DIR="$(automake --print-libdir)" export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/" }
Merged into master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5ccdc914126e2408519bd9cae9dec20066a3033e
Verified. I can't reproduce the issue in poky a44006262cf3b810ec78b4cccd8076102a7a0f3e. host Ubuntu 14.04 x86_64.