<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ggreif@gmail.com" title="Gabor Greif <ggreif@gmail.com>"> <span class="fn">Gabor Greif</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Include guards missing for compression.h"
   href="https://bugs.llvm.org/show_bug.cgi?id=44690">bug 44690</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Include guards missing for compression.h"
   href="https://bugs.llvm.org/show_bug.cgi?id=44690#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Include guards missing for compression.h"
   href="https://bugs.llvm.org/show_bug.cgi?id=44690">bug 44690</a>
              from <span class="vcard"><a class="email" href="mailto:ggreif@gmail.com" title="Gabor Greif <ggreif@gmail.com>"> <span class="fn">Gabor Greif</span></a>
</span></b>
        <pre>(In reply to Jonas Devlieghere from <a href="show_bug.cgi?id=44690#c1">comment #1</a>)
<span class="quote">> This code is in debugserver which is macOS-only. We always have
> libcompresion there. Furthermore it entirely separate from the rest of LLDB
> and doesn't read the header that defines HAVE_LIBCOMPRESSION. 

> I don't think you want to build debugserver for NixOS. It should only be a
> target on Darwin. See tools/CMakeLists.txt:

>  13 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
>  14   add_lldb_tool_subdirectory(darwin-debug)
>  15   if(NOT LLDB_USE_SYSTEM_DEBUGSERVER)
>  16     add_lldb_tool_subdirectory(debugserver)
>  17   endif()
>  18 endif()</span >

Hi Jonas, thanks for your reply!

NixOS and `Nixpkgs` are often confused. The former is a Linux-based OS, the
latter a package collection like fink, macports or homebrew.

Indeed Nixpkgs has a Darwin target, and LLDB is installable on it. I just
looked:

$ ls /nix/store/bypgwpzl5i88ncmr65hnifjlmwp69kj6-lldb-7.1.0/bin/
darwin-debug  lldb  lldb-argdumper  lldb-mi  lldb-server  lldb-test

Unfortunately LLDB 8 (and later) won't compile from source any more. This is
why I am reaching out.

<a href="https://github.com/llvm/llvm-project/blob/release/7.x/lldb/tools/debugserver/source/RNBRemote.cpp">https://github.com/llvm/llvm-project/blob/release/7.x/lldb/tools/debugserver/source/RNBRemote.cpp</a>

still has the guards, they were removed in

<a href="https://github.com/llvm/llvm-project/commit/681f6c2f552fb9b57380f4bfd453e1fc9b6a099e#diff-302e60b129d98a39031cd9f6b2d855c7">https://github.com/llvm/llvm-project/commit/681f6c2f552fb9b57380f4bfd453e1fc9b6a099e#diff-302e60b129d98a39031cd9f6b2d855c7</a>

I see some options going forward:
- Nixpkgs could patch the file, restoring compilability (somehow)
- Nixpkgs could include libcompression (new package) and depend Darwin `lldb`
on it
- LLVM-project could make `lldb-server` compilable again for sandboxed,
no-compression-lib environments
- Nixpkgs could disable the `llvmPackages_{8,9,10}.lldb` sets.


In any case CMAKE configury should detect the absence of libcompression and
error out early if it is a hard compilation requirement.</pre>
        </div>
      </p>


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

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>