Commit d531f363 authored by Anton Einax's avatar Anton Einax Committed by Jim Harris
Browse files

app/spdk_top: fix ncurses link flags



Fixes #3647

The ncurses library depends on libtinfo.
One some Linux distributions, this dependency cannot be resolved
correctly when just linking agains libncurses.
Both libraries have to be linked against separately in that case, which is
currently not done in app/spdk_top.

Since this problem is distribution-specific, this patch uses `pkg-config`
to automatically determine whether libncurses requires the additional
linker flag for libtinfo or not.

Change-Id: Ib4d234cc432d3f6fdec15e58bfccfb8f840ee935
Signed-off-by: default avatarAnton Einax <butterino@proton.me>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25816


Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Reviewed-by: default avatarChangpeng Liu <changpeliu@tencent.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 7078dddc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ APP = spdk_top
C_SRCS := spdk_top.c

SPDK_LIB_LIST = rpc
LIBS=-lpanel -lmenu -lncurses
LIBS=-lpanel -lmenu $(shell pkg-config --libs ncurses)

include $(SPDK_ROOT_DIR)/mk/spdk.app.mk