diff mbox series

[V2,4/5] xcb-proto: Fix install conflict when enable multilib.

Message ID 1678239619-21210-4-git-send-email-wangmy@fujitsu.com
State New
Headers show
Series [V2,1/5] dhcpcd: Fix install conflict when enable multilib. | expand

Commit Message

Mingyu Wang (Fujitsu) March 8, 2023, 1:40 a.m. UTC
From: Wang Mingyu <wangmy@fujitsu.com>

Error: Transaction test error:
  file /usr/share/pkgconfig/xcb-proto.pc conflicts between attempted installs of lib32-xcb-proto-dev-1.15.2-r0.armv7ahf_neon and xcb-proto-dev-1.15.2-r0.cortexa57

The differences between the two files are as follows:
@@ -2,7 +2,7 @@
 exec_prefix=/usr
 datarootdir=${prefix}/share
 datadir=/usr/share
-libdir=/usr/lib64
+libdir=/usr/lib
 xcbincludedir=${pc_sysrootdir}${datadir}/xcb
 PYTHON_PREFIX=${prefix}
 pythondir=${pc_sysrootdir}${libdir}/python3.11/site-packages

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb | 3 +++
 1 file changed, 3 insertions(+)

Comments

Richard Purdie March 8, 2023, 9:21 a.m. UTC | #1
On Wed, 2023-03-08 at 09:40 +0800, wangmy wrote:
> From: Wang Mingyu <wangmy@fujitsu.com>
> 
> Error: Transaction test error:
>   file /usr/share/pkgconfig/xcb-proto.pc conflicts between attempted installs of lib32-xcb-proto-dev-1.15.2-r0.armv7ahf_neon and xcb-proto-dev-1.15.2-r0.cortexa57
> 
> The differences between the two files are as follows:
> @@ -2,7 +2,7 @@
>  exec_prefix=/usr
>  datarootdir=${prefix}/share
>  datadir=/usr/share
> -libdir=/usr/lib64
> +libdir=/usr/lib
>  xcbincludedir=${pc_sysrootdir}${datadir}/xcb
>  PYTHON_PREFIX=${prefix}
>  pythondir=${pc_sysrootdir}${libdir}/python3.11/site-packages
> 
> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> ---
>  meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> index 4e4472a9c1..0fdca732e8 100644
> --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> @@ -28,3 +28,6 @@ DEV_PKG_DEPENDENCY = ""
>  RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
>  
>  BBCLASSEXTEND = "native nativesdk"
> +inherit multilib_script
> +MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/xcb-proto.pc"
> +

If the .pc file doesn't use libdir anywhere, we should just delete that
line. It is being installed into a "noarch" location (datadir) so it
shouldn't be library specific.

Also, we should *never* be putting pkgconfig files under update-
alternatives control!

Cheers,

Richard
Mingyu Wang (Fujitsu) March 13, 2023, 7:29 a.m. UTC | #2
When libxcb is compiled, it will read libdir from xcb-proto.pc to find the library. 
If delete this line, libxcb will report an error because it cannot find the directory of the library.

I haven't got any better way to solve this problem.

  --
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com
http://www.fujitsu.com/cn/fnst/

> -----Original Message-----
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Sent: Wednesday, March 8, 2023 5:21 PM
> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>;
> openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH V2 4/5] xcb-proto: Fix install conflict when enable
> multilib.
> 
> On Wed, 2023-03-08 at 09:40 +0800, wangmy wrote:
> > From: Wang Mingyu <wangmy@fujitsu.com>
> >
> > Error: Transaction test error:
> >   file /usr/share/pkgconfig/xcb-proto.pc conflicts between attempted
> > installs of lib32-xcb-proto-dev-1.15.2-r0.armv7ahf_neon and
> > xcb-proto-dev-1.15.2-r0.cortexa57
> >
> > The differences between the two files are as follows:
> > @@ -2,7 +2,7 @@
> >  exec_prefix=/usr
> >  datarootdir=${prefix}/share
> >  datadir=/usr/share
> > -libdir=/usr/lib64
> > +libdir=/usr/lib
> >  xcbincludedir=${pc_sysrootdir}${datadir}/xcb
> >  PYTHON_PREFIX=${prefix}
> >  pythondir=${pc_sysrootdir}${libdir}/python3.11/site-packages
> >
> > Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> > ---
> >  meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> > b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> > index 4e4472a9c1..0fdca732e8 100644
> > --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> > +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
> > @@ -28,3 +28,6 @@ DEV_PKG_DEPENDENCY = ""
> >  RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
> >
> >  BBCLASSEXTEND = "native nativesdk"
> > +inherit multilib_script
> > +MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/xcb-proto.pc"
> > +
> 
> If the .pc file doesn't use libdir anywhere, we should just delete that line. It is
> being installed into a "noarch" location (datadir) so it shouldn't be library
> specific.
> 
> Also, we should *never* be putting pkgconfig files under update- alternatives
> control!
> 
> Cheers,
> 
> Richard
Alexander Kanavin March 13, 2023, 7:50 a.m. UTC | #3
On Mon, 13 Mar 2023 at 08:29, wangmy <wangmy@fujitsu.com> wrote:
> When libxcb is compiled, it will read libdir from xcb-proto.pc to find the library.
> If delete this line, libxcb will report an error because it cannot find the directory of the library.

Which library in particular? Can you show the error, and the point in
libxcb's code where it happens?
xcb-proto does not install any libraries, and so there is no reason
for xcb-proto.pc to tell where the libraries are.

Alex
Mingyu Wang (Fujitsu) March 14, 2023, 12:49 a.m. UTC | #4
libxcb needs to find the python package in the path specified by pythondir recorded in xcb-proto.pc. If the libdir line is deleted, libxcb will report an error when compiling:
| Failed to load the xcbgen Python package!
| Make sure that xcb/proto installed it on your Python path.
| If not, you will need to create a .pth file or define $PYTHONPATH
| to extend the path.
| Refer to the README file in xcb/proto for more info.

The file contents after deleting libdir are compared as follows:
@@ -2,10 +2,8 @@
 exec_prefix=/usr
 datarootdir=${prefix}/share
 datadir=/usr/share
-libdir=/usr/lib
 xcbincludedir=${pc_sysrootdir}${datadir}/xcb
 PYTHON_PREFIX=${prefix}
-pythondir=${pc_sysrootdir}${libdir}/python3.11/site-packages

 Name: XCB Proto
 Description: X protocol descriptions for XCB

  --
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com
http://www.fujitsu.com/cn/fnst/

> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: Monday, March 13, 2023 3:50 PM
> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>
> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>;
> openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH V2 4/5] xcb-proto: Fix install conflict when enable
> multilib.
> 
> On Mon, 13 Mar 2023 at 08:29, wangmy <wangmy@fujitsu.com> wrote:
> > When libxcb is compiled, it will read libdir from xcb-proto.pc to find the library.
> > If delete this line, libxcb will report an error because it cannot find the
> directory of the library.
> 
> Which library in particular? Can you show the error, and the point in libxcb's
> code where it happens?
> xcb-proto does not install any libraries, and so there is no reason for
> xcb-proto.pc to tell where the libraries are.
> 
> Alex
Alexander Kanavin March 14, 2023, 8:29 a.m. UTC | #5
Thanks, in this case the correct fix would be to install xcb-proto.pc
into $libdir, as it is indeed library specific. You need to patch
Makefile.am in xcb-proto's source tree, and offer the patch to
upstream.

Alex

On Tue, 14 Mar 2023 at 01:49, wangmy@fujitsu.com <wangmy@fujitsu.com> wrote:
>
> libxcb needs to find the python package in the path specified by pythondir recorded in xcb-proto.pc. If the libdir line is deleted, libxcb will report an error when compiling:
> | Failed to load the xcbgen Python package!
> | Make sure that xcb/proto installed it on your Python path.
> | If not, you will need to create a .pth file or define $PYTHONPATH
> | to extend the path.
> | Refer to the README file in xcb/proto for more info.
>
> The file contents after deleting libdir are compared as follows:
> @@ -2,10 +2,8 @@
>  exec_prefix=/usr
>  datarootdir=${prefix}/share
>  datadir=/usr/share
> -libdir=/usr/lib
>  xcbincludedir=${pc_sysrootdir}${datadir}/xcb
>  PYTHON_PREFIX=${prefix}
> -pythondir=${pc_sysrootdir}${libdir}/python3.11/site-packages
>
>  Name: XCB Proto
>  Description: X protocol descriptions for XCB
>
>   --
> Best Regards
> ---------------------------------------------------
> Wang Mingyu
> Development Dept.I
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
> TEL: +86+25-86630566-8568
> COINS: 79988548
> FAX: +86+25-83317685
> MAIL: wangmy@fujitsu.com
> http://www.fujitsu.com/cn/fnst/
>
> > -----Original Message-----
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Sent: Monday, March 13, 2023 3:50 PM
> > To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>
> > Cc: Richard Purdie <richard.purdie@linuxfoundation.org>;
> > openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH V2 4/5] xcb-proto: Fix install conflict when enable
> > multilib.
> >
> > On Mon, 13 Mar 2023 at 08:29, wangmy <wangmy@fujitsu.com> wrote:
> > > When libxcb is compiled, it will read libdir from xcb-proto.pc to find the library.
> > > If delete this line, libxcb will report an error because it cannot find the
> > directory of the library.
> >
> > Which library in particular? Can you show the error, and the point in libxcb's
> > code where it happens?
> > xcb-proto does not install any libraries, and so there is no reason for
> > xcb-proto.pc to tell where the libraries are.
> >
> > Alex
diff mbox series

Patch

diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
index 4e4472a9c1..0fdca732e8 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.15.2.bb
@@ -28,3 +28,6 @@  DEV_PKG_DEPENDENCY = ""
 RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 BBCLASSEXTEND = "native nativesdk"
+inherit multilib_script
+MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/xcb-proto.pc"
+