[Buildroot] [RFC] Per-package and relocatable SDKs problem?

Charles Hardin ckhardin at gmail.com
Tue Oct 10 19:05:31 UTC 2023


Hi Arnout

On Tue, Oct 10, 2023 at 11:10 AM Arnout Vandecappelle <arnout at mind.be> wrote:
>
>   Hi Charles,
>
> On 09/10/2023 23:37, Charles Hardin wrote:
> > For the curious,
> >
> > We have discovered a problem in that the per-package build of the host
> > directory is doing an rsync to finalize the tree from the last
> > per-package directory in the dependency chain (in our case below this
> > is qt5tools). This means that several text files like the one below
> > (shasum) contain the per-package directory path in them.
> >
> > For example - a per-package build and check the BUILD directory to
> > check the shasum script
> >
> >      $ head -5 host/bin/shasum
> >      #!/home/ubuntu/emb-platform-build/falcon/ucb/per-package/qt5tools/host/bin/perl
> >          eval 'exec
> > /home/ubuntu/emb-platform-build/falcon/ucb/per-package/qt5tools/host/bin/perl
> > -S $0 ${1+"$@"}'
> >              if 0; # ^ Run only under a shell
> >      #!perl
> >      ... snip snip ...
> >
> > This works in the build path but will fail when the SDK is made and
> > relocated because the relocate-sdk.sh script doesn't handle
> > per-package paths.
> >
> >      # Make sure file uses the right language
> >      export LC_ALL=C
> >      # Replace the old path with the new one in all text files
> >      grep -lr "${OLDPATH}" . | while read -r FILE ; do
> >          if file -b --mime-type "${FILE}" | grep -q '^text/' && [
> > "${FILE}" != "${LOCFILE}" ]
> >          then
> >              sed -i "s|${OLDPATH}|${NEWPATH}|g" "${FILE}"
> >          fi
> >      done
> >
> >
> > The OLDPATH is the old location of the directory without the concept
> > of the per-package paths in the tree. So, is this something that is
> > known? Tried searching the mailing list and commits and didn't see a
> > reference to this problem so was a bit curious.
>
>   I believe that should be fixed by [1].
>
>   Apparently nobody else encountered this problem up to now because that patch
> never received any Acked-by or Tested-by :-)
>
>   Regards,
>   Arnout
>
> [1]
> https://patchwork.ozlabs.org/project/buildroot/patch/20221227154300.10556-1-brandon.maier@collins.com/
>

Confirmed - this fixed the problem. Thanks.

Applied the patch for our project - hopefully it get's merged into mainline.

>
>
> >
> > Charles
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list