Skip to content
Snippets Groups Projects
Commit 3219428f authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Fix broken (crashing) command line client on Ubuntu Precise

libreadline already goes with libhistory compiled in,
no reason to add it to the dynamically linked library
list.
Apparently, explicitly listing libhistory leads to
the dl loader pre-loading it instead of the compiled-in
version, which, in turn, leads to a crash on the first
history search in the command line client.

The fix is to remove cmake dependency on libhistory
as well as on libncurses, which we don't need either
(always require libtermcap).
parent 23d5f828
No related branches found
No related tags found
No related merge requests found
...@@ -5,26 +5,21 @@ ...@@ -5,26 +5,21 @@
# READLINE_INCLUDE_DIR # READLINE_INCLUDE_DIR
# READLINE_LIBRARIES # READLINE_LIBRARIES
# #
include(FindCurses)
include(FindTermcap) include(FindTermcap)
FIND_LIBRARY(READLINE_HISTORY_LIBRARY NAMES history)
FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline)
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
SET(READLINE_FOUND FALSE) SET(READLINE_FOUND FALSE)
IF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
SET (READLINE_FOUND TRUE) SET (READLINE_FOUND TRUE)
SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
SET (READLINE_LIBRARIES ${READLINE_HISTORY_LIBRARY} ${READLINE_READLINE_LIBRARY}) SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY})
MESSAGE(STATUS "Found GNU readline: ${READLINE_HISTORY_LIBRARY}, ${READLINE_READLINE_LIBRARY}") MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}")
IF (CURSES_FOUND)
SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARY})
ENDIF(CURSES_FOUND)
IF (TERMCAP_FOUND) IF (TERMCAP_FOUND)
SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY})
ENDIF (TERMCAP_FOUND) ENDIF (TERMCAP_FOUND)
ENDIF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
READLINE_FOUND READLINE_FOUND
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment