Message ID | 20240418012247.490545-1-leimaohui@fujitsu.com |
---|---|
State | New |
Headers | show |
Series | [v2] libbsd: Fix conflict error when enable multilib. | expand |
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
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
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
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
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
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"