[Lldb-commits] [PATCH] D153844: Summary: [lldb] Fix libncurses, libpanel library link order

Hau Hsu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 27 01:47:18 PDT 2023


hauhsu created this revision.
Herald added a project: All.
hauhsu edited the summary of this revision.
hauhsu added a reviewer: JDevlieghere.
hauhsu added a subscriber: kito-cheng.
Herald added a subscriber: pengfei.
hauhsu published this revision for review.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

libpanel depends on libcurses, so when linking static libraries, libpanel
should be places prior to libcurses.

This patch resolves error like:

  .../x86_64-centos6-linux-gnu/bin/ld:
  .../lib/libpanelw.a(p_show.o):
  in function `show_panel':
  p_show.c:(.text+0x39): undefined reference to `_nc_panelhook_sp'
  .../x86_64-centos6-linux-gnu/bin/ld:
  .../lib/libpanelw.a(p_show.o):
  in function `update_panels_sp':
  p_update.c:(.text+0x1f): undefined reference to `_nc_panelhook_sp'
  collect2: error: ld returned 1 exit status


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153844

Files:
  lldb/source/Core/CMakeLists.txt


Index: lldb/source/Core/CMakeLists.txt
===================================================================
--- lldb/source/Core/CMakeLists.txt
+++ lldb/source/Core/CMakeLists.txt
@@ -10,7 +10,7 @@
 set(LLDB_LIBEDIT_LIBS)
 
 if (LLDB_ENABLE_CURSES)
-  list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES} ${PANEL_LIBRARIES})
+  list(APPEND LLDB_CURSES_LIBS ${PANEL_LIBRARIES} ${CURSES_LIBRARIES})
   if(LLVM_ENABLE_TERMINFO)
     list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIB})
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153844.534871.patch
Type: text/x-patch
Size: 482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230627/ac61a44f/attachment.bin>


More information about the lldb-commits mailing list