in reply to Re^3: Using Tcl::Tk Module with Tcl/Tk 8.5
in thread Using Tcl::Tk Module with Tcl/Tk 8.5

Finally fixed the install of Tcl-0.95 with:

>sudo perl Makefile.PL --tclsh /usr/bin/tclsh8.5 --tclconfig /usr/lib/tcl8.5/tclConfig.sh --include /usr/include/tcl8.5

Following on from this Tcl::Tk also installed without error.

It probably was the include path that needed fixing.

Thanks.

However, now my Perl script fails to execute. The error I receive is:

String found where operator expected at
/usr/local/share/perl/5.10.0/Tcl/Tk.pm line 575, near
"Carp::croak 'Usage: $interp = new Tcl::Tk($display)'"
(Do you need to predeclare Carp::croak?)
syntax error at /usr/local/share/perl/5.10.0/Tcl/Tk.pm
line 575, near "Carp::croak 'Usage: $interp = new
Tcl::Tk($display)'"
BEGIN not safe after errors--compilation aborted at
/usr/local/share/perl/5.10.0/Tcl/Tk.pm line 700.
Compilation failed in require at vidcap.pl line 3.
BEGIN failed--compilation aborted at vidcap.pl line 3.

Adding to this, I've tried to fix it be adding "use Carp;" to Tk.pm results in the following:

Can't locate Carp/croak.pm in @INC (@INC contains:
/etc/perl /usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at vidcap.pl line 5.
BEGIN failed--compilation aborted at vidcap.pl line 5.

Perhaps there's something wrong with my Perl installation. However, removing and then re-installing effects too many dependencies. Any further ideas?

  • Comment on Re^4: Using Tcl::Tk Module with Tcl/Tk 8.5

Replies are listed 'Best First'.
Re^5: Using Tcl::Tk Module with Tcl/Tk 8.5
by bart (Canon) on May 22, 2008 at 19:46 UTC
    You appear to be missing some core modules. Perhaps you just didn't install them?

    Judging from your conversations in the Chatterbox, you appear to have installed Perl on Debian, or rather, it came with Debian:

    Perl 5.10.0 was installed as part of the Debian distribution.

    It looks to me like you have to install the core modules separately.

    I hate smartass Linux distributions.

      Perl-Modules are required by package "perl".

      As I have the perl package installed at distribution install, I also have the perl-modules package installed at the same time.

      I can't really see anything else that I need to install......

      Maybe I'll have to try Perl/GTK+ or wxPerl instead, which is a shame as PerlTK (or specicially native Tk) grid layout method really gels with me. I just can't live with the Motif-esque look of Tcl/Tk 8.4 widgets.

        No matter what you think is installed, the error message clearly indicates that at least some core modules are not installed. So the problem is not with Perl/Tk. You'll have similar problems no matter whichever larger module you'll try to use.

        So, please, focus in this problem first: make sure you have the necessary core modules. After that, you can do whatever you please.