* [PATCH] mesa: fix runpath with native llvm-config in target sysroot @ 2022-11-09 3:04 maxime.roussinbelanger 2022-11-09 20:48 ` [OE-core] " Alexandre Belloni 0 siblings, 1 reply; 6+ messages in thread From: maxime.roussinbelanger @ 2022-11-09 3:04 UTC (permalink / raw) To: openembedded-core; +Cc: Maxime Roussin-Bélanger From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> llvm-config is copied from native to target sysroot, it shouldn't be allowed to use target shared libraries when it loads. Remove all runpath so it uses shared library from host system since native llvm-config is compiled with hosttools compiler. Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> --- meta/recipes-graphics/mesa/mesa.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 67cfb4f6c1..abc2c3f4c4 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -61,6 +61,7 @@ do_configure:prepend () { if [ -e ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ]; then cp ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ${STAGING_BINDIR} cp ${STAGING_BINDIR_NATIVE}/llvm-config ${STAGING_BINDIR} + chrpath -d ${STAGING_BINDIR}/llvm-config fi } -- 2.36.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] mesa: fix runpath with native llvm-config in target sysroot 2022-11-09 3:04 [PATCH] mesa: fix runpath with native llvm-config in target sysroot maxime.roussinbelanger @ 2022-11-09 20:48 ` Alexandre Belloni 2022-11-09 21:04 ` Maxime Roussin-Bélanger 0 siblings, 1 reply; 6+ messages in thread From: Alexandre Belloni @ 2022-11-09 20:48 UTC (permalink / raw) To: Maxime Roussin-Bélanger; +Cc: openembedded-core Hello, On 08/11/2022 22:04:44-0500, Maxime Roussin-B�langer wrote: > From: Maxime Roussin-B�langer <maxime.roussinbelanger@gmail.com> > > llvm-config is copied from native to target sysroot, it shouldn't be > allowed to use target shared libraries when it loads. > > Remove all runpath so it uses shared library from host system since > native llvm-config is compiled with hosttools compiler. > I believe this is the cause of: https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6139/steps/32/logs/stdio I'm currently checking > Signed-off-by: Maxime Roussin-B�langer <maxime.roussinbelanger@gmail.com> > --- > meta/recipes-graphics/mesa/mesa.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc > index 67cfb4f6c1..abc2c3f4c4 100644 > --- a/meta/recipes-graphics/mesa/mesa.inc > +++ b/meta/recipes-graphics/mesa/mesa.inc > @@ -61,6 +61,7 @@ do_configure:prepend () { > if [ -e ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ]; then > cp ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ${STAGING_BINDIR} > cp ${STAGING_BINDIR_NATIVE}/llvm-config ${STAGING_BINDIR} > + chrpath -d ${STAGING_BINDIR}/llvm-config > fi > } > > -- > 2.36.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#173009): https://lists.openembedded.org/g/openembedded-core/message/173009 > Mute This Topic: https://lists.openembedded.org/mt/94906155/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] mesa: fix runpath with native llvm-config in target sysroot 2022-11-09 20:48 ` [OE-core] " Alexandre Belloni @ 2022-11-09 21:04 ` Maxime Roussin-Bélanger 2022-11-09 21:23 ` Alexandre Belloni 0 siblings, 1 reply; 6+ messages in thread From: Maxime Roussin-Bélanger @ 2022-11-09 21:04 UTC (permalink / raw) To: Alexandre Belloni; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 2249 bytes --] Hi, (sorry for 2nd message Alex, forgot to cc the list) On Wed, Nov 9, 2022 at 3:48 PM Alexandre Belloni < alexandre.belloni@bootlin.com> wrote: > Hello, > > On 08/11/2022 22:04:44-0500, Maxime Roussin-Bélanger wrote: > > From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> > > > > llvm-config is copied from native to target sysroot, it shouldn't be > > allowed to use target shared libraries when it loads. > > > > Remove all runpath so it uses shared library from host system since > > native llvm-config is compiled with hosttools compiler. > > > > I believe this is the cause of: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6139/steps/32/logs/stdio The patch does fix that problem on my end. > > > I'm currently checking > > > Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com > > > > --- > > meta/recipes-graphics/mesa/mesa.inc | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc > b/meta/recipes-graphics/mesa/mesa.inc > > index 67cfb4f6c1..abc2c3f4c4 100644 > > --- a/meta/recipes-graphics/mesa/mesa.inc > > +++ b/meta/recipes-graphics/mesa/mesa.inc > > @@ -61,6 +61,7 @@ do_configure:prepend () { > > if [ -e ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} > ]; then > > cp > ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ${STAGING_BINDIR} > > cp ${STAGING_BINDIR_NATIVE}/llvm-config ${STAGING_BINDIR} > > + chrpath -d ${STAGING_BINDIR}/llvm-config > > fi > > } > > > > -- > > 2.36.0 > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#173009): > https://lists.openembedded.org/g/openembedded-core/message/173009 > > Mute This Topic: https://lists.openembedded.org/mt/94906155/3617179 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alexandre.belloni@bootlin.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > [-- Attachment #2: Type: text/html, Size: 3784 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] mesa: fix runpath with native llvm-config in target sysroot 2022-11-09 21:04 ` Maxime Roussin-Bélanger @ 2022-11-09 21:23 ` Alexandre Belloni 2022-11-09 21:42 ` Maxime Roussin-Bélanger 0 siblings, 1 reply; 6+ messages in thread From: Alexandre Belloni @ 2022-11-09 21:23 UTC (permalink / raw) To: Maxime Roussin-Bélanger; +Cc: openembedded-core On 09/11/2022 16:04:11-0500, Maxime Roussin-B�langer wrote: > Hi, (sorry for 2nd message Alex, forgot to cc the list) > > On Wed, Nov 9, 2022 at 3:48 PM Alexandre Belloni < > alexandre.belloni@bootlin.com> wrote: > > > Hello, > > > > On 08/11/2022 22:04:44-0500, Maxime Roussin-B�langer wrote: > > > From: Maxime Roussin-B�langer <maxime.roussinbelanger@gmail.com> > > > > > > llvm-config is copied from native to target sysroot, it shouldn't be > > > allowed to use target shared libraries when it loads. > > > > > > Remove all runpath so it uses shared library from host system since > > > native llvm-config is compiled with hosttools compiler. > > > > > > > I believe this is the cause of: > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6139/steps/32/logs/stdio > > > The patch does fix that problem on my end. > Well, it doesn't seem to be the cause but it doesn't fix it either... I'm going to run it again using the same worker. > > > > > > > I'm currently checking > > > > > Signed-off-by: Maxime Roussin-B�langer <maxime.roussinbelanger@gmail.com > > > > > > --- > > > meta/recipes-graphics/mesa/mesa.inc | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc > > b/meta/recipes-graphics/mesa/mesa.inc > > > index 67cfb4f6c1..abc2c3f4c4 100644 > > > --- a/meta/recipes-graphics/mesa/mesa.inc > > > +++ b/meta/recipes-graphics/mesa/mesa.inc > > > @@ -61,6 +61,7 @@ do_configure:prepend () { > > > if [ -e ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} > > ]; then > > > cp > > ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} ${STAGING_BINDIR} > > > cp ${STAGING_BINDIR_NATIVE}/llvm-config ${STAGING_BINDIR} > > > + chrpath -d ${STAGING_BINDIR}/llvm-config > > > fi > > > } > > > > > > -- > > > 2.36.0 > > > > > > > > > > > > > > > > > > > > -- > > Alexandre Belloni, co-owner and COO, Bootlin > > Embedded Linux and Kernel engineering > > https://bootlin.com > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#173058): https://lists.openembedded.org/g/openembedded-core/message/173058 > Mute This Topic: https://lists.openembedded.org/mt/94906155/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] mesa: fix runpath with native llvm-config in target sysroot 2022-11-09 21:23 ` Alexandre Belloni @ 2022-11-09 21:42 ` Maxime Roussin-Bélanger 2022-11-10 4:50 ` Vincent Davis Jr 0 siblings, 1 reply; 6+ messages in thread From: Maxime Roussin-Bélanger @ 2022-11-09 21:42 UTC (permalink / raw) To: Alexandre Belloni; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 3363 bytes --] On Wed, Nov 9, 2022 at 4:23 PM Alexandre Belloni < alexandre.belloni@bootlin.com> wrote: > On 09/11/2022 16:04:11-0500, Maxime Roussin-Bélanger wrote: > > Hi, (sorry for 2nd message Alex, forgot to cc the list) > > > > On Wed, Nov 9, 2022 at 3:48 PM Alexandre Belloni < > > alexandre.belloni@bootlin.com> wrote: > > > > > Hello, > > > > > > On 08/11/2022 22:04:44-0500, Maxime Roussin-Bélanger wrote: > > > > From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> > > > > > > > > llvm-config is copied from native to target sysroot, it shouldn't be > > > > allowed to use target shared libraries when it loads. > > > > > > > > Remove all runpath so it uses shared library from host system since > > > > native llvm-config is compiled with hosttools compiler. > > > > > > > > > > I believe this is the cause of: > > > > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6139/steps/32/logs/stdio > > > > > > The patch does fix that problem on my end. > > > > Well, it doesn't seem to be the cause but it doesn't fix it either... > I'm going to run it again using the same worker. > From what I gathered when debugging this, llvm-config was loading shared libraries of the target sysroot because of runpath. When mesa is configuring with gallium it invokes llvm-config which can fail for illegal instructions because of shared libraries of the target sysroot. By removing runpath from the binary it should load libraries from thost where native llvm-config is built from. Max. > > > > > > > > > > > > I'm currently checking > > > > > > > Signed-off-by: Maxime Roussin-Bélanger < > maxime.roussinbelanger@gmail.com > > > > > > > > --- > > > > meta/recipes-graphics/mesa/mesa.inc | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc > > > b/meta/recipes-graphics/mesa/mesa.inc > > > > index 67cfb4f6c1..abc2c3f4c4 100644 > > > > --- a/meta/recipes-graphics/mesa/mesa.inc > > > > +++ b/meta/recipes-graphics/mesa/mesa.inc > > > > @@ -61,6 +61,7 @@ do_configure:prepend () { > > > > if [ -e > ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} > > > ]; then > > > > cp > > > ${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE} > ${STAGING_BINDIR} > > > > cp ${STAGING_BINDIR_NATIVE}/llvm-config > ${STAGING_BINDIR} > > > > + chrpath -d ${STAGING_BINDIR}/llvm-config > > > > fi > > > > } > > > > > > > > -- > > > > 2.36.0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Alexandre Belloni, co-owner and COO, Bootlin > > > Embedded Linux and Kernel engineering > > > https://bootlin.com > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#173058): > https://lists.openembedded.org/g/openembedded-core/message/173058 > > Mute This Topic: https://lists.openembedded.org/mt/94906155/3617179 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alexandre.belloni@bootlin.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > [-- Attachment #2: Type: text/html, Size: 5549 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mesa: fix runpath with native llvm-config in target sysroot 2022-11-09 21:42 ` Maxime Roussin-Bélanger @ 2022-11-10 4:50 ` Vincent Davis Jr 0 siblings, 0 replies; 6+ messages in thread From: Vincent Davis Jr @ 2022-11-10 4:50 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 489 bytes --] Haven't tested, but seems as above might fix the other gallium-llvm mesa issue I ran into when build for an x86_64 MACHINE. # meson configure fails when the llvm-config --shared-mode command fails to find libs in ${STAGING_LIBDIR} # Temp solution copy files from recipe-sysroot/usr/lib64 to recipe-sysroot/usr/lib where llvm-config # command can find libraries. do_configure:prepend() { install -d "${STAGING_LIBDIR}/../lib" cp -ra ${STAGING_LIBDIR}/* ${STAGING_LIBDIR}/../lib } [-- Attachment #2: Type: text/html, Size: 535 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-10 4:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-09 3:04 [PATCH] mesa: fix runpath with native llvm-config in target sysroot maxime.roussinbelanger 2022-11-09 20:48 ` [OE-core] " Alexandre Belloni 2022-11-09 21:04 ` Maxime Roussin-Bélanger 2022-11-09 21:23 ` Alexandre Belloni 2022-11-09 21:42 ` Maxime Roussin-Bélanger 2022-11-10 4:50 ` Vincent Davis Jr
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.