The problem you encountered has nothing to do with the threads::shared module: threads::shares just happens to be last module to be built when 'make' is run. In both cases you show, perl dies the first time it is attempting to run (which is when it tried to construct perltoc.pod).
Try going to the
Public Perl Bug Tracker
site to see if there are any bug reports similar to what you
have found. If not, you can use the 'perlbug' script to
file a bug report.