<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - llvm/Support/Solaris.h not found"
   href="https://llvm.org/bugs/show_bug.cgi?id=28370">28370</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm/Support/Solaris.h not found
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Solaris
          </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>ro@gcc.gnu.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16657" name="attach_16657" title="Proposed patch">attachment 16657</a> <a href="attachment.cgi?id=16657&action=edit" title="Proposed patch">[details]</a></span>
Proposed patch

When performing the initial cmake run in an empty directory on
i386-pc-solaris2.12
(had the same problem before on Solaris 2.11), cmake fails with

-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG
-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG - Failed
CMake Error at projects/libcxx/CMakeLists.txt:298 (message):
  C++11 is required but the compiler does not support -std=c++11

In the log, I find

gmake[1]: Entering directory '/var/gcc/llvm/dist/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_4aa0c.dir/src.cxx.o
/usr/gcc/4.9/bin/g++     -fPIC -fvisibility-inlines-hidden -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-Werror=date-time -std=c++11 -include llvm/Support/Solaris.h
-DLIBOMP_HAVE_STD_CPP11_FLAG   -std=c++11 -o
CMakeFiles/cmTC_4aa0c.dir/src.cxx.o -c
/var/gcc/llvm/dist/CMakeFiles/CMakeTmp/src.cxx
cc1plus: fatal error: llvm/Support/Solaris.h: No such file or directory
compilation terminated.

So no wonder there's no path specified for Solaris.h.  It seems this can only
work in an in-source build (if at all).

The fix is easy: just prefix with ${LLVM_MAIN_INCLUDE_DIR}/ as in the attached
patch.

This has allowed the cmake (and subsequent build) to complete.

While I would like to get rid of Solaris.h completely (it causes trouble
without end for an WIP sanitizer port), for the time being it should at least
work.

  Rainer</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>