Bug 21808 - ruby-tk missing from Cauldron
Summary: ruby-tk missing from Cauldron
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Pascal Terjan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-06 19:28 CEST by Len Lawrence
Modified: 2017-10-08 21:31 CEST (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Len Lawrence 2017-10-06 19:28:46 CEST
Description of problem:
I have just upgraded a system from mga6 to Cauldron and found that all my local ruby gui programs break down bekause the tk module cannot be found.  The usual solution is 'urpmi ruby-tk' but that comes back with 'No package named ruby-tk'.
I cannot find it in Cauldron sources so have no release number to quote.

Version-Release number of selected component (if applicable):
?

How reproducible:
All the time.

Steps to Reproduce:
1. $ irb
2. > require 'tk'
3. LoadError: cannot load such file -- tk
Comment 1 Marja Van Waes 2017-10-06 20:44:39 CEST
in the log of the source package (ruby) I see:

> r1140083 | pterjan | 2017-08-13 18:49:28 +0200 (zo, 13 aug 2017) | 1 line

> tk is gone

and this page http://wiki.tcl.tk/10437 has as title "Tk is obsolete"

I don't know what you should do with your local ruby gui programs, maybe pterjan can tell you, CC'ing him.

If this is likely to affect more users, it'll probably need an entry in the Mageia 7 errata (even if it should really be in the release notes instead of the errata, if obsoleting tk is an upstream decision)

CC: (none) => marja11, pterjan

Comment 2 Pascal Terjan 2017-10-06 20:50:59 CEST
Yes tk support has been removed from Ruby as of 2.4, but we could package the separate gem https://rubygems.org/gems/tk/ if that seems useful
Comment 3 Len Lawrence 2017-10-07 10:14:46 CEST
That would be really useful because my whole life revolves around my personal gui programs.  Have used tk ever since it was invented and my decision to invest in ruby ten years or more ago was heavily influenced by its support for tk.  tk provides things that no other graphics package does, such as an interactive canvas and canvas to postscript support.  It is also very easy to use.

My dependence on tk is such that if I had to rewrite my personal programs I would have to withdraw from QA for many years which at my age means permanently.

So, please do package it as a gem, and remember tkimg.

Thanks.
Comment 4 Josua Dietze 2017-10-07 12:24:28 CEST
Just my two cents regarding the "Tk is obsolete" page.

That Wiki entry is some 17 years old. It was probably meant to provoke at the time, but most of the statements are outdated and incorrect now, given the changes made to Tk in the meantime.

I hope that the original Tk package will not be dropped anytime soon because I have Mageia together with some Tcl/Tk applications that I wrote in productive use at my work place.

CC: (none) => digidietze

Comment 5 Marja Van Waes 2017-10-07 16:27:50 CEST
(In reply to Pascal Terjan from comment #2)
> Yes tk support has been removed from Ruby as of 2.4, but we could package
> the separate gem https://rubygems.org/gems/tk/ if that seems useful

(In reply to Len Lawrence from comment #3)

> 
> My dependence on tk is such that if I had to rewrite my personal programs I
> would have to withdraw from QA for many years which at my age means
> permanently.
> 
> So, please do package it as a gem, and remember tkimg.
> 

QA team can't do without you!

@ Pterjan

Do you have time to fix this?

If you don't then please assign back to BugSquad

Cheers,
Marja

Assignee: bugsquad => pterjan

Comment 6 Len Lawrence 2017-10-07 19:33:10 CEST
@ Marja, re QA etc - nice of you to say so - thanks.

Now that more than one voice has been raised, should this bug request be a feature proposal for Mageia 7 or is too small a matter?  That is small in the sense of involving few users; it might mean a lot of extra work for Pascal.
Comment 7 Pascal Terjan 2017-10-07 23:23:46 CEST
I created the package, it crashes badly when there is no display, but I don't know if this is a new problem

$ ruby -r tk -e ''
/usr/share/gems/gems/tk-0.2.0/lib/tk.rb:32:in `initialize': tcltklib: fail to Tk_Init(). no display name and no $DISPLAY environment variable (RuntimeError)
	from /usr/share/gems/gems/tk-0.2.0/lib/tk.rb:32:in `initialize'
	from /usr/share/gems/gems/tk-0.2.0/lib/tk.rb:1246:in `new'
	from /usr/share/gems/gems/tk-0.2.0/lib/tk.rb:1246:in `block in <module:TkCore>'
Tcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
Comment 8 Len Lawrence 2017-10-08 00:03:05 CEST
$ ruby -r tk -e ''

No output, no crash.

$ sudo gem install tk
Fetching: tk-0.2.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing tk:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby -r ./siteconf20171007-5794-13fzlzw.rb extconf.rb
Configure options for Ruby/Tk may be updated.
So, delete files which depend on old configs.
check functions.checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_safe_level() in ruby.h... yes
checking for rb_hash_lookup() in ruby.h... yes
checking for rb_proc_new() in ruby.h... yes
checking for rb_obj_untrust() in ruby.h... yes
checking for rb_obj_taint() in ruby.h... yes
checking for rb_set_safe_level_force() in ruby.h... yes
checking for rb_sourcefile() in ruby.h... yes
checking for rb_thread_alive_p() in ruby.h... no
checking for rb_thread_check_trap_pending() in ruby.h... yes
checking for ruby_enc_find_basename() in ruby.h... yes
check libraries.checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for dlopen() in -ldl... yes
checking for log() in -lm... yes
Use ActiveTcl libraries (if available).
Search tclConfig.sh and tkConfig.sh.
Fail to find [tclConfig.sh, tkConfig.sh]
Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh).
checking for XOpenDisplay() in -lX11... yes
Search tcl.h
checking for tcl.h... yes
Search tk.h
checking for tk.h... no
Search Tcl library.Search Tk library.....................*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib64
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
	--enable-shared
	--with-tk-old-extconf
	--without-tk-old-extconf
	--with-tk-old-extconf
	--without-tk-old-extconf
	--with-ActiveTcl
	--without-ActiveTcl
	--with-tk-shlib-search-path
	--without-tk-shlib-search-path
	--with-tcltkversion
	--without-tcltkversion
	--with-tcl-build-dir
	--without-tcl-build-dir
	--with-tk-build-dir
	--without-tk-build-dir
	--with-tcl-config
	--without-tcl-config
	--with-tk-config
	--without-tk-config
	--with-tclConfig-dir
	--without-tclConfig-dir
	--with-tkConfig-dir
	--without-tkConfig-dir
	--with-tclConfig-file
	--without-tclConfig-file
	--with-tkConfig-file
	--without-tkConfig-file
	--with-tcllib
	--without-tcllib
	--with-tklib
	--without-tklib
	--with-tcl-dir
	--without-tcl-dir
	--with-tk-dir
	--without-tk-dir
	--with-tcl-include
	--without-tcl-include
	--with-tk-include
	--without-tk-include
	--with-tcl-lib
	--without-tcl-lib
	--with-tk-lib
	--without-tk-lib
	--with-tcltk-framework
	--without-tcltk-framework
	--with-tcl-framework-dir
	--without-tcl-framework-dir
	--with-tk-framework-dir
	--without-tk-framework-dir
	--with-tcl-framework-header
	--without-tcl-framework-header
	--with-tk-framework-header
	--without-tk-framework-header
	--with-X11
	--without-X11
	--with-X11-dir
	--without-X11-dir
	--with-X11-include
	--without-X11-include
	--with-X11-lib
	--without-X11-lib
	--enable-tcltk-stubs
	--disable-tcltk-stubs
	--enable-tcl-h-ver-check
	--disable-tcl-h-ver-check
	--enable-tk-h-ver-check
	--disable-tk-h-ver-check
	--enable-mac-tcltk-framework
	--disable-mac-tcltk-framework
	--enable-tcltk-framework
	--disable-tcltk-framework
	--enable-pthread
	--enable-tcl-thread
	--disable-tcl-thread
	--enable-space-on-tk-libpath
	--disable-space-on-tk-libpath
	--with-nsllib
	--without-nsllib
	--with-socketlib
	--without-socketlib
	--with-dllib
	--without-dllib
	--with-mlib
	--without-mlib
	--with-tcl-build-dir
	--without-tcl-build-dir
	--with-tk-build-dir
	--without-tk-build-dir
	--with-tcltkversion
	--without-tcltkversion
	--with-ActiveTcl
	--without-ActiveTcl
	--enable-space-on-tk-libpath
	--disable-space-on-tk-libpath
	--enable-tcltk-stubs
	--disable-tcltk-stubs
	--with-tcltk-stubs
	--without-tcltk-stubs
	--with-tcl-dir
	--without-tcl-dir
	--with-tcl-include
	--without-tcl-include=${tcl-dir}/include
	--with-tcl-lib
	--without-tcl-lib=${tcl-dir}/lib64
	--with-tk-dir
	--without-tk-dir
	--with-tk-include
	--without-tk-include=${tk-dir}/include
	--with-tk-lib
	--without-tk-lib=${tk-dir}/lib64
	--with-tclConfig-file
	--without-tclConfig-file
	--with-tkConfig-file
	--without-tkConfig-file
	--with-tclConfig-dir
	--without-tclConfig-dir
	--with-tkConfig-dir
	--without-tkConfig-dir
	--with-tcl-framework-header
	--without-tcl-framework-header
	--with-tk-framework-header
	--without-tk-framework-header
	--with-tcl-framework-dir
	--without-tcl-framework-dir
	--with-tk-framework-dir
	--without-tk-framework-dir
	--with-tcltk-framework
	--without-tcltk-framework
	--enable-tcltk-framework
	--disable-tcltk-framework
	--with-tcltk-framework
	--without-tcltk-framework
	--enable-tcltk-framework
	--disable-tcltk-framework
	--enable-mac-tcltk-framework
	--disable-mac-tcltk-framework
	--with-tk-shlib-search-path
	--without-tk-shlib-search-path
	--with-tklib
	--without-tklib
	--with-tcllib
	--without-tcllib
	--with-X11
	--without-X11
	--with-X11-dir
	--without-X11-dir
	--with-X11-include
	--without-X11-include=${X11-dir}/include
	--with-X11-lib
	--without-X11-lib=${X11-dir}/lib64
	--with-X11-lib
	--without-X11-lib
	--with-X11lib
	--without-X11lib
	--enable-tcl-h-ver-check
	--disable-tcl-h-ver-check
	--enable-tk-h-ver-check
	--disable-tk-h-ver-check

Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options.

Can't find proper Tcl/Tk libraries. So, can't make tcltklib.so which is required by Ruby/Tk.
If you have Tcl/Tk libraries on your environment, you may be able to use them with configure options (see ext/tk/README.tcltklib).
At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4.

extconf failed, exit code 1

Gem files will remain installed in /usr/share/gems/gems/tk-0.2.0 for inspection.
Results logged to /usr/lib64/gems/ruby/tk-0.2.0/gem_make.out
[lcl@belexeuli ~]$ locate tcltklib.so
/usr/lib64/ruby/tcltklib.so
Comment 9 Len Lawrence 2017-10-08 00:12:41 CEST
Referring to comment 8:

tk-8.6.5-1.mga6

Fortunately, my local applications are still running on mga6, with ruby-tk.

@Pascal
Next step, to try your gem on Cauldron - tomorrow.
Comment 10 Len Lawrence 2017-10-08 00:39:58 CEST
Installed tk-devel and tried again.
$ sudo gem install tk
Building native extensions.  This could take a while...
Successfully installed tk-0.2.0
Parsing documentation for tk-0.2.0
Installing ri documentation for tk-0.2.0
Done installing documentation for tk after 15 seconds
1 gem installed

Great work Pascal.
Comment 11 Len Lawrence 2017-10-08 08:45:27 CEST
The tk gem installs in Cauldron as well.  With ruby-devel and tk-devel installed there were no problems.  All local ruby/tk utilities are working fine.

Many thanks Pascal.
Comment 12 David Walser 2017-10-08 18:22:14 CEST
So this can be marked as fixed?
Comment 13 Pascal Terjan 2017-10-08 18:34:36 CEST
Sorry for the misunderstanding, I was not expecting you to install the gem, I had actually uploaded a ruby-tk package using it, but if the gem works fine yes this can be close

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 14 Len Lawrence 2017-10-08 21:31:20 CEST
Re comment 13.

No misunderstanding - I went ahead out of curiosity - anxious to see if it worked.

Note You need to log in before you can comment on or make changes to this bug.