Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dependency target "omptarget.devicertl" of target "omptarget.rtl.x86_64.unittests" does not exist #76225

Closed
kwk opened this issue Dec 22, 2023 · 2 comments · Fixed by #76266
Labels
cmake Build system in general and CMake in particular openmp:libomptarget OpenMP offload runtime

Comments

@kwk
Copy link
Contributor

kwk commented Dec 22, 2023

I see this error when building 7c3b67d.

CMake Error at /builddir/build/BUILD/llvm-project-18.0.0.src/openmp/libomptarget/unittests/Plugins/CMakeLists.txt:8 (add_dependencies):
  The dependency target "omptarget.devicertl" of target
  "omptarget.rtl.x86_64.unittests" does not exist.

(See fedora-llvm-team/llvm-snapshots#142 or https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20231222/fedora-38-x86_64/06782394-llvm/builder-live.log.gz)

That means for us the error from #74398 has shifted and while it might be fixed by #76141, we're stuck again.

@kwk kwk added cmake Build system in general and CMake in particular openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Dec 22, 2023
@kwk
Copy link
Contributor Author

kwk commented Dec 22, 2023

A temporary and probably dirty fix to get past this CMake error is this:

--- /openmp/libomptarget/unittests/Plugins/CMakeLists.txt.old	2023-12-22 16:41:39.382052043 +0000
+++ /openmp/libomptarget/unittests/Plugins/CMakeLists.txt	2023-12-22 16:33:17.934052043 +0000
@@ -5,7 +5,9 @@
 foreach(PLUGIN IN LISTS LIBOMPTARGET_TESTED_PLUGINS)
   libomptarget_say("Building plugin unit tests for ${PLUGIN}")
   add_libompt_unittest("${PLUGIN}.unittests" ${PLUGINS_TEST_SOURCES})
-  add_dependencies("${PLUGIN}.unittests" ${PLUGINS_TEST_COMMON} ${PLUGIN})
-  target_link_libraries("${PLUGIN}.unittests" PRIVATE ${PLUGINS_TEST_COMMON} ${PLUGIN})
-  target_include_directories("${PLUGIN}.unittests" PRIVATE ${PLUGINS_TEST_INCLUDE})
+  if(NOT PLUGIN STREQUAL "omptarget.rtl.x86_64")
+    add_dependencies("${PLUGIN}.unittests" ${PLUGINS_TEST_COMMON} ${PLUGIN})
+    target_link_libraries("${PLUGIN}.unittests" PRIVATE ${PLUGINS_TEST_COMMON} ${PLUGIN})
+    target_include_directories("${PLUGIN}.unittests" PRIVATE ${PLUGINS_TEST_INCLUDE})
+  endif()
 endforeach()

EthanLuisMcDonough added a commit that referenced this issue Dec 22, 2023
This was an oversight that seems to be causing problems on certain
builds. This patch should fix #76225.
@kwk
Copy link
Contributor Author

kwk commented Dec 22, 2023

Thank you @EthanLuisMcDonough for the fix in #76266. The link is currently not available but it will be tomorrow with results the Fedora 38 x86_64: https://copr.fedorainfracloud.org/coprs/g/fedora-llvm-team/llvm-snapshots-big-merge-20231223/monitor/ . Only then I can confirm if it works or not.

@EugeneZelenko EugeneZelenko removed the openmp:libomp OpenMP host runtime label Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants