[Lldb-commits] [clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-07-31 Thread Bernhard Kaindl via lldb-commits

bernhardkaindl wrote:

@JDevlieghere, you wrote:

> No objections in the context of LLDB. We don't use terminfo directly 
> (although I think editline does, but that isn't affected by this) and if we 
> want the TUI we depend on curses anyway.

You truly use `libtinfo` directly in LLDB: 
```py
# git grep define_key
lldb/source/Core/IOHandlerCursesGUI.cpp:define_key("\033[Z", KEY_SHIFT_TAB);
lldb/source/Core/IOHandlerCursesGUI.cpp:define_key("\033\015", 
KEY_ALT_ENTER);
# git grep stdscr
lldb/source/Core/IOHandlerCursesGUI.cpp:  ::touchwin(stdscr);
lldb/source/Core/IOHandlerCursesGUI.cpp:  ::touchwin(stdscr);
lldb/source/Core/IOHandlerCursesGUI.cpp:::keypad(stdscr, TRUE);
lldb/source/Core/IOHandlerCursesGUI.cpp:  m_window_sp = 
std::make_shared("main", stdscr, false);
lldb/source/Core/IOHandlerCursesGUI.cpp:touchwin(stdscr);
lldb/source/Core/IOHandlerCursesGUI.cpp:  touchwin(stdscr);
lldb/source/Core/IOHandlerCursesGUI.cpp:  touchwin(stdscr);
lldb/source/Core/IOHandlerCursesGUI.cpp:  touchwin(stdscr);
```

```py
# nm -D /usr/lib/x86_64-linux-gnu/libtinfo.so |grep stdscr
000318e0 B stdscr@@NCURSES6_TINFO_5.0.19991023

# grep define_key /usr/lib/x86_64-linux-gnu/lib{ncurses,tinfo}.*
grep: /usr/lib/x86_64-linux-gnu/libtinfo.a: binary file matches
grep: /usr/lib/x86_64-linux-gnu/libtinfo.so: binary file matches
grep: /usr/lib/x86_64-linux-gnu/libtinfo.so.5: binary file matches
grep: /usr/lib/x86_64-linux-gnu/libtinfo.so.5.9: binary file matches
grep: /usr/lib/x86_64-linux-gnu/libtinfo.so.6: binary file matches
grep: /usr/lib/x86_64-linux-gnu/libtinfo.so.6.3: binary file matches
```

When not adding `libtinfo` into the link directly on a 
https://github.com/spack/spack build using gcc-11.4.0/binutils-2.42, with 
ncurses-6.5, I'm getting undefined references to those.

https://github.com/llvm/llvm-project/pull/92865
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-07-31 Thread Bernhard Kaindl via lldb-commits

bernhardkaindl wrote:

Thanks @JDevlieghere! Could you add this special case?

The authoritatively established and supported way to link with `ncurses` on 
most Linux platforms would be to use `pkg-config --libs ncurses` to the 
`LDFLAGS` for `ncurses` for the given compile target.

https://github.com/llvm/llvm-project/pull/92865
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-09-25 Thread Bernhard Kaindl via lldb-commits

bernhardkaindl wrote:

@davide-q: The patch linked from this comment avoids this issue 
https://github.com/llvm/llvm-project/issues/101368:
https://github.com/spack/spack/pull/46504#issuecomment-2372520318

https://github.com/llvm/llvm-project/pull/92865
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits