Tkx not working in Perl 5.16 installation in Mavericks

Posted by pvmikev on 2013-11-30 00:25
Forums: PPM | OS: OS X 10.9 (Mavericks)

pvmikev | Fri, 2013-11-29 14:21
When I try to use Tkx in Perl 5.16 (which came installed with Mavericks), I get the following error:

Can't load '/Library/Perl/5.16/darwin-thread-multi-2level/auto/Tcl/Tcl.bundle' for module Tcl: dlopen(/Library/Perl/5.16/darwin-thread-multi-2level/auto/Tcl/Tcl.bundle, 1): Symbol not found: _Tcl_Init
Referenced from: /Library/Perl/5.16/darwin-thread-multi-2level/auto/Tcl/Tcl.bundle
Expected in: flat namespace
in /Library/Perl/5.16/darwin-thread-multi-2level/auto/Tcl/Tcl.bundle at /System/Library/Perl/5.16/ line 71.
at /Library/Perl/5.16/darwin-thread-multi-2level/ line 408.
Compilation failed in require at /Library/Perl/5.16/ line 215.

Anyone have an idea of what is happening here????

I've had no problems with any other part of the 5.16 installation.


Login to post comments

ActiveState Staff
Mon, 2013-12-09 14:04

which affects anything using a Tk 8.5 basekit. ActiveTcl has been updated for this, but the fix has not yet propagated to Perl.

ActiveState Staff
Thu, 2014-01-09 10:17

there is more to this.

It's generally a bad idea to mix-and-match ActivePerl and Apple Perl. This can happen accidentally when libraries are missing, but inconsistencies and weirdnesses happen which are hard to track down if you don't pick one Perl and stick to it. Apple Perl and ActivePerls are often not binary compatible, even if they are the same Perl version.

If you want to use Tkx with the Apple Perl you should compile your own version of the Tkx module from source. You'll also need to compile your own module, and your own Tkkit to satisfy the dependencies.

If you want to use the Tkx from ActivePerl, make sure you have ActivePerl installed correctly so that it will be on your $PATH ahead of the system Perl. Mavericks users should use release (not issued yet as of this writing) to solve some Mavericks compatibility issues that will not be fixed in older versions.

pvmikev | Sat, 2014-01-11 22:35

When I installed the Mavericks Upgrade 10.9.1, I got a different error from 10.9.0.
Now it said that it just couldn't find the Tcl library. I had the Perl_TCL_DL_Path set to /Library/Tcl where the Tcl Library from Apple got installed. All I did was remove that environment variable and ActivePerl found the Tcl library with no errors and without requiring the admin password. (Tkx would work with the environment DL path set, but would require that I type in the Admin password to work each time).

So what happened when I upgraded to Mavericks 10.9.1? I don't know. But Tkx is up and running smoothly now on ActiveState's Perl 5.16.3. I also have my PERL5LIB path set to where
ActivePerl is located so that I'm not using the Apple installed version of Perl.

Thank you all for your great suggestions. It might be that I'm no longer mixing and matching
ActivePerl and Apple Perl as per grahams' reply to comment.

eddyjpn | Mon, 2014-01-20 21:37

It seems that the safest way to proceed to get Tkx working smoothly with Mavericks is to install the version mentioned above.

Do anybody know when going to be released?