tevlin has asked for the wisdom of the Perl Monks concerning the following question:

Hi I have problems getting Tk::Zinc installed on my cygwin perl install +ation. Via cygwin-setup, I have installed: - Perl 5.10.0-5 - perl-Tk 804.028-1 - opengl 1.1.0-10 - libGL-devel, libGL1, libGLU-devel, libGLU1 7.2-2 - libX11-devel, libX11_6 1.1.5-2 - libXext-devel, libXext6 1.0.4-1 - xinit 1.1.1-2 - xorg-server 1.5.3-8 I couldn't find a zinc package, so tried to manually install the win + (msi) package from tkzinc.org. As expected I got "cannot load dll file" nm zinc.dll | grep ' T _' | sed 's/.* T _//' >> zinc.def returns 'No symbols in zinc.dll' So, I downloaded http://www.tkzinc.org/Packages/zinc-tk_3.3.4.tar.gz After some trial and error, finally compiled and linked using -DATC +only (not -DGL) Don't know why - thought I had installed all relevant open GL librar +ies (not opengl32.dll) Then the fun starts: perl demos/zinc-demos I get lots of - "Use of uninitialized value $id in delete at /usr/lib/perl5/vendor +_perl/5.10/i686-cygwin/Tk/After.pm line 87." - "Use of uninitialized value $id in hash element at /usr/lib/perl5/ +vendor_perl/5.10/i686-cygwin/Tk/After.pm line 39." Most examples seem to work, but don't look very good (I assume missi +ng openGL) Then I tried a program which works on (solaris & activeState) But I get: Tk::Error: Can't set -height to `undef' for Tk::Frame=HASH(0x107f3a60 +): bad screen distance "" at /usr/lib/perl5/vendor_perl/5.10/i686-cyg +win/Tk/Configure.pm line 46. at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 294 Tk callback for . Tk callback for .frame Tk callback for .frame.ysbslice Tk callback for .frame.ysbslice.corner (processing "-height" option) Tk callback for .frame.ysbslice.corner Tk::Derived::configure at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin +/Tk/Derived.pm line 306 Tk::Widget::new at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Wid +get.pm line 205 Tk::Frame::AddScrollbars at blib/lib/Tk/Frame.pm (autosplit into blib +/lib/auto/Tk/Frame/AddScrollbars.al) line 242 Tk::Widget::Scrolled at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/T +k/Widget.pm line 1280 Can't set -height to `undef' for Tk::Frame=HASH(0x107f3a60): bad scree +n distance "" at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Confi +gure.pm line 46. at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 294 at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 306 + Firstly, I would like to get Tk::Zinc working with OpenGL Has anyone managed this on cygwin? Any help appreciated. Thanks

Replies are listed 'Best First'.
Re: Tk::Zinc on cygwin
by zentara (Cardinal) on Nov 04, 2009 at 12:48 UTC
    I don't know much about cygwin, but I'm not surprised you encounter a problem.... cygwin is already another layer of hacking complexity, ontop of win32..... apparently the dll you got has no compatible symbols to the win32 system you are using. Zinc has a win32 port on their website, that runs,(but I think they have minimum win32 level.... but I did get it to work on Win98 once ;-)

    In other words...trying to get a fully functional bug-free zinc, by compiling under cygwin....is probably futile. In fact, under cygwin, I believe you would try to install the linux zinc version......what a nightmare that would be...on win32

    The best place to ask this the Zinc maillist.... but don't expect to get help on any Zinc version on win32, except for their approved win32 binary download.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
Re: Tk::Zinc on cygwin
by tevlin (Initiate) on Nov 04, 2009 at 18:58 UTC
    I finally got things work fairly ok:
    
    I edited Makefile.PL with:
       my %DEF_FLAGS = ('GL'        => 0, 
    		    'SHAPE'     => 1,
    		    'GL_DAMAGE' => 1,
    		    'ATC'       => 1
    		     );
    
      ie using GL_DAMAGE instead of GL
    
      Then:
    
      make clean
      perl Makefile.PL
      make
      make install
    
      rebaseall
    
      perl demos/zinc-demos
    
      I still get "Use of uninitialized value" errors
      but this seems to be a "common" Tk issue.
    
      Most of the remaining issues are X-Server related
      eg "GLX not available..." runtime warnings
    
      I still have 1 annoying issue:
      The following works:
        my $zinc = $mw->Zinc(-width => 500, 
                             -height => 500)->pack();
    
      The following doesn't work:
        my $zinc = $mw->Scrolled("Zinc",
                                 -width => 500,
                                 -height => 500,
                                 -scrollbars => 'oe')->pack();
    
      I get:
    
    GLX not available (need at least a 24 bits buffer with stencil)
    Use of uninitialized value $id in delete at
            /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/After.pm line 87 (#1)
    Tk::Error: Can't set -height to `undef' for Tk::Frame=HASH(0x1ed4da8): bad screen distance "" at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Configure.pm line 46.
     at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 294
     Tk callback for .
     Tk callback for .frame
     Tk callback for .frame.ysbslice
     Tk callback for .frame.ysbslice.corner
     (processing "-height" option)
     Tk callback for .frame.ysbslice.corner
     Tk::Derived::configure at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 306
     Tk::Widget::new at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Widget.pm line 205
     Tk::Frame::AddScrollbars at blib/lib/Tk/Frame.pm (autosplit into blib/lib/auto/Tk/Frame/AddScrollbars.al) line 242
     Tk::Widget::Scrolled at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Widget.pm line 1280
    Can't set -height to `undef' for Tk::Frame=HASH(0x1ed4da8): bad screen distance "" at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Configure.pm line 46.
     at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 294
    
     at /usr/lib/perl5/vendor_perl/5.10/i686-cygwin/Tk/Derived.pm line 306
    
    Seems to be a problem with Tk + Scrolled + Zinc
    Other scrolled items (HList, Tree) work fine.
    
    Greetings!