<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - 'bin/opt', needed by 'openmp/libomptarget/deviceRTLs/amdgcn/libomptarget-amdgcn-gfx701.bc', missing and no known rule to make it"
   href="https://bugs.llvm.org/show_bug.cgi?id=51518">51518</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>'bin/opt', needed by 'openmp/libomptarget/deviceRTLs/amdgcn/libomptarget-amdgcn-gfx701.bc', missing and no known rule to make it
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime Library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm@meinersbur.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The OpenMP runtime build with LLVM_ENABLE_RUNTIMES occasionally with the
following message:

$ ninja runtimes
[0/3] cd
/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins
&& /usr/bin/cmake --build .
ninja: error:
'/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/bin/opt',
needed by
'openmp/libomptarget/deviceRTLs/amdgcn/libomptarget-amdgcn-gfx701.bc', missing
and no known rule to make it
FAILED: runtimes/runtimes-stamps/runtimes-build
cd
/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins
&& /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.

Examples buildbot builds where this occurred:

<a href="http://meinersbur.de:8011/#/builders/117/builds/390">http://meinersbur.de:8011/#/builders/117/builds/390</a>
<a href="http://meinersbur.de:8011/#/builders/117/builds/396">http://meinersbur.de:8011/#/builders/117/builds/396</a>

This is likely a missing dependence of the 'runtimes' target on the opt
executable, i.e. the opt executable is not yet built (just the clang
executable) when the nested runtimes build is triggered.
This is supported by that fact that when manually building opt first, it does
work:

$ ninja opt
[1/1] Linking CXX executable bin/opt
$ ninja runtimes
[0/3] cd
/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/runtimes/runtimes-bins
&& /usr/bin/cmake --build .
[3/581] Building CXX object
openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o
...


Note that on the CUDA buildbot AMD's ROCm SDK is not installed, yet cmake
reports it being build:

-- LIBOMPTARGET: Building AMDGPU plugin for dlopened libhsa
-- LIBOMPTARGET: Building AMDGCN device RTL. Using clang:
/home/buildbot-worker/minipc-1050ti-linux/openmp-offload-cuda-runtime/llvm.build/bin/clang</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>