Message ID | 20230821023652.47360-1-kai.kang@windriver.com |
---|---|
State | New |
Headers | show |
Series | llvm: remove libLTO.so.* | expand |
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] > -=-=-=-=-=-=-=-=-=-=-=- > >
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] > -=-=-=-=-=-=-=-=-=-=-=- >
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] >> -=-=-=-=-=-=-=-=-=-=-=- >>
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.* \ "