|Re: [hatari-devel] cmake doesn't detect correctly the readline library on osx.|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: "hatari-devel@xxxxxxxxxxxxxxxxxxx" <hatari-devel@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [hatari-devel] cmake doesn't detect correctly the readline library on osx.
- From: Troed Sångberg <troed@xxxxxxxxxxx>
- Date: Tue, 13 Feb 2018 17:48:49 -0500
- Authentication-results: mail1.protonmail.ch; dkim=none
- Feedback-id: lLIKE5s5wPbGAleCMIidZ9y4DJH8WwUbEWXleyLVKfLYBKSj12NDOlR8Bi3eYDk1jIinaDc2CAJDLk473wDNXw==:Ext:ProtonMail
I'm guessing this problem stems from how homebrew forces that link to its own readline rather than the one in /usr/lib. You can message() the variables from cmake/FindReadline.cmake to see what they end up as:
FIND_PATH(READLINE_INCLUDE_DIR readline.h PATH_SUFFIXES readline)
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
I think it's this difference between check_symbol_exists and check_function_exists that trips up:
"check_function_exists() only verifies linking, it does not verify that the function is declared in system headers."
-------- Original Message --------
On February 13, 2018 11:17 PM, benoît tuduri <benoit.tuduri@xxxxxxxxx> wrote:
> I still have detection problems for readline with cmake, Look my cmake listing :
>  libedit detected like readline => it's ok , readline is
>detected (attachement 01_log.txt)
>  readline 7.0.3
> Note: I forced to link my system to use the readline 7.0.3 :
> $ brew link --force readline
> (attachement 02_log.txt)
> I investigate why cmake is able to detect the right libreadline (
> /Users/user/homebrew/lib/libreadline.dylib ) but not
> rl_filename_completion_function. (attachment 03_log.txt)
> To solve this detection problem, I changed some stuff in
> FindReadme.cmake (attachment
> And the detection works like a charm : (attachment 04_log.txt)
> I hope the patch will not break under linux or windows or newer
> versions of osx or macports.
> Could you give me a feedback ?