Click here to get back home

Errors when Installing Modules

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Errors when Installing Modules Jack D 06-23-2008
Posted by Jack D on June 23, 2008, 6:09 pm
Please log in for more thread options
I see that I have a errors when installing some Tk modules. All the errors
have to do with not being able to display the GUI during the "make test"
portion of the install.

http://ppm.activestate.com/beta/author/DUNNIGANJ.html

Errors such as the following:

couldn't connect to display ":0" at
/home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.pm
line 55.
MainWindow->new() at test.pl line 26

How would I bypass running the GUI test if there is no display to connect to
so that the install tests show pass instead of fail?

Jack



Posted by sisyphus on June 23, 2008, 7:48 pm
Please log in for more thread options
> I see that I have a errors when installing some Tk modules. All the error=
s
> have to do with not being able to display the GUI during the "make test"
> portion of the install.
>
> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>
> Errors such as the following:
>
> couldn't connect to display ":0" at
> /home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindo=
w.=ADpm
> line 55.
> MainWindow->new() at test.pl line 26
>
> How would I bypass running the GUI test if there is no display to connect=
to
> so that the install tests show pass instead of fail?

Are those errors specific to ActiveState's ppm build process, or are
you also getting them with cpan-testers ? (I'm thinking that if it's
specific to ActiveState, the correct approach might be to get them to
fix their build environment.)

As regards bypassing the tests, is there some eval() you could run (in
the test script) to pre-determine the availability of the display ?

Cheers,
Rob

Posted by Jack D on June 23, 2008, 8:48 pm
Please log in for more thread options
> I see that I have a errors when installing some Tk modules. All the errors
> have to do with not being able to display the GUI during the "make test"
> portion of the install.
>
> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>
> > Errors such as the following:
> >
> > couldn't connect to display ":0" at
> >
/home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.­pm
> > line 55.
> > MainWindow->new() at test.pl line 26
> >
> > How would I bypass running the GUI test if there is no display to
> > connect to
> > so that the install tests show pass instead of fail?

> Are those errors specific to ActiveState's ppm build process, or are
> you also getting them with cpan-testers ? (I'm thinking that if it's
> specific to ActiveState, the correct approach might be to get them to
> fix their build environment.)

> As regards bypassing the tests, is there some eval() you could run (in
> the test script) to pre-determine the availability of the display ?

> Cheers,
> Rob


Hi Rob.

No it is not just an Activestate thing. The errors are also shown on CPAN as
well.

http://cpantesters.perl.org/author/DUNNIGANJ.html

I thought it could be as simple as checking if the existence of
$ENV - However even though it could be set - it doesn't guarantee
that the window will have permission to be displayed (i.e. xhost
permissions).

I'm thinking that I might have to eval the entire Tk script - but I was
hoping for a more elegant solution. Any other thoughts?

Jack



Posted by Marc Girod on June 24, 2008, 4:50 am
Please log in for more thread options

> I thought it could be as simple as checking if the existence of
> $ENV - However even though it could be set - it doesn't guarantee
> that the window will have permission to be displayed (i.e. xhost
> permissions).

And this is quite tricky to check in a portable way...
I am afraid the best one can do is to document it.

On my box (Solaris), this finds where I came from:

$ who am i | perl -ne 'print if s/^.*\((.*)\)$/$1/' | sort -u

but it gets fooled if I jumps two hops (tells only the previous one).
And anyway, nothing guarantees that I can ssh or rsh back to check
xhost.

One could also look for the X display socket?

Marc

Posted by V. Ul. Peculus on June 24, 2008, 10:16 am
Please log in for more thread options
Jack D wrote:
> I see that I have a errors when installing some Tk modules. All the
> errors have to do with not being able to display the GUI during the
> "make test" portion of the install.
>
> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>
> Errors such as the following:
>
> couldn't connect to display ":0" at
> /home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.pm
> line 55.
> MainWindow->new() at test.pl line 26
>
> How would I bypass running the GUI test if there is no display to
> connect to so that the install tests show pass instead of fail?
>
> Jack
>
>

You can set up a virtual framebuffer with Xvfb and use it as the
"display" for your GUI

Similar ThreadsPosted
CPAN Errors Installing Tk Module November 26, 2004, 9:56 pm
Errors installing XML::Parser from CPAN on Solaris 9 September 7, 2005, 10:29 am
installing modules? September 29, 2005, 1:52 pm
Installing modules August 5, 2005, 8:32 pm
Problem with installing modules November 24, 2006, 6:15 pm
Newbie: Installing Modules February 22, 2007, 5:42 am
installing perl modules and ports September 16, 2004, 12:36 pm
Problem installing certain PERL modules October 15, 2004, 4:47 am
Modules not installing to standard LIB directory November 17, 2005, 8:14 am
Installing modules locally as a non root May 23, 2005, 5:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap