diff mbox series

libbsd: Fix conflict error when enable multlib.

Message ID 20240319004524.1270639-1-leimaohui@fujitsu.com
State New
Headers show
Series libbsd: Fix conflict error when enable multlib. | expand

Commit Message

Maohui Lei (Fujitsu) March 19, 2024, 12:45 a.m. UTC
From: Lei Maohui <leimaohui@fujitsu.com>

Error: Transaction test error:
  file /usr/include/bsd/sys/cdefs.h conflicts between attempted installs 
of libbsd-dev-0.12.1-r0.core2_64 and lib32-libbsd-dev-0.12.1-r0.core2_32

The difference of bsd/sys/cdefs.h between libbsd-dev and
lib32-libbsd-dev is as following:

 /* Define the ABI for the current system. */
 -#define LIBBSD_SYS_TIME_BITS 64
 +#define LIBBSD_SYS_TIME_BITS 32
 #define LIBBSD_SYS_HAS_TIME64 1

Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
---
 meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Khem Raj March 20, 2024, 5:21 a.m. UTC | #1
This causes mg build failures see
https://errors.yoctoproject.org/Errors/Details/759473/

On Mon, Mar 18, 2024 at 5:45 PM leimaohui via lists.openembedded.org
<leimaohui=fujitsu.com@lists.openembedded.org> wrote:
>
> From: Lei Maohui <leimaohui@fujitsu.com>
>
> Error: Transaction test error:
>   file /usr/include/bsd/sys/cdefs.h conflicts between attempted installs
> of libbsd-dev-0.12.1-r0.core2_64 and lib32-libbsd-dev-0.12.1-r0.core2_32
>
> The difference of bsd/sys/cdefs.h between libbsd-dev and
> lib32-libbsd-dev is as following:
>
>  /* Define the ABI for the current system. */
>  -#define LIBBSD_SYS_TIME_BITS 64
>  +#define LIBBSD_SYS_TIME_BITS 32
>  #define LIBBSD_SYS_HAS_TIME64 1
>
> Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
> ---
>  meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> index 161dc6df43..84edd9bafa 100644
> --- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> +++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> @@ -40,8 +40,12 @@ SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
>
>  SRC_URI[sha256sum] = "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
>
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig multilib_header
>
>  DEPENDS += "libmd"
>
> +do_install:append () {
> +       oe_multilib_header bsd/sys/cdefs.h
> +}
> +
>  BBCLASSEXTEND = "native nativesdk"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197315): https://lists.openembedded.org/g/openembedded-core/message/197315
> Mute This Topic: https://lists.openembedded.org/mt/105016171/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Maohui Lei (Fujitsu) March 21, 2024, 1:19 a.m. UTC | #2
Hi.

> This causes mg build failures see
> https://errors.yoctoproject.org/Errors/Details/759473/

I'm sorry that I can't reproduce this error. I used the default qemux86.conf, and bitbake libbsd. There is no error.
So, can you show me your config of i686-yoe-linux?

Best regards
Lei




> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Wednesday, March 20, 2024 1:22 PM
> To: Lei, Maohui <leimaohui@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> 
> This causes mg build failures see
> https://errors.yoctoproject.org/Errors/Details/759473/
> 
> On Mon, Mar 18, 2024 at 5:45 PM leimaohui via lists.openembedded.org
> <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> >
> > From: Lei Maohui <leimaohui@fujitsu.com>
> >
> > Error: Transaction test error:
> >   file /usr/include/bsd/sys/cdefs.h conflicts between attempted
> > installs of libbsd-dev-0.12.1-r0.core2_64 and
> > lib32-libbsd-dev-0.12.1-r0.core2_32
> >
> > The difference of bsd/sys/cdefs.h between libbsd-dev and
> > lib32-libbsd-dev is as following:
> >
> >  /* Define the ABI for the current system. */  -#define
> > LIBBSD_SYS_TIME_BITS 64  +#define LIBBSD_SYS_TIME_BITS 32  #define
> > LIBBSD_SYS_HAS_TIME64 1
> >
> > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
> > ---
> >  meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > index 161dc6df43..84edd9bafa 100644
> > --- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > +++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > @@ -40,8 +40,12 @@ SRC_URI =
> "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
> >
> >  SRC_URI[sha256sum] =
> "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
> >
> > -inherit autotools pkgconfig
> > +inherit autotools pkgconfig multilib_header
> >
> >  DEPENDS += "libmd"
> >
> > +do_install:append () {
> > +       oe_multilib_header bsd/sys/cdefs.h }
> > +
> >  BBCLASSEXTEND = "native nativesdk"
> > --
> > 2.34.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#197315):
> > https://lists.openembedded.org/g/openembedded-core/message/197315
> > Mute This Topic: https://lists.openembedded.org/mt/105016171/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
> > [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Khem Raj March 21, 2024, 2:19 a.m. UTC | #3
On Wed, Mar 20, 2024 at 6:20 PM Maohui Lei (Fujitsu)
<leimaohui@fujitsu.com> wrote:
>
> Hi.
>
> > This causes mg build failures see
> > https://errors.yoctoproject.org/Errors/Details/759473/
>
> I'm sorry that I can't reproduce this error. I used the default qemux86.conf, and bitbake libbsd. There is no error.
> So, can you show me your config of i686-yoe-linux?

I guess you might need to throw in meta-clang into layers and use
TOOLCHAIN = "clang" perhaps.

>
> Best regards
> Lei
>
>
>
>
> > -----Original Message-----
> > From: Khem Raj <raj.khem@gmail.com>
> > Sent: Wednesday, March 20, 2024 1:22 PM
> > To: Lei, Maohui <leimaohui@fujitsu.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> >
> > This causes mg build failures see
> > https://errors.yoctoproject.org/Errors/Details/759473/
> >
> > On Mon, Mar 18, 2024 at 5:45 PM leimaohui via lists.openembedded.org
> > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > >
> > > From: Lei Maohui <leimaohui@fujitsu.com>
> > >
> > > Error: Transaction test error:
> > >   file /usr/include/bsd/sys/cdefs.h conflicts between attempted
> > > installs of libbsd-dev-0.12.1-r0.core2_64 and
> > > lib32-libbsd-dev-0.12.1-r0.core2_32
> > >
> > > The difference of bsd/sys/cdefs.h between libbsd-dev and
> > > lib32-libbsd-dev is as following:
> > >
> > >  /* Define the ABI for the current system. */  -#define
> > > LIBBSD_SYS_TIME_BITS 64  +#define LIBBSD_SYS_TIME_BITS 32  #define
> > > LIBBSD_SYS_HAS_TIME64 1
> > >
> > > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
> > > ---
> > >  meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
> > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > index 161dc6df43..84edd9bafa 100644
> > > --- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > +++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > @@ -40,8 +40,12 @@ SRC_URI =
> > "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
> > >
> > >  SRC_URI[sha256sum] =
> > "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
> > >
> > > -inherit autotools pkgconfig
> > > +inherit autotools pkgconfig multilib_header
> > >
> > >  DEPENDS += "libmd"
> > >
> > > +do_install:append () {
> > > +       oe_multilib_header bsd/sys/cdefs.h }
> > > +
> > >  BBCLASSEXTEND = "native nativesdk"
> > > --
> > > 2.34.1
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#197315):
> > > https://lists.openembedded.org/g/openembedded-core/message/197315
> > > Mute This Topic: https://lists.openembedded.org/mt/105016171/1997914
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
> > > [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
Maohui Lei (Fujitsu) March 21, 2024, 5:38 a.m. UTC | #4
Hi, 

> I guess you might need to throw in meta-clang into layers and use TOOLCHAIN =
> "clang" perhaps.

I tried again with the following steps. Bit I still didn't reproduced the error. Is there anything I missed?

$ grep clang conf/local.conf
TOOLCHAIN = "clang"
$ grep clang conf/bblayers.conf
  /dev/common/home/leimh/community/meta-clang \
$ bitbake libbsd
Build Configuration:
BB_VERSION           = "2.7.3"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "i686-poky-linux"
MACHINE              = "qemux86"
DISTRO               = "poky"
DISTRO_VERSION       = "4.3+snapshot-08d0544be3e1881b623f18931631e412a9a0158d"
TUNE_FEATURES        = "m32 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "master:08d0544be3e1881b623f18931631e412a9a0158d"
meta-clang           = "master:81e5f4eef93b5e1d6507daaf74fce28a2ccd7cf7"
......
$


Best regards
Lei

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of Khem Raj
> Sent: Thursday, March 21, 2024 10:20 AM
> To: Lei, Maohui <leimaohui@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> 
> On Wed, Mar 20, 2024 at 6:20 PM Maohui Lei (Fujitsu) <leimaohui@fujitsu.com>
> wrote:
> >
> > Hi.
> >
> > > This causes mg build failures see
> > > https://errors.yoctoproject.org/Errors/Details/759473/
> >
> > I'm sorry that I can't reproduce this error. I used the default qemux86.conf,
> and bitbake libbsd. There is no error.
> > So, can you show me your config of i686-yoe-linux?
> 
> I guess you might need to throw in meta-clang into layers and use TOOLCHAIN =
> "clang" perhaps.
> 
> >
> > Best regards
> > Lei
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Khem Raj <raj.khem@gmail.com>
> > > Sent: Wednesday, March 20, 2024 1:22 PM
> > > To: Lei, Maohui <leimaohui@fujitsu.com>
> > > Cc: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> > >
> > > This causes mg build failures see
> > > https://errors.yoctoproject.org/Errors/Details/759473/
> > >
> > > On Mon, Mar 18, 2024 at 5:45 PM leimaohui via lists.openembedded.org
> > > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > > >
> > > > From: Lei Maohui <leimaohui@fujitsu.com>
> > > >
> > > > Error: Transaction test error:
> > > >   file /usr/include/bsd/sys/cdefs.h conflicts between attempted
> > > > installs of libbsd-dev-0.12.1-r0.core2_64 and
> > > > lib32-libbsd-dev-0.12.1-r0.core2_32
> > > >
> > > > The difference of bsd/sys/cdefs.h between libbsd-dev and
> > > > lib32-libbsd-dev is as following:
> > > >
> > > >  /* Define the ABI for the current system. */  -#define
> > > > LIBBSD_SYS_TIME_BITS 64  +#define LIBBSD_SYS_TIME_BITS 32
> #define
> > > > LIBBSD_SYS_HAS_TIME64 1
> > > >
> > > > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
> > > > ---
> > > >  meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
> > > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > index 161dc6df43..84edd9bafa 100644
> > > > --- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > +++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > @@ -40,8 +40,12 @@ SRC_URI =
> > > "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
> > > >
> > > >  SRC_URI[sha256sum] =
> > >
> "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
> > > >
> > > > -inherit autotools pkgconfig
> > > > +inherit autotools pkgconfig multilib_header
> > > >
> > > >  DEPENDS += "libmd"
> > > >
> > > > +do_install:append () {
> > > > +       oe_multilib_header bsd/sys/cdefs.h }
> > > > +
> > > >  BBCLASSEXTEND = "native nativesdk"
> > > > --
> > > > 2.34.1
> > > >
> > > >
> > > >
> > > >
Khem Raj March 21, 2024, 5:54 a.m. UTC | #5
On Wed, Mar 20, 2024 at 10:38 PM Maohui Lei (Fujitsu)
<leimaohui@fujitsu.com> wrote:
>
> Hi,
>
> > I guess you might need to throw in meta-clang into layers and use TOOLCHAIN =
> > "clang" perhaps.
>
> I tried again with the following steps. Bit I still didn't reproduced the error. Is there anything I missed?
>
> $ grep clang conf/local.conf
> TOOLCHAIN = "clang"
> $ grep clang conf/bblayers.conf
>   /dev/common/home/leimh/community/meta-clang \
> $ bitbake libbsd
> Build Configuration:
> BB_VERSION           = "2.7.3"
> BUILD_SYS            = "x86_64-linux"
> NATIVELSBSTRING      = "universal"
> TARGET_SYS           = "i686-poky-linux"
> MACHINE              = "qemux86"
> DISTRO               = "poky"
> DISTRO_VERSION       = "4.3+snapshot-08d0544be3e1881b623f18931631e412a9a0158d"
> TUNE_FEATURES        = "m32 core2"
> TARGET_FPU           = ""
> meta
> meta-poky
> meta-yocto-bsp       = "master:08d0544be3e1881b623f18931631e412a9a0158d"
> meta-clang           = "master:81e5f4eef93b5e1d6507daaf74fce28a2ccd7cf7"
> ......
> $
>

That may not be sufficient. You need to run
bitbake mg

secondly, Set TOOLCHAIN = "clang" perhaps first try setting it just
for mg and then for mg and libbsd
if it still does not reproduce then set it in local.conf

>
> Best regards
> Lei
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org
> > <openembedded-core@lists.openembedded.org> On Behalf Of Khem Raj
> > Sent: Thursday, March 21, 2024 10:20 AM
> > To: Lei, Maohui <leimaohui@fujitsu.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> >
> > On Wed, Mar 20, 2024 at 6:20 PM Maohui Lei (Fujitsu) <leimaohui@fujitsu.com>
> > wrote:
> > >
> > > Hi.
> > >
> > > > This causes mg build failures see
> > > > https://errors.yoctoproject.org/Errors/Details/759473/
> > >
> > > I'm sorry that I can't reproduce this error. I used the default qemux86.conf,
> > and bitbake libbsd. There is no error.
> > > So, can you show me your config of i686-yoe-linux?
> >
> > I guess you might need to throw in meta-clang into layers and use TOOLCHAIN =
> > "clang" perhaps.
> >
> > >
> > > Best regards
> > > Lei
> > >
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Khem Raj <raj.khem@gmail.com>
> > > > Sent: Wednesday, March 20, 2024 1:22 PM
> > > > To: Lei, Maohui <leimaohui@fujitsu.com>
> > > > Cc: openembedded-core@lists.openembedded.org
> > > > Subject: Re: [OE-core] [PATCH] libbsd: Fix conflict error when enable multlib.
> > > >
> > > > This causes mg build failures see
> > > > https://errors.yoctoproject.org/Errors/Details/759473/
> > > >
> > > > On Mon, Mar 18, 2024 at 5:45 PM leimaohui via lists.openembedded.org
> > > > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > > > >
> > > > > From: Lei Maohui <leimaohui@fujitsu.com>
> > > > >
> > > > > Error: Transaction test error:
> > > > >   file /usr/include/bsd/sys/cdefs.h conflicts between attempted
> > > > > installs of libbsd-dev-0.12.1-r0.core2_64 and
> > > > > lib32-libbsd-dev-0.12.1-r0.core2_32
> > > > >
> > > > > The difference of bsd/sys/cdefs.h between libbsd-dev and
> > > > > lib32-libbsd-dev is as following:
> > > > >
> > > > >  /* Define the ABI for the current system. */  -#define
> > > > > LIBBSD_SYS_TIME_BITS 64  +#define LIBBSD_SYS_TIME_BITS 32
> > #define
> > > > > LIBBSD_SYS_HAS_TIME64 1
> > > > >
> > > > > Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
> > > > > ---
> > > > >  meta/recipes-support/libbsd/libbsd_0.12.1.bb | 6 +++++-
> > > > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > > b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > > index 161dc6df43..84edd9bafa 100644
> > > > > --- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > > +++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
> > > > > @@ -40,8 +40,12 @@ SRC_URI =
> > > > "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
> > > > >
> > > > >  SRC_URI[sha256sum] =
> > > >
> > "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
> > > > >
> > > > > -inherit autotools pkgconfig
> > > > > +inherit autotools pkgconfig multilib_header
> > > > >
> > > > >  DEPENDS += "libmd"
> > > > >
> > > > > +do_install:append () {
> > > > > +       oe_multilib_header bsd/sys/cdefs.h }
> > > > > +
> > > > >  BBCLASSEXTEND = "native nativesdk"
> > > > > --
> > > > > 2.34.1
> > > > >
> > > > >
> > > > >
> > > > >
diff mbox series

Patch

diff --git a/meta/recipes-support/libbsd/libbsd_0.12.1.bb b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
index 161dc6df43..84edd9bafa 100644
--- a/meta/recipes-support/libbsd/libbsd_0.12.1.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.12.1.bb
@@ -40,8 +40,12 @@  SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
 
 SRC_URI[sha256sum] = "d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig multilib_header
 
 DEPENDS += "libmd"
 
+do_install:append () {
+       oe_multilib_header bsd/sys/cdefs.h
+}
+
 BBCLASSEXTEND = "native nativesdk"