[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
mgorny wrote: Yeah, it built this time for me too. Thanks, again! https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
frasercrmck wrote: > Thanks. Unfortunately, I'm still getting a build failure: > > ``` > [1792/1922] cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && > /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv > builtins.link.spirv-mesa3d- > FAILED: spirv-mesa3d-.spv > /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build/spirv-mesa3d-.spv > cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && > /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv > builtins.link.spirv-mesa3d- > No such file or directory > ``` > > It seems to be missing `.bc` suffix, I guess? Looking at the earlier mention, > shouldn't it be `$`? Sorry, it should be properly fixed now - I was rushing things and that just made it worse. I hadn't noticed that the build I was testing hadn't found `llvm-spirv` and so those targets were missing. I've now built it locally successfully. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
mgorny wrote: Thanks. Unfortunately, I'm still getting a build failure: ``` [1792/1922] cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv builtins.link.spirv-mesa3d- FAILED: spirv-mesa3d-.spv /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build/spirv-mesa3d-.spv cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv builtins.link.spirv-mesa3d- No such file or directory ``` It seems to be missing `.bc` suffix, I guess? Looking at the earlier mention, shouldn't it be `$`? https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
frasercrmck wrote: > > > > ``` > > > > set( spv_suffix ${arch_suffix}.spv ) > > > > add_custom_command( OUTPUT "${spv_suffix}" > > > > COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > > > > ${builtins_opt_lib_tgt} > > > > DEPENDS ${builtins_link_lib_tgt} ) > > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I think that ought to be `DEPENDS ${builtins_opt_lib_tgt}`. Do you need > > > > me to send a PR for that? > > > > > > > > > Hmm yes you might be right. Just to confirm, does that fix the problem > > > for you? > > > I can't be sure but it seems like that was a problem before > > > [61efea7](https://github.com/llvm/llvm-project/commit/61efea7142e904e6492e1ce0566ec23d9d221c1e) > > > when I last touched it, as least from a simple reading of the CMake. > > > > > > I think the issue is not coming from the DEPENDS but from the source. > > ``` > > - COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > > ${builtins_opt_lib_tgt} > > + COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > > ${builtins_link_lib_tgt} > > ``` > > Yes, that's it. Should be fixed by f46f6465062b https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
frasercrmck wrote: > > > ``` > > > set( spv_suffix ${arch_suffix}.spv ) > > > add_custom_command( OUTPUT "${spv_suffix}" > > > COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > > > ${builtins_opt_lib_tgt} > > > DEPENDS ${builtins_link_lib_tgt} ) > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I think that ought to be `DEPENDS ${builtins_opt_lib_tgt}`. Do you need > > > me to send a PR for that? > > > > > > Hmm yes you might be right. Just to confirm, does that fix the problem for > > you? > > I can't be sure but it seems like that was a problem before > > [61efea7](https://github.com/llvm/llvm-project/commit/61efea7142e904e6492e1ce0566ec23d9d221c1e) > > when I last touched it, as least from a simple reading of the CMake. > > I think the issue is not coming from the DEPENDS but from the source. > > ``` > - COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" ${builtins_opt_lib_tgt} > + COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > ${builtins_link_lib_tgt} > ``` Yes, that's it. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
rjodinchr wrote: > > ``` > > set( spv_suffix ${arch_suffix}.spv ) > > add_custom_command( OUTPUT "${spv_suffix}" > > COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > > ${builtins_opt_lib_tgt} > > DEPENDS ${builtins_link_lib_tgt} ) > > ``` > > > > > > > > > > > > > > > > > > > > > > > > I think that ought to be `DEPENDS ${builtins_opt_lib_tgt}`. Do you need me > > to send a PR for that? > > Hmm yes you might be right. Just to confirm, does that fix the problem for > you? > > I can't be sure but it seems like that was a problem before > [61efea7](https://github.com/llvm/llvm-project/commit/61efea7142e904e6492e1ce0566ec23d9d221c1e) > when I last touched it, as least from a simple reading of the CMake. I think the issue is not coming from the DEPENDS but from the source. ``` - COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" ${builtins_opt_lib_tgt} + COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" ${builtins_link_lib_tgt} ``` https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
frasercrmck wrote: > ``` > set( spv_suffix ${arch_suffix}.spv ) > add_custom_command( OUTPUT "${spv_suffix}" > COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" > ${builtins_opt_lib_tgt} > DEPENDS ${builtins_link_lib_tgt} ) > ``` > > I think that ought to be `DEPENDS ${builtins_opt_lib_tgt}`. Do you need me to > send a PR for that? Hmm yes you might be right. Just to confirm, does that fix the problem for you? I can't be sure but it seems like that was a problem before 61efea7142e904e6492e1ce0566ec23d9d221c1e when I last touched it, as least from a simple reading of the CMake. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
mgorny wrote: ``` set( spv_suffix ${arch_suffix}.spv ) add_custom_command( OUTPUT "${spv_suffix}" COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}" ${builtins_opt_lib_tgt} DEPENDS ${builtins_link_lib_tgt} ) ``` I think that ought to be `DEPENDS ${builtins_opt_lib_tgt}`. Do you need me to send a PR for that? https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
mgorny wrote: Thanks. This seems to fix that problem. However, now I'm seeing missing dep in build ordering: ``` [1793/1922] cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv builtins.opt.spirv-mesa3d-.bc FAILED: spirv-mesa3d-.spv /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build/spirv-mesa3d-.spv cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && /usr/lib/llvm/17/bin/llvm-spirv --spirv-max-version=1.1 -o spirv-mesa3d-.spv builtins.opt.spirv-mesa3d-.bc No such file or directory [1794/1922] /usr/lib/llvm/17/bin/clang -DCLC_SPIRV64 -D__CLC_INTERNAL -I/usr/lib/llvm/17/include -I/tmp/portage/dev-libs/libclc-19.0.0./work/libclc/generic/include -cl-no-stdinc -target spir64-- -fno-builtin -nostdlib -O0 -finline-hint-functions -I /tmp/portage/dev-libs/libclc-19.0.0./work/libclc/generic/lib/shared -MD -MT CMakeFiles/builtins.link.spirv64-mesa3d-.dir/generic/lib/shared/vload.bc -MF CMakeFiles/builtins.link.spirv64-mesa3d-.dir/generic/lib/shared/vload.bc.d -o CMakeFiles/builtins.link.spirv64-mesa3d-.dir/generic/lib/shared/vload.bc -c /tmp/portage/dev-libs/libclc-19.0.0./work/libclc/generic/lib/shared/vload.cl -emit-llvm [1795/1922] cd /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build && /usr/lib/llvm/17/bin/opt -o builtins.opt.spirv-mesa3d-.bc /tmp/portage/dev-libs/libclc-19.0.0./work/libclc_build/builtins.link.spirv-mesa3d-.bc ``` Note that `builtins.link.spirv-mesa3d-.bc` is generated in step 1795, while it's used in 1793. Not sure if it's related, but I've never seen that one before. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
frasercrmck wrote: > This change broke standalone build against LLVM dylib — it now insists on > linking to non-existing static libraries: > > ``` > FAILED: prepare_builtins > : && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -march=znver2 > --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pipe > -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed > -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-rpath-link, > -Wl,--gc-sections > CMakeFiles/prepare_builtins.dir/utils/prepare-builtins.cpp.o -o > prepare_builtins -Wl,-rpath,"\$ORIGIN/../lib64:/usr/lib/llvm/17/lib64" > -lLLVMBitReader -lLLVMBitWriter -lLLVMCore -lLLVMIRReader > /usr/lib/llvm/17/lib64/libLLVMSupport.a -lrt -ldl -lm /usr/lib64/libz3.so > /usr/lib64/libz.so /usr/lib64/libzstd.so /usr/lib64/libtinfo.so > /usr/lib/llvm/17/lib64/libLLVMDemangle.a && : > /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: > cannot find -lLLVMBitReader: No such file or directory > /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: > cannot find -lLLVMBitWriter: No such file or directory > /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: > cannot find -lLLVMCore: No such file or directory > /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: > cannot find -lLLVMIRReader: No such file or directory > collect2: error: ld returned 1 exit status > ``` > > Given that it apparently doesn't fix in-tree builds fully, please revert and > let's figure out how to do it properly without breaking its primary use case. Ach, sorry about that, thanks for catching that. It's tricky without CI to catch this kind of thing, though that was particularly silly of me. I actually struggled to build LLVM locally with the kind of configuration that only has dynamic libraries available to reproduce. That said, I've pushed 8461d901a770516cf2069fe3bce979a6f8fc8d76 which should just re-instate the old behaviour for out-of-tree builds. If that doesn't fix the issue then I'll revert properly - please let me know, thanks. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libclc] [libclc] Fix a couple of issues preventing in-tree builds (PR #87505)
mgorny wrote: This change broke standalone build against LLVM dylib — it now insists on linking to non-existing static libraries: ``` FAILED: prepare_builtins : && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -march=znver2 --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pipe -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-rpath-link, -Wl,--gc-sections CMakeFiles/prepare_builtins.dir/utils/prepare-builtins.cpp.o -o prepare_builtins -Wl,-rpath,"\$ORIGIN/../lib64:/usr/lib/llvm/17/lib64" -lLLVMBitReader -lLLVMBitWriter -lLLVMCore -lLLVMIRReader /usr/lib/llvm/17/lib64/libLLVMSupport.a -lrt -ldl -lm /usr/lib64/libz3.so /usr/lib64/libz.so /usr/lib64/libzstd.so /usr/lib64/libtinfo.so /usr/lib/llvm/17/lib64/libLLVMDemangle.a && : /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lLLVMBitReader: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lLLVMBitWriter: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lLLVMCore: No such file or directory /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lLLVMIRReader: No such file or directory collect2: error: ld returned 1 exit status ``` Given that it apparently doesn't fix in-tree builds fully, please revert and let's figure out how to do it properly without breaking its primary use case. https://github.com/llvm/llvm-project/pull/87505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits