<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 - "make install" uses /usr/lib/ocaml/llvm, not CMAKE_INSTALL_PREFIX"
   href="https://bugs.llvm.org/show_bug.cgi?id=45612">45612</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"make install" uses /usr/lib/ocaml/llvm, not CMAKE_INSTALL_PREFIX
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alexey.salmin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ git clone <a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
$ mkdir build install
$ cd build
$ cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=$(readlink -f $PWD/../install) -G "Unix Makefiles"
../llvm-project/llvm
$ make -j 32
$ make install
. . .
-- Installing: /home/salmin/screen/llvm-build/install/lib/libLLVMXRay.a
-- Installing:
/home/salmin/screen/llvm-build/install/lib/libLLVMWindowsManifest.a
CMake Error at bindings/ocaml/llvm/cmake_install.cmake:49 (file):
  file cannot create directory: /usr/lib/ocaml/llvm.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  bindings/ocaml/cmake_install.cmake:42 (include)
  cmake_install.cmake:71 (include)


Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1

I'm running Linux Ubuntu 18.04.3

Reproducible with both Debug and RelWithDebInfo builds.</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>