Dear MacOS users,
I have tried to compile swipl under MacOS (not on my own computer, but on r-hub, the platform is called “macos-highsierra-release-cran”). I get the cmake output and the compilation error below. Does this indicate a problem with “Apple readline” instead of “GNU readline”?
Best wishes,
Matthias
CMAKE
#> -- Found Readline: /usr/local/include
1146#> -- Looking for readline/readline.h
1147#> -- Looking for readline/readline.h - found
1148#> -- Looking for readline/history.h
1149#> -- Looking for readline/history.h - found
1150#> -- Looking for rl_completion_matches
1151#> -- Looking for rl_completion_matches - not found
1152#> -- Looking for rl_insert_close
1153#> -- Looking for rl_insert_close - not found
1154#> -- Looking for rl_set_prompt
1155#> -- Looking for rl_set_prompt - not found
1156#> -- Looking for rl_clear_pending_input
1157#> -- Looking for rl_clear_pending_input - not found
1158#> -- Looking for rl_cleanup_after_signal
1159#> -- Looking for rl_cleanup_after_signal - not found
1160#> -- Looking for rl_filename_completion_function
1161#> -- Looking for rl_filename_completion_function - not found
1162#> -- Looking for rl_readline_state
1163#> -- Looking for rl_readline_state - not found
1164#> -- Looking for rl_done
1165#> -- Looking for rl_done - not found
1166#> -- Looking for rl_event_hook
1167#> -- Looking for rl_event_hook - not found
1168#> -- Configuring done
Later, while compiling:
#> Scanning dependencies of target plugin_readline4pl
#> [100%] Building C object packages/readline/CMakeFiles/plugin_readline4pl.dir/readline4pl.c.o
#> /Users/user4t5BxaDC/Rtemp/RtmpwwY7Md/R.INSTALL912339c51557/rolog/src/swipl-devel/packages/readline/readline4pl.c:576:15: warning: implicit declaration of function 'completion_matches' is invalid in C99 [-Wimplicit-function-declaration]
#> matches = rl_completion_matches((char *)text, /* for pre-4.2 */
#> ^
#> /Users/user4t5BxaDC/Rtemp/RtmpwwY7Md/R.INSTALL912339c51557/rolog/src/swipl-devel/packages/readline/readline4pl.c:106:31: note: expanded from macro 'rl_completion_matches'
#> #define rl_completion_matches completion_matches
#> ^
#> /Users/user4t5BxaDC/Rtemp/RtmpwwY7Md/R.INSTALL912339c51557/rolog/src/swipl-devel/packages/readline/readline4pl.c:576:13: warning: incompatible integer to pointer conversion assigning to 'char **' from 'int' [-Wint-conversion]
#> matches = rl_completion_matches((char *)text, /* for pre-4.2 */
#> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#> /Users/user4t5BxaDC/Rtemp/RtmpwwY7Md/R.INSTALL912339c51557/rolog/src/swipl-devel/packages/readline/readline4pl.c:579:13: warning: incompatible integer to pointer conversion assigning to 'char **' from 'int' [-Wint-conversion]
#> matches = rl_completion_matches((char *)text,
#> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#> 3 warnings generated.
#> [100%] Linking C shared module readline4pl.so
#> Undefined symbols for architecture x86_64:
#> "_tgetent", referenced from:
#> __rl_init_terminal_io in libreadline.a(terminal.o)
#> "_tgetflag", referenced from:
#> __rl_init_terminal_io in libreadline.a(terminal.o)
#> "_tgetnum", referenced from:
#> __rl_get_screen_size in libreadline.a(terminal.o)
#> "_tgetstr", referenced from:
#> __rl_init_terminal_io in libreadline.a(terminal.o)
#> "_tgoto", referenced from:
#> _update_line in libreadline.a(display.o)
#> "_tputs", referenced from:
#> _rl_redisplay in libreadline.a(display.o)
#> _update_line in libreadline.a(display.o)
#> __rl_clear_to_eol in libreadline.a(display.o)
#> __rl_move_vert in libreadline.a(display.o)
#> __rl_move_cursor_relative in libreadline.a(display.o)
#> __rl_clear_screen in libreadline.a(display.o)
#> __rl_update_final in libreadline.a(display.o)
#> ...
#> ld: symbol(s) not found for architecture x86_64
#> clang: error: linker command failed with exit code 1 (use -v to see invocation)
#> make[3]: *** [packages/readline/readline4pl.so] Error 1
#> make[2]: *** [packages/readline/CMakeFiles/plugin_readline4pl.dir/all] Error 2
#> make[1]: *** [all] Error 2
#> make: *** [swipl] Error 2
#> ERROR: compilation failed for package ‘rolog’
#> * removing ‘/Users/user4t5BxaDC/R/rolog’