Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14001 - glitter : can't run gary
Summary: glitter : can't run gary
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Robert Coie (RETIRED)
URL:
Whiteboard:
Keywords:
: 15020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-15 20:00 UTC by Pascal Roussel
Modified: 2003-07-02 03:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Roussel 2003-01-15 20:00:23 UTC
When I click the 'download' button I get:

Error generated while attempting to run gary:
IO::Handle::setvbuf not implemented on this architecture at /usr/bin/gary line 142.

I'm using perl 5.8.0
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-01-17 09:20:36 UTC
try remerging glitter/gary
Comment 2 Pascal Roussel 2003-01-17 10:50:59 UTC
remerging glitter doesn't change anything.

In fact that seems to be a perl problem, as I can get the same error
with just:

bash-2.05b$ perl -MIO::Handle -e "STDOUT->setvbuf(undef, _IONBF, 0)"
IO::Handle::setvbuf not implemented on this architecture at -e line 1.

setvbuf() is available and was correctly detected by perl's configure script.
(I just remerged perl)

Comment 3 jig 2003-01-24 13:59:43 UTC
emerge perl 5.6.1. 
That fixes the problem :/ 
Comment 4 Pascal Roussel 2003-01-24 19:36:07 UTC
Well, yes it works with perl 5.6, but I wouldn't call that a fix.
You will have to upgrade your perl sooner or later.

It doesn't work with 5.8 because the new perl IO abstraction layer
doesn't provide setvbuf(), even if you define PERLIO=stdio.

In fact you can get it to work by just removing the offending line
in /usr/bin/gary (line 142).
Comment 5 Pascal Roussel 2003-01-24 20:28:30 UTC
It seems that gary only use setvbuf() to turn off stdout buffering when
called from glitter.

The same effect can be archieved by setting $| = 1.

So line 142 becomes:
$| = 1 if $opt_g;

This solves the problem for me, and it works with perl 5.8.
(I don't know if it has a real effect, but it should)
Comment 6 Jon Portnoy (RETIRED) gentoo-dev 2003-05-09 14:33:43 UTC
*** Bug 15020 has been marked as a duplicate of this bug. ***
Comment 7 Graham Forest 2003-05-09 18:34:23 UTC
Let me get this straight. This is a rather dormant bug in Perl being triggered by glitter? Is the proposed "fix" proper? Will it effect anyone anywhere else, especially people that it already works for? Does upstream need to be notified (Perl and or glitter)? Does it happen to all or at least a few users?

Thanks 
Comment 8 Guy 2003-05-09 23:48:18 UTC
I see bug # 15020 was a duplicate of this bug.

I emerged glitter on freshly built system tonight. It still doesn't work in either case.

IE - if I don't change line 142 in gary, I get the originally indicated error

If I modify gary thusly:

# switch off buffering if in 'glitter' mode
# STDOUT->setvbuf($nothing_here, _IONBF, 0) if ($opt_g);
$| = 1 if $opt_g

# Make sure we clean up when we catch an unexpected signal
foreach (@sigs) {
  $SIG{$_} = 'handler';
}

then I get message:

Error generated while attempting to run gary:
syntax error at /usr/bun/gary line 146, near "$opt_g

I'm assuming that I haven't updated gary correctly to get this to work. If someone will show me how, I'll be happy to try it.

fierywyrme / # emerge info
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20 i686 AMD Athlon(TM) XP 1900+
GENTOO_MIRRORS=" ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://212.219.56.152/sites/www.ibiblio.org/gentoo/ http://212.219.56.146/sites/www.ibiblio.org/gentoo/ http://212.219.56.131/sites/www.ibiblio.org/gentoo/ ftp://gentoo.linux.no/pub/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg gnome libg++ mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline arts tetex svga java guile X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt kde motif opengl mozilla cdr"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"

fierywyrme / #
Comment 9 Pascal Roussel 2003-05-11 18:08:33 UTC
You forgot the ";" at the end of the line.

I think this should work on any perl, 5.6 and 5.8

IO::Handle::setbuf is missing in perl 5.8, this is a well-known problem, but I don't know if this is considered as a bug by perl's developers.
(according to perl's documentation it should be available. There is a setvbuf function in the POSIX module but it just tell "use IO::Handle::setvbuf instead")

I'm not sure this application is still being maintained, the download page was last updated one year ago.
Comment 10 Guy 2003-05-11 20:24:21 UTC
Pascal, thank you very much for your response. Glitter now works. 
 
At this point, after getting glitter to finally do _something_, I'm of the opinion that the 
ebuild be 'fixed' as indicated. 
 
However, the package is limited in it's usefulness. 
 
1) If you click on 'help', the program attempts to google for a copy of the help manual. 
Google has probably changed is URL setup. Regardless, googling for the help manual 
does not work. 
 
2) There doesn't appear to be any direct support for yenc. This is where having the 
help manual _might_ prove useful in terms of using glitter's 'hook program' 
functionality. Maybe. 
 
3) The package is _very_ primitive.  
 
If it were me, I'd probably fix the ebuild as indicated and close the bug and just not 
worry about it. 
 
I'll probably use it in a limited fashion, but ... 
Comment 11 Robert Coie (RETIRED) gentoo-dev 2003-06-01 17:23:44 UTC
Patch added to 1.0-r1.  Thanks to all who participated.
Comment 12 Daniel Gutierrez 2003-07-01 20:25:09 UTC
Could someone confirm that the files generated by the new code aren't corrupt?  Everything looks like its running fine but testing a number of files (images) from a variety of posters, all are corrupt.  Is there something more the original code did for the buffering?
Comment 13 Guy 2003-07-02 03:12:03 UTC
Works for me. 
 
There are a small percent of corrupt files. (less than 2%) Of those corrupt image files 
which display something, I can see that they are incomplete. Based on my 
experiences with a number of newsgroup servers, your problem probably lies in 
two areas. 
 
1. Glitter has no native support for yenc. If the images you're downloading are in 
yenc format, you may end up with no results or corrupted results. In theory, one 
can take the GPLed yenc code and make a CLI program for glitter to use as a 
plugin. I don't have the knowledge set to do so. 
 
2. If I understood the changes in the -r1 release correctly, there are no actual 
changes to Glitter. Instead, the ebuild was changed to fix the main script. Who's 
newsgroup services are you using? Many ISP newsgroup services are poor at best. 
It's not uncommon for such ISP based services to 'lose' parts of a multipart post. 
 
While I use glitter, glitter is extremely primitive and basic. If you're running a 
machine with 'Doze, you might want to try 'bnr2'. If you google it, you'll find it. I 
haven't tried bnr2 under wine yet though it is on my list of things to try. 
 
Good luck!