Debian Bug report logs - #688798
tmailscanner.c references functions which are removed in ruby1.9

version graph

Package: ruby-tmail; Maintainer for ruby-tmail is Debian Ruby Extras Maintainers <>; Source for ruby-tmail is src:ruby-tmail.

Reported by: Matthias Klose <>

Date: Tue, 25 Sep 2012 17:54:01 UTC

Severity: serious

Found in version ruby-tmail/

Fixed in version ruby-tmail/

Done: Cédric Boutillier <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Debian Ruby Extras Maintainers <>:
Bug#688798; Package ruby-tmail. (Tue, 25 Sep 2012 17:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <>:
New Bug report received and forwarded. Copy sent to Debian Ruby Extras Maintainers <>. (Tue, 25 Sep 2012 17:54:04 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Matthias Klose <>
To: Debian Bug Tracking System <>
Subject: tmailscanner.c references functions which are removed in ruby1.9
Date: Tue, 25 Sep 2012 19:48:09 +0200
Package: ruby-tmail
Severity: serious

from the build log:

compiling tmailscanner.c
tmailscanner.c: In function 'mails_s_new':
tmailscanner.c:105:5: warning: implicit declaration of function 'rb_get_kcode'
tmailscanner.c:105:9: warning: assignment makes pointer from integer without a
cast [enabled by default]
Function `rb_get_kcode' implicitly converted to pointer at tmailscanner.c:105

however rb_get_kcode was removed from ruby1.9. I assume the package doesn't work
at all with 1.9.

$ fgrep -r rb_get_kcode ../ruby1.9.1-
../ruby1.9.1-     * re.c (rb_kcode, rb_get_kcode,
rb_set_kcode): removed.
../ruby1.9.1-     * re.c (rb_get_kcode): can
retrieve $KCODE from C code.
../ruby1.9.1-       * include/ruby/intern.h (rb_set_kcode,
rb_get_kcode): removed

Message sent on to Matthias Klose <>:
Bug#688798. (Sun, 07 Oct 2012 20:51:05 GMT) Full text and rfc822 format available.

Message #8 received at (full text, mbox):

From: Cédric Boutillier <>
Subject: Re: tmailscanner.c references functions which are removed in ruby1.9
Date: Sun, 7 Oct 2012 22:45:57 +0200
[Message part 1 (text/plain, inline)]
Package: ruby-tmail
Followup-For: Bug #688798


It seems to be a known fact [1,2,3] that ruby-tmail is not suited for
the latest versions of Ruby 1.9.


There are three main reasons for that:
- the one you mentioned: the C extension for Ruby 1.9 will not work
  because some functions have been removed from ruby1.9 code.
- String#is_binary_data? method used in lib/tmail/quoting.rb has been
  removed from ruby1.9 code
- encoding issues (at least in test files)

It turns out that the is_binary_data? is not properly defined for
Ruby1.8 either, because it is defined in "yaml/rubytypes", but there is
no require statement on "yaml". Moreover, there is also a pure Ruby
implementation of the scanner in scanner_r.rb which should replace the
native C extension when this one is not present.

Here is a proposition to work around this problem:
- do not build the C extension for Ruby 1.9, by setting
  the variable XS-Ruby-Versions to Ruby1.8 in debian/ that
  the pure Ruby library scanner_r can play its role 
- add the definition of String#is_binary_data? in lib/tmail/quoting.rb,
  so that it is properly defined for Ruby 1.8 and 1.9.1
- indicate in the description that ruby-tmail should work only with
- run the tests at build time, to track possible regressions

With these modifications, all the tests pass with Ruby1.8 (except one,
which wrongly relies on an order for hashes), and "only" 4 errors and 3
failures due to encoding issues (when proper #encoding: utf-8 headers
are put in the test files). Trying to solve these would probably
imply invasive changes in the code.

With the modifications proposed, the package will work properly with
Ruby 1.8 and some functionalities may work with Ruby 1.9.1.

Attached is the debdiff reflecting the changes described above, already
pushed in the team repository.

[ruby-tmail-688798.debdiff (text/plain, attachment)]

Reply sent to Cédric Boutillier <>:
You have taken responsibility. (Sun, 28 Oct 2012 06:51:03 GMT) Full text and rfc822 format available.

Notification sent to Matthias Klose <>:
Bug acknowledged by developer. (Sun, 28 Oct 2012 06:51:04 GMT) Full text and rfc822 format available.

Message #13 received at (full text, mbox):

From: Cédric Boutillier <>
Subject: Bug#688798: fixed in ruby-tmail
Date: Sun, 28 Oct 2012 06:47:38 +0000
Source: ruby-tmail

We believe that the bug you reported is fixed in the latest version of
ruby-tmail, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Cédric Boutillier <> (supplier of updated ruby-tmail package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA256

Format: 1.8
Date: Sat, 27 Oct 2012 00:53:34 +0200
Source: ruby-tmail
Binary: ruby-tmail libtmail-ruby-doc libtmail-ruby1.8
Architecture: source amd64 all
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Extras Maintainers <>
Changed-By: Cédric Boutillier <>
 libtmail-ruby-doc - Transitional package for ruby-tmail
 libtmail-ruby1.8 - Transitional package for ruby-tmail
 ruby-tmail - Mail class library for Ruby
Closes: 688798
 ruby-tmail ( unstable; urgency=medium
   * Team upload
   * Set urgency to medium, as a RC bug is fixed
   * Build only for Ruby 1.8 (Closes: #688798)
     - debian/control: change XS-Ruby-Versions from all to ruby1.8;
            mention in the description it may not work properly with Ruby 1.9.
     - add debian/README.Debian describing the situation
   * Add debian/patches/0002-include_is_binary_data_definition.patch: include
     the definition of isString#_binary_data? method needed in tmail/quoting.rb.
   * Add debian/patches/0003-deactivate_faulty_test.patch: deactivate test
     relying on ordered hashes, which is a wrong asumption with Ruby 1.8.7.
   * Enable test suite to track possible regressions
     - debian/rules: do not ignore test results anymore
     - debian/ruby-test-files.yaml: restore the list of test files
 fe2f09615fbceeb0ee10db131144a1b18d21de24 2237 ruby-tmail_1.2.7.1-3.dsc
 e1ce57d42c42dcbb1e4d0ab1a1e1f74a2f553b8e 5280 ruby-tmail_1.2.7.1-3.debian.tar.gz
 cbb0ff68378687ba78e56424f60fdc1edc01e0f2 65214 ruby-tmail_1.2.7.1-3_amd64.deb
 6fe09e0b44f9f046147b34abe09c30d572b948f2 6312 libtmail-ruby-doc_1.2.7.1-3_all.deb
 2dea0f6f246ca254eae9e03f86c387e5b0b7c453 6314 libtmail-ruby1.8_1.2.7.1-3_all.deb
 f6027715f32285b9536aaba5025fadbbb7907e1df37d4758dc8a6cb17dcfcd17 2237 ruby-tmail_1.2.7.1-3.dsc
 cf84a1d4404222a837e8f5a2ae310d0c5d495f746e08c85b1b21dbede2b5c5dd 5280 ruby-tmail_1.2.7.1-3.debian.tar.gz
 c1cf374b25486f1ee2c487f45668abf8a867302c5f600ebaf4dc422d1a491f14 65214 ruby-tmail_1.2.7.1-3_amd64.deb
 3c6bd1075c75dc60e0bf68668e7cc875f2dd29f8c0efe8e1364bc0be1210fd34 6312 libtmail-ruby-doc_1.2.7.1-3_all.deb
 998516383469ea52309a344d05812f42eff5ee14c8b2017061077e0d69ac9cd3 6314 libtmail-ruby1.8_1.2.7.1-3_all.deb
 7d8233cf6840cc09034c8aeb83353914 2237 ruby optional ruby-tmail_1.2.7.1-3.dsc
 543d42ff84e48379c8900b02bf04e635 5280 ruby optional ruby-tmail_1.2.7.1-3.debian.tar.gz
 f55e6ed6bd24cdf8bb51d9034af51fc1 65214 ruby optional ruby-tmail_1.2.7.1-3_amd64.deb
 5e69a8b4af502d21ffc8dcaa5b7042fe 6312 oldlibs extra libtmail-ruby-doc_1.2.7.1-3_all.deb
 fc7b7c1bba6c3db0efcd9889ac1cac7e 6314 oldlibs extra libtmail-ruby1.8_1.2.7.1-3_all.deb

Version: GnuPG v1.4.12 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Sat, 01 Dec 2012 07:30:35 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Sun Apr 20 16:08:53 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.