This is an archive of the discontinued LLVM Phabricator instance.

Summary: [lldb] Fix libncurses, libpanel library link order
ClosedPublic

Authored by hauhsu on Jun 27 2023, 1:40 AM.

Details

Summary

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

Diff Detail

Event Timeline

hauhsu created this revision.Jun 27 2023, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 1:40 AM
hauhsu edited the summary of this revision. (Show Details)Jun 27 2023, 1:47 AM
hauhsu added a reviewer: JDevlieghere.
hauhsu added a subscriber: kito-cheng.
hauhsu published this revision for review.Jun 27 2023, 1:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2023, 1:47 AM
JDevlieghere accepted this revision.Jun 27 2023, 11:28 AM

Makes sense. This isn't a problem on macOS because both are in the shared cache. LGTM.

This revision is now accepted and ready to land.Jun 27 2023, 11:28 AM