Issue #5686 has been updated by Hiroshi SHIBATA.

Status changed from Assigned to Rejected

tk has been extracted https://github.com/ruby/tk from stdlib 

----------------------------------------
Bug #5686: compile error for ext/tk/tcltklib.c: °∆ruby_errinfo°« undeclared
https://bugs.ruby-lang.org/issues/5686#change-60166

* Author: Martin Drst
* Status: Rejected
* Priority: Normal
* Assignee: Hidetoshi Nagai
* ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
When compiling ruby trunk, I get a compile error for ext/tk/tcltklib.c
(see below). When I do

> grep ruby_errinfo * */* */*/* */*/*/*

in the top directory, ruby_errinfo shows up in many ChangeLog messages (1.8.0/1.9.3/YARV) 
that refer to its removal or replacement with rb_errinfo().
There is only one place where ruby_errinfo is used, namely

ext/tk/tcltklib.c:#define rb_errinfo() (ruby_errinfo+0) /* cannot be l-value */

(which seems backwards). The situation for ruby_safe_level is the same.
Also for is_ruby_native_thread.


duerst@jougashima /cygdrive/c/Data/ruby
$ make
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared -s
        CFLAGS = -O3 -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/i386-cygwin -I./include -I.
        DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libruby191.dll.a cygruby191.def -fstack-protector -Wl,--stack,0x00200000,--enable-auto-import
        SOLIBS = cygruby191.res.o -lpthread -lrt -ldl -lcrypt

[... lots of messages from make deleted ...]

make[2]: Entering directory `/cygdrive/c/Data/ruby/ext/tk'
compiling tcltklib.c
tcltklib.c: In function °∆lib_eventloop_core°«:
tcltklib.c:2264:25: error: °∆ruby_errinfo°« undeclared (first use in this function)
tcltklib.c:2264:25: note: each undeclared identifier is reported only once for each function it appears in
tcltklib.c: In function °∆lib_thread_callback°«:
tcltklib.c:2999:26: error: °∆ruby_errinfo°« undeclared (first use in this function)
tcltklib.c: In function °∆lib_do_one_event_core°«:
tcltklib.c:3037:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆tcl_protect_core°«:
tcltklib.c:3219:49: error: °∆ruby_errinfo°« undeclared (first use in this function)
tcltklib.c: In function °∆tcl_protect°«:
tcltklib.c:3370:5: warning: implicit declaration of function °∆is_ruby_native_thread°«
tcltklib.c: In function °∆ip_RubyExitObjCmd°«:
tcltklib.c:3801:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆ip_init°«:
tcltklib.c:6151:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆call_queue_handler°«:
tcltklib.c:7040:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆tk_funcall°«:
tcltklib.c:7192:25: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆ip_eval_real°«:
tcltklib.c:7357:19: error: °∆ruby_errinfo°« undeclared (first use in this function)
tcltklib.c: In function °∆eval_queue_handler°«:
tcltklib.c:7536:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆ip_eval°«:
tcltklib.c:7686:23: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆ip_invoke_core°«:
tcltklib.c:8685:13: error: °∆ruby_errinfo°« undeclared (first use in this function)
tcltklib.c: In function °∆invoke_queue_handler°«:
tcltklib.c:9026:9: error: °∆ruby_safe_level°« undeclared (first use in this function)
tcltklib.c: In function °∆ip_invoke_with_position°«:
tcltklib.c:9171:23: error: °∆ruby_safe_level°« undeclared (first use in this function)
make[2]: *** [tcltklib.o] Error 1
make[2]: Leaving directory `/cygdrive/c/Data/ruby/ext/tk'
make[1]: *** [ext/tk/all] Error 2
make[1]: Leaving directory `/cygdrive/c/Data/ruby'
make: *** [build-ext] Error 2




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>