All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
@ 2024-04-18  1:22 leimaohui
  2024-04-18  5:32 ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: leimaohui @ 2024-04-18  1:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Lei Maohui

From: Lei Maohui <leimaohui@fujitsu.com>

- The conflict error is as the following:
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

- The path of cdefs-64.h and cdefs-32.h in cdefs.h is not correct for libbsd after enable oe_multilib_header on cdefs.h. It is necessary to fix the path.

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

diff --git a/meta/recipes-support/libbsd/libbsd_0.12.2.bb b/meta/recipes-support/libbsd/libbsd_0.12.2.bb
index 7d5e88f293..e1fc7d9b3c 100644
--- a/meta/recipes-support/libbsd/libbsd_0.12.2.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.12.2.bb
@@ -40,8 +40,14 @@ SRC_URI = "https://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
 
 SRC_URI[sha256sum] = "b88cc9163d0c652aaf39a99991d974ddba1c3a9711db8f1b5838af2a14731014"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig multilib_header
 
 DEPENDS += "libmd"
 
+do_install:append () {
+       oe_multilib_header bsd/sys/cdefs.h
+       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g' ${D}${includedir}/bsd/sys/cdefs.h
+}
+
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
  2024-04-18  1:22 [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib leimaohui
@ 2024-04-18  5:32 ` Alexander Kanavin
  2024-04-19  1:15   ` Maohui Lei (Fujitsu)
       [not found]   ` <17C7897B23C043A5.4146@lists.openembedded.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Kanavin @ 2024-04-18  5:32 UTC (permalink / raw)
  To: leimaohui; +Cc: openembedded-core

On Thu, 18 Apr 2024 at 03:23, leimaohui via lists.openembedded.org
<leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> - The path of cdefs-64.h and cdefs-32.h in cdefs.h is not correct for libbsd after enable oe_multilib_header on cdefs.h. It is necessary to fix the path.
> +do_install:append () {
> +       oe_multilib_header bsd/sys/cdefs.h
> +       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g' ${D}${includedir}/bsd/sys/cdefs.h

Can you explain a bit more? Why and how is it not correct? Why isn't a
similar fix needed in other uses of oe_multilib_header?

Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
  2024-04-18  5:32 ` Alexander Kanavin
@ 2024-04-19  1:15   ` Maohui Lei (Fujitsu)
       [not found]   ` <17C7897B23C043A5.4146@lists.openembedded.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Maohui Lei (Fujitsu) @ 2024-04-19  1:15 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

Hi, Alex

> Can you explain a bit more? Why and how is it not correct? Why isn't a similar fix
> needed in other uses of oe_multilib_header?

Reference to https://man.archlinux.org/man/libbsd.7, by default, libbsd is built in an overlay mode, the includes in this case should be the usual system ones, such as <unistd.h> without namespaced with bsd/.
It seems that libbsd is special.

Best regards
Lei


> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: Thursday, April 18, 2024 1:33 PM
> To: Lei, Maohui <leimaohui@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> 
> On Thu, 18 Apr 2024 at 03:23, leimaohui via lists.openembedded.org
> <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > - The path of cdefs-64.h and cdefs-32.h in cdefs.h is not correct for libbsd after
> enable oe_multilib_header on cdefs.h. It is necessary to fix the path.
> > +do_install:append () {
> > +       oe_multilib_header bsd/sys/cdefs.h
> > +       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g'
> > +${D}${includedir}/bsd/sys/cdefs.h
> 
> Can you explain a bit more? Why and how is it not correct? Why isn't a similar fix
> needed in other uses of oe_multilib_header?
> 
> Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
       [not found]   ` <17C7897B23C043A5.4146@lists.openembedded.org>
@ 2024-04-24  2:08     ` Maohui Lei (Fujitsu)
  2024-04-24  8:38       ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Maohui Lei (Fujitsu) @ 2024-04-24  2:08 UTC (permalink / raw)
  To: Maohui Lei (Fujitsu), Alexander Kanavin; +Cc: openembedded-core

Ping



> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of leimaohui via
> lists.openembedded.org
> Sent: Friday, April 19, 2024 9:16 AM
> To: Alexander Kanavin <alex.kanavin@gmail.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> 
> Hi, Alex
> 
> > Can you explain a bit more? Why and how is it not correct? Why isn't a
> > similar fix needed in other uses of oe_multilib_header?
> 
> Reference to https://man.archlinux.org/man/libbsd.7, by default, libbsd is built
> in an overlay mode, the includes in this case should be the usual system ones,
> such as <unistd.h> without namespaced with bsd/.
> It seems that libbsd is special.
> 
> Best regards
> Lei
> 
> 
> > -----Original Message-----
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Sent: Thursday, April 18, 2024 1:33 PM
> > To: Lei, Maohui <leimaohui@fujitsu.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> >
> > On Thu, 18 Apr 2024 at 03:23, leimaohui via lists.openembedded.org
> > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > > - The path of cdefs-64.h and cdefs-32.h in cdefs.h is not correct
> > > for libbsd after
> > enable oe_multilib_header on cdefs.h. It is necessary to fix the path.
> > > +do_install:append () {
> > > +       oe_multilib_header bsd/sys/cdefs.h
> > > +       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g'
> > > +${D}${includedir}/bsd/sys/cdefs.h
> >
> > Can you explain a bit more? Why and how is it not correct? Why isn't a
> > similar fix needed in other uses of oe_multilib_header?
> >
> > Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
  2024-04-24  2:08     ` Maohui Lei (Fujitsu)
@ 2024-04-24  8:38       ` Alexander Kanavin
  2024-04-25  5:54         ` Maohui Lei (Fujitsu)
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2024-04-24  8:38 UTC (permalink / raw)
  To: Maohui Lei (Fujitsu); +Cc: openembedded-core

It would help if you show the actual content that is being fixed. E.g.
the problematic line in the header:
- before the fixing
- after being processed with oe_multilib_header
- after being fixed with sed.

Otherwise I still don't quite understand what is happening.

Alex

On Wed, 24 Apr 2024 at 04:08, Maohui Lei (Fujitsu)
<leimaohui@fujitsu.com> wrote:
>
> Ping
>
>
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org
> > <openembedded-core@lists.openembedded.org> On Behalf Of leimaohui via
> > lists.openembedded.org
> > Sent: Friday, April 19, 2024 9:16 AM
> > To: Alexander Kanavin <alex.kanavin@gmail.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> >
> > Hi, Alex
> >
> > > Can you explain a bit more? Why and how is it not correct? Why isn't a
> > > similar fix needed in other uses of oe_multilib_header?
> >
> > Reference to https://man.archlinux.org/man/libbsd.7, by default, libbsd is built
> > in an overlay mode, the includes in this case should be the usual system ones,
> > such as <unistd.h> without namespaced with bsd/.
> > It seems that libbsd is special.
> >
> > Best regards
> > Lei
> >
> >
> > > -----Original Message-----
> > > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > > Sent: Thursday, April 18, 2024 1:33 PM
> > > To: Lei, Maohui <leimaohui@fujitsu.com>
> > > Cc: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> > >
> > > On Thu, 18 Apr 2024 at 03:23, leimaohui via lists.openembedded.org
> > > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > > > - The path of cdefs-64.h and cdefs-32.h in cdefs.h is not correct
> > > > for libbsd after
> > > enable oe_multilib_header on cdefs.h. It is necessary to fix the path.
> > > > +do_install:append () {
> > > > +       oe_multilib_header bsd/sys/cdefs.h
> > > > +       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g'
> > > > +${D}${includedir}/bsd/sys/cdefs.h
> > >
> > > Can you explain a bit more? Why and how is it not correct? Why isn't a
> > > similar fix needed in other uses of oe_multilib_header?
> > >
> > > Alex


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
  2024-04-24  8:38       ` Alexander Kanavin
@ 2024-04-25  5:54         ` Maohui Lei (Fujitsu)
  0 siblings, 0 replies; 6+ messages in thread
From: Maohui Lei (Fujitsu) @ 2024-04-25  5:54 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

Hi, Alex


> It would help if you show the actual content that is being fixed. E.g.
> the problematic line in the header:
> - before the fixing
> - after being processed with oe_multilib_header
> - after being fixed with sed.

I have submitted the v3 patch with above content. Please have a look. 


Best regards
Lei



> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of Alexander
> Kanavin
> Sent: Wednesday, April 24, 2024 4:38 PM
> To: Lei, Maohui <leimaohui@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib.
> 
> It would help if you show the actual content that is being fixed. E.g.
> the problematic line in the header:
> - before the fixing
> - after being processed with oe_multilib_header
> - after being fixed with sed.
> 
> Otherwise I still don't quite understand what is happening.
> 
> Alex
> 
> On Wed, 24 Apr 2024 at 04:08, Maohui Lei (Fujitsu) <leimaohui@fujitsu.com>
> wrote:
> >
> > Ping
> >
> >
> >
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org
> > > <openembedded-core@lists.openembedded.org> On Behalf Of leimaohui
> > > via lists.openembedded.org
> > > Sent: Friday, April 19, 2024 9:16 AM
> > > To: Alexander Kanavin <alex.kanavin@gmail.com>
> > > Cc: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable
> multilib.
> > >
> > > Hi, Alex
> > >
> > > > Can you explain a bit more? Why and how is it not correct? Why
> > > > isn't a similar fix needed in other uses of oe_multilib_header?
> > >
> > > Reference to https://man.archlinux.org/man/libbsd.7, by default,
> > > libbsd is built in an overlay mode, the includes in this case should
> > > be the usual system ones, such as <unistd.h> without namespaced with bsd/.
> > > It seems that libbsd is special.
> > >
> > > Best regards
> > > Lei
> > >
> > >
> > > > -----Original Message-----
> > > > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > > > Sent: Thursday, April 18, 2024 1:33 PM
> > > > To: Lei, Maohui <leimaohui@fujitsu.com>
> > > > Cc: openembedded-core@lists.openembedded.org
> > > > Subject: Re: [OE-core][PATCH v2] libbsd: Fix conflict error when enable
> multilib.
> > > >
> > > > On Thu, 18 Apr 2024 at 03:23, leimaohui via lists.openembedded.org
> > > > <leimaohui=fujitsu.com@lists.openembedded.org> wrote:
> > > > > - The path of cdefs-64.h and cdefs-32.h in cdefs.h is not
> > > > > correct for libbsd after
> > > > enable oe_multilib_header on cdefs.h. It is necessary to fix the path.
> > > > > +do_install:append () {
> > > > > +       oe_multilib_header bsd/sys/cdefs.h
> > > > > +       sed -i 's:#include <bsd/sys/cdefs:#include <sys/cdefs:g'
> > > > > +${D}${includedir}/bsd/sys/cdefs.h
> > > >
> > > > Can you explain a bit more? Why and how is it not correct? Why
> > > > isn't a similar fix needed in other uses of oe_multilib_header?
> > > >
> > > > Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-25  5:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  1:22 [OE-core][PATCH v2] libbsd: Fix conflict error when enable multilib leimaohui
2024-04-18  5:32 ` Alexander Kanavin
2024-04-19  1:15   ` Maohui Lei (Fujitsu)
     [not found]   ` <17C7897B23C043A5.4146@lists.openembedded.org>
2024-04-24  2:08     ` Maohui Lei (Fujitsu)
2024-04-24  8:38       ` Alexander Kanavin
2024-04-25  5:54         ` Maohui Lei (Fujitsu)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.