Skip to content

[lldb] Fix linking to libtinfo #69458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2023
Merged

[lldb] Fix linking to libtinfo #69458

merged 1 commit into from
Oct 18, 2023

Conversation

haampie
Copy link
Contributor

@haampie haampie commented Oct 18, 2023

LLVM detects when ncurses has a separate terminfo library, but linking to it
was broken in lldb since b663395 (LLVM 14) due
to a change of variables. This commit fixes that oversight.

@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2023

@llvm/pr-subscribers-lldb

Author: Harmen Stoppels (haampie)

Changes

TERMINFO_LIB is defined nowhere


Full diff: https://github.com/llvm/llvm-project/pull/69458.diff

1 Files Affected:

  • (modified) lldb/source/Core/CMakeLists.txt (+1-1)
diff --git a/lldb/source/Core/CMakeLists.txt b/lldb/source/Core/CMakeLists.txt
index d7b4f2587a98bf9..9073e3e9b2ee33d 100644
--- a/lldb/source/Core/CMakeLists.txt
+++ b/lldb/source/Core/CMakeLists.txt
@@ -12,7 +12,7 @@ set(LLDB_LIBEDIT_LIBS)
 if (LLDB_ENABLE_CURSES)
   list(APPEND LLDB_CURSES_LIBS ${PANEL_LIBRARIES} ${CURSES_LIBRARIES})
   if(LLVM_ENABLE_TERMINFO)
-    list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIB})
+    list(APPEND LLDB_CURSES_LIBS ${Terminfo_LIBRARIES})
   endif()
   if (LLVM_BUILD_STATIC)
     list(APPEND LLDB_CURSES_LIBS gpm)

@haampie haampie changed the title LLDB: fix linking to libtinfo [lldb] Fix linking to libtinfo Oct 18, 2023
@DavidSpickett
Copy link
Collaborator

I see that b663395 removed the variable, but I never saw this on a buildbot, must be a config we don't cover.

What build configuration hits this issue? Please make a note of that in the commit message for future reference.

@haampie
Copy link
Contributor Author

haampie commented Oct 18, 2023

It's basically the same issue as #25067. Happens when ncurses is configured with --with-termlib, which puts certain symbols that lldb uses in libtinfo. Relevant cmake defines are -DLLDB_ENABLE_CURSES=ON -DLLVM_ENABLE_TERMINFO=ON.

@DavidSpickett
Copy link
Collaborator

Ok now I understand.

So please add what you just wrote to the commit message/ PR description. It will help anyone fighting the same issue later.

@DavidSpickett
Copy link
Collaborator

And thanks for the patch, looks like the issue you linked was fixed, then would have been broken again for a time, and will now be fixed! All's well that ends well.

@haampie
Copy link
Contributor Author

haampie commented Oct 18, 2023

Updated the PR description. That's sufficient?

@eugeneswalker
Copy link

Thank you!

@DavidSpickett
Copy link
Collaborator

If you have the ability to merge, go ahead. Otherwise I can click the button for you.

@haampie
Copy link
Contributor Author

haampie commented Oct 18, 2023

I can't merge, feel free to do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants