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

OK, thank you. Foolish mistake on my behalf due to not reading carefully enough.

This does bring me to the next issue though. Installing Tcl-0.95 results in:

> perl Makefile.PL
> tclsh=/usr/bin/tclsh
tcl_library=/usr/share/tcltk/tcl8.5
tcl_version=8.5
LIBS = -ltcl8.5
Use of uninitialized value in concatenation (.) or string at Makefile.PL line 204.
INC =
DEFINE =
Use of uninitialized value in string at Makefile.PL line 220.
Checking if your kit is complete...
Looks good
Writing Makefile for Tcl

Make then subsequently fails with:

> make
> cp Tcl.pm blib/lib/Tcl.pm
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp
-typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap
typemap Tcl.xs > Tcl.xsc && mv Tcl.xsc Tcl.c
Please specify prototyping behavior for Tcl.xs (see perlxs manual)
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local
/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"0.95\" -DXS_VERSION=\"0.95\" -fPIC
"-I/usr
/lib/perl/5.8/CORE" Tcl.c
Tcl.xs:33:17: error: tcl.h: No such file or directory
Tcl.xs:127: error: expected ‘)’ before ‘*’ token
*snip* Lots more similar errors
make: *** Tcl.o Error 1

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

Replies are listed 'Best First'.
Re^3: Using Tcl::Tk Module with Tcl/Tk 8.5
by Anonymous Monk on May 20, 2008 at 14:38 UTC
    fix incpath
      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?

        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.