Bug #9578
closed‘Function’ undeclared in readline.c
Description
When compiling Ruby 2.1.1, I get the following error
make[2]: Entering directory '/tmp/ruby-build.20140228114849.30108/ruby-2.1.1/ext/readline'
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1977:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
Makefile:228: recipe for target 'readline.o' failed
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20140228114849.30108/ruby-2.1.1/ext/readline'
exts.mk:198: recipe for target 'ext/readline/all' failed
make[1]: *** [ext/readline/all] Error 2
Readline version:
/* Hex-encoded Readline version number. */
#define RL_READLINE_VERSION 0x0603 /* Readline 6.3 */
#define RL_VERSION_MAJOR 6
#define RL_VERSION_MINOR 3
...
extern rl_hook_func_t *rl_pre_input_hook;
OS version:
Linux 3.13.5-1-ARCH #1 SMP PREEMPT Sun Feb 23 00:25:24 CET 2014 x86_64 GNU/Linux
I can provide full configure
and make
logs, if required.
Updated by akr (Akira Tanaka) over 10 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r45225.
-
ext/readline/readline.c
(Init_readline
): Userl_hook_func_t
instead
ofFunction
to support readline-6.3. (rl_hook_func_t
is available
since readline-4.2.)
Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578]
Updated by naruse (Yui NARUSE) over 10 years ago
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED
Updated by marcandre (Marc-Andre Lafortune) over 10 years ago
- Status changed from Closed to Open
Now I can't build trunk:
ext/readline/readline.c: In function ‘Init_readline’:
ext/readline/readline.c:1977: error: ‘rl_hook_func_t’ undeclared (first use in this function)
ext/readline/readline.c:1977: error: (Each undeclared identifier is reported only once
ext/readline/readline.c:1977: error: for each function it appears in.)
ext/readline/readline.c:1977: error: expected expression before ‘)’ token
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Open to Closed
Applied in changeset r45240.
extconf.rb
: rl_hook_func_t
for old readline
-
ext/readline/extconf.rb
(rl_hook_func_t
): define asFunction
for
very old readline versions. [ruby-core:61209] [Bug #9578]
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: DONE, 2.1: REQUIRED
r45225 and r45240 were backported to ruby_2_0_0 at r45252.
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Related to Backport #9630: Backport readline-6.3 support. added
Updated by taca (Takahiro Kambe) over 10 years ago
r45240 added these lines to extconf.rb:
unless readline.have_type("rl_hook_func_t") $DEFS << "-Drl_hook_func_t=Function" end
But it should be $defs instead of $DEFS?
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Status changed from Closed to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
- Backport changed from 1.9.3: REQUIRED, 2.0.0: DONE, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
Takahiro Kambe wrote:
But it should be
$defs
instead of$DEFS
?
Exactly. Please commit it.
Updated by taca (Takahiro Kambe) over 10 years ago
Nobuyoshi Nakada wrote:
Takahiro Kambe wrote:
But it should be
$defs
instead of$DEFS
?Exactly. Please commit it.
Who are you asking to commit? (BTW, I am not a committer.)
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Assigned to Closed
Applied in changeset r45488.
readline/extconf.rb
: fix typo
-
ext/readline/extconf.rb
: fix typo,$defs
not$DEFS
.
[ruby-core:61756] [Bug #9578]
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
Takahiro Kambe wrote:
Who are you asking to commit? (BTW, I am not a commiter.)
Really!?
Updated by ngoto (Naohisa Goto) over 10 years ago
- Related to Bug #9702: r45488以降、SolarisStudioで ext/readline がコンパイルエラー(readline 6.2使用) added
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Description updated (diff)
Updated by usa (Usaku NAKAMURA) over 10 years ago
- Related to Backport #9631: Backport readline-6.3 support. added
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE
Updated by usa (Usaku NAKAMURA) over 10 years ago
- Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE to 1.9.3: REQUIRED, 2.0.0: DONE, 2.1: DONE