Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run make error,use of undeclared identifier 'rl_replace_line' #698

Open
lengain opened this issue Aug 28, 2024 · 1 comment
Open

run make error,use of undeclared identifier 'rl_replace_line' #698

lengain opened this issue Aug 28, 2024 · 1 comment

Comments

@lengain
Copy link

lengain commented Aug 28, 2024

MacBook Pro ,Apple M3 Pro,36 GB,
macOS Sonoma 14.6.1 (23G93)
versuion:libqalculate-5.2.0
run ./autogen.sh success,

config.status: creating po/Makefile
config.status: executing po/stamp-it commands
Now type `make' to compile.

then run make, a lot of error

libtool: link: ranlib .libs/libqalculate.a
libtool: link: ( cd ".libs" && rm -f "libqalculate.la" && ln -s "../libqalculate.la" "libqalculate.la" )
Making all in src
g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I..  -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -I.. -I../libqalculate -I/opt/homebrew/Cellar/icu4c/74.2/include   -g -O2 -MT qalc.o -MD -MP -MF .deps/qalc.Tpo -c -o qalc.o qalc.cc
qalc.cc:523:3: error: use of undeclared identifier 'rl_replace_line'
                rl_replace_line("", 0);
                ^
qalc.cc:539:2: error: use of undeclared identifier 'rl_complete_internal'
        rl_complete_internal('!');
        ^
qalc.cc:3731:2: error: use of undeclared identifier 'rl_catch_signals'
        rl_catch_signals = 1;
        ^
qalc.cc:3732:2: error: use of undeclared identifier 'rl_catch_sigwinch'
        rl_catch_sigwinch = rl_readline_version >= 0x0500;
        ^
qalc.cc:3733:21: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
        rl_readline_name = "qalc";
                           ^
qalc.cc:3734:35: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
        rl_basic_word_break_characters = NOT_IN_NAMES NUMBERS;
                                         ^
../libqalculate/includes.h:947:23: note: expanded from macro 'NOT_IN_NAMES'
#define NOT_IN_NAMES    RESERVED OPERATORS SPACES SEXADOT DOT VECTOR_WRAPS PARENTHESISS COMMAS
                        ^
../libqalculate/includes.h:922:19: note: expanded from macro 'RESERVED'
#define RESERVED                "\'@\\{}?\""
                                ^
qalc.cc:3735:33: error: assigning to 'Function *' (aka 'int (*)(const char *, int)') from incompatible type 'char *(const char *, int)': different return type ('int' vs 'char *')
        rl_completion_entry_function = qalc_completion;
                                       ^~~~~~~~~~~~~~~
qalc.cc:3738:3: error: use of undeclared identifier 'rl_bind_keyseq'; did you mean 'rl_bind_key'?
                rl_bind_keyseq("\\C-e", key_exact);
                ^~~~~~~~~~~~~~
                rl_bind_key
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:7: note: 'rl_bind_key' declared here
int              rl_bind_key(int, rl_command_func_t *);
                 ^
qalc.cc:3738:18: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char[5]'
                rl_bind_keyseq("\\C-e", key_exact);
                               ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:22: note: passing argument to parameter here
int              rl_bind_key(int, rl_command_func_t *);
                                ^
qalc.cc:3739:3: error: use of undeclared identifier 'rl_bind_keyseq'; did you mean 'rl_bind_key'?
                rl_bind_keyseq("\\C-f", key_fraction);
                ^~~~~~~~~~~~~~
                rl_bind_key
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:7: note: 'rl_bind_key' declared here
int              rl_bind_key(int, rl_command_func_t *);
                 ^
qalc.cc:3739:18: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char[5]'
                rl_bind_keyseq("\\C-f", key_fraction);
                               ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:22: note: passing argument to parameter here
int              rl_bind_key(int, rl_command_func_t *);
                                ^
qalc.cc:3740:3: error: use of undeclared identifier 'rl_bind_keyseq'; did you mean 'rl_bind_key'?
                rl_bind_keyseq("\\C-a", key_save);
                ^~~~~~~~~~~~~~
                rl_bind_key
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:7: note: 'rl_bind_key' declared here
int              rl_bind_key(int, rl_command_func_t *);
                 ^
qalc.cc:3740:18: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char[5]'
                rl_bind_keyseq("\\C-a", key_save);
                               ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:22: note: passing argument to parameter here
int              rl_bind_key(int, rl_command_func_t *);
                                ^
qalc.cc:3741:3: error: use of undeclared identifier 'rl_bind_keyseq'; did you mean 'rl_bind_key'?
                rl_bind_keyseq("\\C-l", key_clear);
                ^~~~~~~~~~~~~~
                rl_bind_key
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:7: note: 'rl_bind_key' declared here
int              rl_bind_key(int, rl_command_func_t *);
                 ^
qalc.cc:3741:18: error: cannot initialize a parameter of type 'int' with an lvalue of type 'const char[5]'
                rl_bind_keyseq("\\C-l", key_clear);
                               ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:182:22: note: passing argument to parameter here
int              rl_bind_key(int, rl_command_func_t *);
                                ^
qalc.cc:5617:14: error: use of undeclared identifier 'free_history_entry'
                                if(hist) free_history_entry(hist);
                                         ^
qalc.cc:5747:15: error: use of undeclared identifier 'free_history_entry'
                                        if(hist) free_history_entry(hist);
                                                 ^
2 warnings and 15 errors generated.
make[2]: *** [qalc.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
@hanna-kn
Copy link
Contributor

hanna-kn commented Aug 28, 2024

There seem to be some problem with the readline library (are you perhaps trying to compile it agains editline instead of GNU Readline?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants