On Mon, 2023-07-24 at 20:13 +0200, Böszörményi Zoltán wrote:
> 2023. 07. 24. 17:59 keltezéssel, Richard Purdie írta:
> > On Mon, 2023-07-24 at 14:35 +0200, Zoltan Boszormenyi wrote:
> > > Some BSP architecture builds (e.g. genericx86-64 or anything from
> > > meta-intel) don't have their /usr/lib/rpm/platform/<arch>-linux
> > > directories. This causes rpmbuild fail on the target machine.
> > > 
> > > Use ${SDK_ARCH}-linux as the base arch which likely exists in
> > > /usr/lib/rpm/platform and clone it as ${MACHINE_ARCH}-linux.
> > > 
> > > Also, fix %_lib and %_libdir in the new cloned platform directory
> > > to use ${baselib} and ${libdir} so the RPM package contents will
> > > be correct for library packages.
> > > 
> > > Signed-off-by: Zoltán Böszörményi <[email protected]>
> > > ---
> > >   meta/recipes-devtools/rpm/rpm_4.18.1.bb | 13 +++++++++++++
> > >   1 file changed, 13 insertions(+)
> > > 
> > > diff --git a/meta/recipes-devtools/rpm/rpm_4.18.1.bb 
> > > b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
> > > index 95a9e92f96..21f0127561 100644
> > > --- a/meta/recipes-devtools/rpm/rpm_4.18.1.bb
> > > +++ b/meta/recipes-devtools/rpm/rpm_4.18.1.bb
> > > @@ -131,7 +131,20 @@ do_install:append:class-nativesdk() {
> > >   # Rpm's make install creates var/tmp which clashes with base-files 
> > > packaging
> > >   do_install:append:class-target() {
> > >       rm -rf ${D}/var
> > > +
> > > +    if [ -d "${D}${prefix}/lib/rpm/platform/${SDK_ARCH}-linux" ]; then
> > > +        if [ ! -d ${D}${prefix}/lib/rpm/platform/${MACHINE_ARCH}-linux 
> > > ]; then
> > > +            cp -r ${D}${prefix}/lib/rpm/platform/${SDK_ARCH}-linux 
> > > ${D}${prefix}/lib/rpm/platform/${MACHINE_ARCH}-linux
> > > +        fi
> > > +    fi
> > 
> > SDK_ARCH should not be referenced outside of nativesdk recipes. This
> > reference is almost certainly incorrect as it would make the target
> > recipe dependent on the value of SDKMACHINE.
> 
> Please advise what setting should be used instead.
> 
> MACHINE_ARCH is what ends up in /etc/rpm/platform.
> TARGET_ARCH is not available in Honister but SDK_ARCH is.
> 
> Suggest a common setting that can be used in both older and
> newer Yocto versions that has the base arch name and is
> usable for target builds.

I'm afraid I don't understand the problem you're running into from your
description so I don't know how to answer that. TARGET_ARCH has been
around in OE for many years so I'd be surprised it is unavailable in
honister though.

I do know that SDK_ARCH is incorrect here though. To prove what I'm
saying, try setting SDKMACHINE = "i686" and then check the value of
SDK_ARCH compared to when SDKMACHINE = "x86_64" (or "aarch64").

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184807): 
https://lists.openembedded.org/g/openembedded-core/message/184807
Mute This Topic: https://lists.openembedded.org/mt/100328070/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to