Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-14 Thread Vincent Davis Jr
Yes can try now -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#173247): https://lists.openembedded.org/g/openembedded-core/message/173247 Mute This Topic: https://lists.openembedded.org/mt/94995332/21656 Group Owner: openembedded-core+ow...@lists.o

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-14 Thread Alexander Kanavin
I just sent a patch. Can you try it? Alex On Mon, 14 Nov 2022 at 13:17, Alexander Kanavin via lists.openembedded.org wrote: > > Okay, I figured out what is happening here. There are two issues: > > 1. llvm-config is placed into the target sysroot (by mesa recipe), > without adjusting rpath to po

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-14 Thread Alexander Kanavin
Okay, I figured out what is happening here. There are two issues: 1. llvm-config is placed into the target sysroot (by mesa recipe), without adjusting rpath to point to the native sysroot. This may work if native and target are both x86, but will fail if they are not, or if the native and target u

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Vincent Davis Jr
To answer second question. When you don't include EXTRA_OECMAKE:append:class-native = "\ -DLLVM_LIBDIR_SUFFIX=64 \ " meson configure fails with | llvm-config found: YES (/../../../../../../../../tmp/work/amd64-northstar-linux/mesa/2_22.2.2-r0/recipe-sysroot/usr/bin/crossscripts/ll

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Vincent Davis Jr
O I see usr/lib directory does exists for me in recipe-sysroot-native too, but not in recipe-sysroot. Think mesa configure may be utilizing the version of llvm-config in recipe-sysroot and not recipe-sysroot-native. mesa/2_22.2.2-r0/mesa-22.2.2# ldd ../recipe-sysroot-native/usr/bin/llvm-config l

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Alexander Kanavin
To be specific: alex@Zen2:/srv/storage/alex/yocto/build-64-alt$ ldd tmp/work/core2-64-poky-linux/mesa/2_22.2.2-r0/recipe-sysroot-native/usr/bin/llvm-config linux-vdso.so.1 (0x7fffe9964000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f415335d000) libtinfo.so.5 =

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Alexander Kanavin
Wait. When you invoke native llvm-config it must be able to locate *native* libraries that it is linked with. And so rpath must be set to where they are, which is $ORIGIN/../lib. Why does it need to be changed to something defined differently for some target? Then you seem to say that 'llvm-config

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Vincent Davis Jr
Hey, Desired outcome is for mesa meson configure to succeeded by updating RUNPATH on llvm-config native binary required by mesa when gallium-llvm included. When running bitbake -c devshell mesa. Then chrpath -l on llvm-config Should return on TARGET_ARCH x86_64 $ORIGIN/../lib64:$ORIGIN/../../lib6

Re: [OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Alexander Kanavin
I'm not sure I understand the desired outcome properly. Does this patch native llvm-config according to the target libdir, or according to the build host libdir? The first one is not correct (native items must be reusable between targets), the second one is not solving the problem? Alex On Sun, 1

[OE-core] [PATCH] llvm: fix native llvm-config RUNPATH

2022-11-13 Thread Vincent Davis Jr
Problem occurs when native llvm-config binary is required by another recipe. RUNPATH is hardcoded to $ORIGIN/../lib:$ORIGIN/../../lib which depending upon architecture 'lib' directory name may vary (i.e 'lib64'). Commit fixes issue by updating rpath on binary to include architecture dependent dire