mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] set install-lib path for host-system-python package installation
@ 2024-06-04  6:30 Lucas Stach
  2024-06-14  7:22 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2024-06-04  6:30 UTC (permalink / raw)
  To: ptxdist

When only the prefix is set, different packages have different ideas
about were the libs should be installed (lib vs lib64) on multilib
systems. This causes issues later on when the package content is
copied into the sysroot, as it may be attempted to copy a directory
over a symlink. Set the lib install path explicitly, so all packages
maintain a consistent view.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 rules/pre/Rules.make | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index f6b1900500b8..651660d78bea 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -254,7 +254,10 @@ CROSS_QMAKE_OPT := \
 
 CROSS_PYTHON_INSTALL := install --prefix=/usr
 HOST_PYTHON_INSTALL := install --prefix=/usr
-HOST_SYSTEM_PYTHON_INSTALL := install --prefix=/usr/lib/system-python3
+HOST_SYSTEM_PYTHON_INSTALL := \
+	install \
+	--prefix=/usr/lib/system-python3 \
+	--install-lib=/usr/lib/system-python3/lib
 
 CROSS_MESON_USR := \
 	--cross-file '${PTXDIST_MESON_CROSS_FILE}' \
-- 
2.39.2




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

* Re: [ptxdist] [PATCH] set install-lib path for host-system-python package installation
  2024-06-04  6:30 [ptxdist] [PATCH] set install-lib path for host-system-python package installation Lucas Stach
@ 2024-06-14  7:22 ` Michael Olbrich
  2024-06-24  5:29   ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2024-06-14  7:22 UTC (permalink / raw)
  To: Lucas Stach; +Cc: ptxdist

On Tue, Jun 04, 2024 at 08:30:22AM +0200, Lucas Stach wrote:
> When only the prefix is set, different packages have different ideas
> about were the libs should be installed (lib vs lib64) on multilib
> systems. This causes issues later on when the package content is
> copied into the sysroot, as it may be attempted to copy a directory
> over a symlink. Set the lib install path explicitly, so all packages
> maintain a consistent view.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  rules/pre/Rules.make | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
> index f6b1900500b8..651660d78bea 100644
> --- a/rules/pre/Rules.make
> +++ b/rules/pre/Rules.make
> @@ -254,7 +254,10 @@ CROSS_QMAKE_OPT := \
>  
>  CROSS_PYTHON_INSTALL := install --prefix=/usr
>  HOST_PYTHON_INSTALL := install --prefix=/usr
> -HOST_SYSTEM_PYTHON_INSTALL := install --prefix=/usr/lib/system-python3
> +HOST_SYSTEM_PYTHON_INSTALL := \
> +	install \
> +	--prefix=/usr/lib/system-python3 \
> +	--install-lib=/usr/lib/system-python3/lib

This breaks other stuff: With this change host-system-python3 packages are
now installend into .../usr/lib/system-python3/lib/ instead of
.../usr/lib/system-python3/lib/lib/python3.xx/site-packages/ and are no
longer found at runtime.

What exactly are you trying to fix?

Michael

>  
>  CROSS_MESON_USR := \
>  	--cross-file '${PTXDIST_MESON_CROSS_FILE}' \
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [ptxdist] [PATCH] set install-lib path for host-system-python package installation
  2024-06-14  7:22 ` Michael Olbrich
@ 2024-06-24  5:29   ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2024-06-24  5:29 UTC (permalink / raw)
  To: Lucas Stach; +Cc: ptxdist

On Fri, Jun 14, 2024 at 09:22:18AM +0200, Michael Olbrich wrote:
> On Tue, Jun 04, 2024 at 08:30:22AM +0200, Lucas Stach wrote:
> > When only the prefix is set, different packages have different ideas
> > about were the libs should be installed (lib vs lib64) on multilib
> > systems. This causes issues later on when the package content is
> > copied into the sysroot, as it may be attempted to copy a directory
> > over a symlink. Set the lib install path explicitly, so all packages
> > maintain a consistent view.
> > 
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  rules/pre/Rules.make | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
> > index f6b1900500b8..651660d78bea 100644
> > --- a/rules/pre/Rules.make
> > +++ b/rules/pre/Rules.make
> > @@ -254,7 +254,10 @@ CROSS_QMAKE_OPT := \
> >  
> >  CROSS_PYTHON_INSTALL := install --prefix=/usr
> >  HOST_PYTHON_INSTALL := install --prefix=/usr
> > -HOST_SYSTEM_PYTHON_INSTALL := install --prefix=/usr/lib/system-python3
> > +HOST_SYSTEM_PYTHON_INSTALL := \
> > +	install \
> > +	--prefix=/usr/lib/system-python3 \
> > +	--install-lib=/usr/lib/system-python3/lib
> 
> This breaks other stuff: With this change host-system-python3 packages are
> now installend into .../usr/lib/system-python3/lib/ instead of
> .../usr/lib/system-python3/lib/lib/python3.xx/site-packages/ and are no
> longer found at runtime.
> 
> What exactly are you trying to fix?

FYI, I solved this differently. .../usr/lib/system-python3/lib64 is now a
symlink to lib so the files should end up in the correct place.

I've learned that trying to set the correct libdir everywhere is hard to
get right and break quite often. Symlinks like this are more robust.

Michael

> >  CROSS_MESON_USR := \
> >  	--cross-file '${PTXDIST_MESON_CROSS_FILE}' \
> > -- 
> > 2.39.2
> > 
> > 
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2024-06-24  5:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-04  6:30 [ptxdist] [PATCH] set install-lib path for host-system-python package installation Lucas Stach
2024-06-14  7:22 ` Michael Olbrich
2024-06-24  5:29   ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox