[llvm-bugs] [Bug 44690] Include guards missing for compression.h

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 28 01:19:52 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44690

Gabor Greif <ggreif at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Gabor Greif <ggreif at gmail.com> ---
(In reply to Jonas Devlieghere from comment #1)
> 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()

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.

https://github.com/llvm/llvm-project/blob/release/7.x/lldb/tools/debugserver/source/RNBRemote.cpp

still has the guards, they were removed in

https://github.com/llvm/llvm-project/commit/681f6c2f552fb9b57380f4bfd453e1fc9b6a099e#diff-302e60b129d98a39031cd9f6b2d855c7

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200128/a57a7b89/attachment.html>


More information about the llvm-bugs mailing list