Thread-Multi or Non-Threaded? Choosing the Right Chilkat Perl Module

On Linux and macOS, Chilkat offers a thread-multi build and a regular (non-threaded) build. The one you download must match how your Perl interpreter was compiled.

Quick answer Run perl -V:useithreads. If it prints useithreads='define';, download the thread-multi build. If it prints useithreads='undef';, download the regular (non-threaded) build.
useithreads='define'
Your Perl is threaded — download the thread-multi Chilkat module.
useithreads='undef'
Your Perl is not threaded — download the regular (non-threaded) Chilkat module.

1. Check the threading setting (quickest)

This prints just the threading flag:

perl -V:useithreads

Output is either useithreads='define'; (threaded → thread-multi) or useithreads='undef'; (non-threaded → regular).


2. Or read the full configuration

Run perl -V and look for useithreads (older Perls may show usethreads):

Summary of my perl5 (revision 5 version 30 subversion 3) configuration:

  Platform:
    osname=darwin
    archname=darwin-thread-multi-2level
    ...
    useithreads=define
    usemultiplicity=define
    ...

Here useithreads=define means the thread-multi build is required. Notice the archname also contains thread-multi.


3. Or check the module paths

Threaded Perl installations use a thread-multi directory in @INC:

perl -e 'print "@INC\n";'

Example:

/usr/lib/perl5/5.34/thread-multi
/usr/lib/perl5/5.34

If thread-multi appears in the paths, your Perl is threaded.


Systems with more than one Perl

  • If several Perls are installed (system Perl, a custom build, etc.), make sure you check the one you'll actually use. Confirm with which perl before running perl -V:useithreads.
  • On macOS, your Perl may come from brew, perlbrew, or the system — each can have different threading settings.
If you choose the wrong one A threading mismatch typically shows up as a load failure such as undefined symbol: PL_stack_base when you try to use Chilkat. If you see that, re-check with perl -V:useithreads and download the matching build.