llvm: remove libLTO.so.*
PATCH 1/1 llvm: remove libLTO.so.*
From: Kai Kang <[email protected]>
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.
--- meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
meta/recipes-devtools/llvm/llvm_git.bb +6 -6
@@ -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.* \ "
Signature · 1 line
2.34.1
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
Quoted 85 lines · Kai Kang
From: Kai Kang <[email protected]>
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 <[email protected]>--- meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)meta/recipes-devtools/llvm/llvm_git.bb +0
-0@@ -106,7 +106,7 @@ do_compile() { do_install() { if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false',d)}; then
meta/recipes-devtools/llvm/llvm_git.bb +1
-1- DESTDIR=${D} ninja -v install + DESTDIR=${D} ninja -v install # llvm harcodes usr/lib as install path, so this corrects it toactual libdir
mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || truemeta/recipes-devtools/llvm/llvm_git.bb +0
-0@@ -117,6 +117,10 @@ do_install() { # reproducibility sed -i -e 's,${WORKDIR},,g'${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
meta/recipes-devtools/llvm/llvm_git.bb +2
-0+ + # remove libLTO.so.* which should be provided by clang andpackaged to
meta/recipes-devtools/llvm/llvm_git.bb +2
-1+ # 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"meta/recipes-devtools/llvm/llvm_git.bb +0
-5@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 31 lines · Kai Kang
From: Kai Kang <[email protected]>
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 <[email protected]>--- meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)meta/recipes-devtools/llvm/llvm_git.bb +1
-1@@ -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
meta/recipes-devtools/llvm/llvm_git.bb do_install() { · line 123
Quoted 7 lines
meta/recipes-devtools/llvm/llvm_git.bb +4
-0@@ -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
Quoted 34 lines
meta/recipes-devtools/llvm/llvm_git.bb +1
-6fi }@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 32 lines · Khem Raj
Quoted 31 lines · Kai Kang
From: Kai Kang <[email protected]>
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 <[email protected]>---
meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------1 file changed, 6 insertions(+), 6 deletions(-)meta/recipes-devtools/llvm/llvm_git.bb +0
-0@@ -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} || truemeta/recipes-devtools/llvm/llvm_git.bb +0
-0@@ -117,6 +117,10 @@ do_install() { # reproducibilitysed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
Quoted 8 lines
Quoted 5 lines
+
+ # 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
Quoted 35 lines
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
Quoted 30 lines
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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Kai Kang Wind River Linux