All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] llvm: remove libLTO.so.*
@ 2023-08-21  2:36 kai.kang
  2023-08-21  8:35 ` [OE-core] " Alexander Kanavin
  2023-08-21 16:44 ` Khem Raj
  0 siblings, 2 replies; 4+ messages in thread
From: kai.kang @ 2023-08-21  2:36 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Remove libLTO.so.* from llvm which should be provided by clang and
packaged to llvm-linker-tools. It could avoids the error:

ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
       install files into a shared area when those files already exist.
       Those files and their manifest location are:
  /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
    (matched in manifest-core2-64-llvm.create_spdx)
Please verify which recipe should provide the above files.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index f3d6f24bd2..ce9ebfa997 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -106,7 +106,7 @@ do_compile() {
 
 do_install() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
-	DESTDIR=${D} ninja -v install
+        DESTDIR=${D} ninja -v install
 
         # llvm harcodes usr/lib as install path, so this corrects it to actual libdir
         mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
@@ -117,6 +117,10 @@ do_install() {
 
         # reproducibility
         sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
+
+        # remove libLTO.so.* which should be provided by clang and packaged to
+        # llvm-linker-tools
+        rm -f ${D}/${libdir}/libLTO.so.*
     fi
 }
 
@@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
 	ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
 }
 
-PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"
+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks"
 
 RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
 
@@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
     ${libdir}/libLLVM-${MAJOR_VERSION}.so \
 "
 
-FILES:${PN}-liblto += "\
-    ${libdir}/libLTO.so.* \
-"
-
 FILES:${PN}-liboptremarks += "\
     ${libdir}/libRemarks.so.* \
 "
-- 
2.34.1



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

* Re: [OE-core] [PATCH] llvm: remove libLTO.so.*
  2023-08-21  2:36 [PATCH] llvm: remove libLTO.so.* kai.kang
@ 2023-08-21  8:35 ` Alexander Kanavin
  2023-08-21 16:44 ` Khem Raj
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2023-08-21  8:35 UTC (permalink / raw)
  To: Kai Kang; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

But shouldn’t this be backwards? If building llvm results in installing the
item, then it’s other recipes that need to ensure they don’t clash with it.
Patching out llvm after the fact in do_install seems incorrect.

Alex

On Mon 21. Aug 2023 at 4.37, Kai Kang <kai.kang@eng.windriver.com> wrote:

> From: Kai Kang <kai.kang@windriver.com>
>
> Remove libLTO.so.* from llvm which should be provided by clang and
> packaged to llvm-linker-tools. It could avoids the error:
>
> ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
>        install files into a shared area when those files already exist.
>        Those files and their manifest location are:
>   /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
>     (matched in manifest-core2-64-llvm.create_spdx)
> Please verify which recipe should provide the above files.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb
> b/meta/recipes-devtools/llvm/llvm_git.bb
> index f3d6f24bd2..ce9ebfa997 100644
> --- a/meta/recipes-devtools/llvm/llvm_git.bb
> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
> @@ -106,7 +106,7 @@ do_compile() {
>
>  do_install() {
>      if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false',
> d)}; then
> -       DESTDIR=${D} ninja -v install
> +        DESTDIR=${D} ninja -v install
>
>          # llvm harcodes usr/lib as install path, so this corrects it to
> actual libdir
>          mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
> @@ -117,6 +117,10 @@ do_install() {
>
>          # reproducibility
>          sed -i -e 's,${WORKDIR},,g'
> ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
> +
> +        # remove libLTO.so.* which should be provided by clang and
> packaged to
> +        # llvm-linker-tools
> +        rm -f ${D}/${libdir}/libLTO.so.*
>      fi
>  }
>
> @@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
>         ln -sf llvm-config
> ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
>  }
>
> -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm
> ${PN}-liboptremarks ${PN}-liblto"
> +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm
> ${PN}-liboptremarks"
>
>  RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello
> ${PN}-liboptremarks"
>
> @@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
>      ${libdir}/libLLVM-${MAJOR_VERSION}.so \
>  "
>
> -FILES:${PN}-liblto += "\
> -    ${libdir}/libLTO.so.* \
> -"
> -
>  FILES:${PN}-liboptremarks += "\
>      ${libdir}/libRemarks.so.* \
>  "
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186419):
> https://lists.openembedded.org/g/openembedded-core/message/186419
> Mute This Topic: https://lists.openembedded.org/mt/100866486/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 4809 bytes --]

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

* Re: [OE-core] [PATCH] llvm: remove libLTO.so.*
  2023-08-21  2:36 [PATCH] llvm: remove libLTO.so.* kai.kang
  2023-08-21  8:35 ` [OE-core] " Alexander Kanavin
@ 2023-08-21 16:44 ` Khem Raj
  2023-08-23  3:47   ` Kai
  1 sibling, 1 reply; 4+ messages in thread
From: Khem Raj @ 2023-08-21 16:44 UTC (permalink / raw)
  To: Kai Kang, openembedded-core


[-- Attachment #1.1.1: Type: text/plain, Size: 3340 bytes --]

On 8/20/23 7:36 PM, Kai Kang wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Remove libLTO.so.* from llvm which should be provided by clang and
> packaged to llvm-linker-tools. It could avoids the error:
> 
> ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
>         install files into a shared area when those files already exist.
>         Those files and their manifest location are:
>    /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
>      (matched in manifest-core2-64-llvm.create_spdx)
> Please verify which recipe should provide the above files.
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
> index f3d6f24bd2..ce9ebfa997 100644
> --- a/meta/recipes-devtools/llvm/llvm_git.bb
> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
> @@ -106,7 +106,7 @@ do_compile() {
>   
>   do_install() {
>       if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
> -	DESTDIR=${D} ninja -v install
> +        DESTDIR=${D} ninja -v install
>   
>           # llvm harcodes usr/lib as install path, so this corrects it to actual libdir
>           mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
> @@ -117,6 +117,10 @@ do_install() {
>   
>           # reproducibility
>           sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
> +
> +        # remove libLTO.so.* which should be provided by clang and packaged to
> +        # llvm-linker-tools
> +        rm -f ${D}/${libdir}/libLTO.so.*

is that the only problem ? I think there will be more conflicts unless 
we limit the scope of llvm to providing libllvm and whatever mesa needs
at minimal and remove everything else.

clang-native can provide llvm-native and when someone is using 
meta-clang, perhaps folks using meta-clang can use that to provide 
llvm-native see - 
https://github.com/kraj/meta-clang/blob/master/README.md#providing-llvm



>       fi
>   }
>   
> @@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
>   	ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
>   }
>   
> -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"
> +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks"
>   
>   RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
>   
> @@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
>       ${libdir}/libLLVM-${MAJOR_VERSION}.so \
>   "
>   
> -FILES:${PN}-liblto += "\
> -    ${libdir}/libLTO.so.* \
> -"
> -
>   FILES:${PN}-liboptremarks += "\
>       ${libdir}/libRemarks.so.* \
>   "
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186419): https://lists.openembedded.org/g/openembedded-core/message/186419
> Mute This Topic: https://lists.openembedded.org/mt/100866486/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2613 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

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

* Re: [OE-core] [PATCH] llvm: remove libLTO.so.*
  2023-08-21 16:44 ` Khem Raj
@ 2023-08-23  3:47   ` Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kai @ 2023-08-23  3:47 UTC (permalink / raw)
  To: Khem Raj, Kai Kang, openembedded-core

On 8/22/23 00:44, Khem Raj wrote:
> On 8/20/23 7:36 PM, Kai Kang wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Remove libLTO.so.* from llvm which should be provided by clang and
>> packaged to llvm-linker-tools. It could avoids the error:
>>
>> ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
>>         install files into a shared area when those files already exist.
>>         Those files and their manifest location are:
>>    /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
>>      (matched in manifest-core2-64-llvm.create_spdx)
>> Please verify which recipe should provide the above files.
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
>> b/meta/recipes-devtools/llvm/llvm_git.bb
>> index f3d6f24bd2..ce9ebfa997 100644
>> --- a/meta/recipes-devtools/llvm/llvm_git.bb
>> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
>> @@ -106,7 +106,7 @@ do_compile() {
>>     do_install() {
>>       if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 
>> 'false', d)}; then
>> -    DESTDIR=${D} ninja -v install
>> +        DESTDIR=${D} ninja -v install
>>             # llvm harcodes usr/lib as install path, so this corrects 
>> it to actual libdir
>>           mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
>> @@ -117,6 +117,10 @@ do_install() {
>>             # reproducibility
>>           sed -i -e 's,${WORKDIR},,g' 
>> ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
>> +
>> +        # remove libLTO.so.* which should be provided by clang and 
>> packaged to
>> +        # llvm-linker-tools
>> +        rm -f ${D}/${libdir}/libLTO.so.*
>
> is that the only problem ? I think there will be more conflicts unless 
> we limit the scope of llvm to providing libllvm and whatever mesa needs
> at minimal and remove everything else.

It is a little weird but yes, only such error I've met.

Kai

>
> clang-native can provide llvm-native and when someone is using 
> meta-clang, perhaps folks using meta-clang can use that to provide 
> llvm-native see - 
> https://github.com/kraj/meta-clang/blob/master/README.md#providing-llvm
>
>
>
>>       fi
>>   }
>>   @@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
>>       ln -sf llvm-config 
>> ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
>>   }
>>   -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
>> ${PN}-liboptremarks ${PN}-liblto"
>> +PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
>> ${PN}-liboptremarks"
>>     RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello 
>> ${PN}-liboptremarks"
>>   @@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
>>       ${libdir}/libLLVM-${MAJOR_VERSION}.so \
>>   "
>>   -FILES:${PN}-liblto += "\
>> -    ${libdir}/libLTO.so.* \
>> -"
>> -
>>   FILES:${PN}-liboptremarks += "\
>>       ${libdir}/libRemarks.so.* \
>>   "
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#186419): 
>> https://lists.openembedded.org/g/openembedded-core/message/186419
>> Mute This Topic: https://lists.openembedded.org/mt/100866486/1997914
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
>> [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>

-- 
Kai Kang
Wind River Linux



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

end of thread, other threads:[~2023-08-23  3:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21  2:36 [PATCH] llvm: remove libLTO.so.* kai.kang
2023-08-21  8:35 ` [OE-core] " Alexander Kanavin
2023-08-21 16:44 ` Khem Raj
2023-08-23  3:47   ` Kai

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.