cpanm No 'C' compiler found to build module

0

I was installing a variety of modules using cpanm when I hit the following error while trying to install threads:

/home/isg4/.cpanm/work/1556545965.28549/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.026002 built for x86_64-linux-thread-multi
Work directory is /home/isg4/.cpanm/work/1556545965.28549
You have make /usr/bin/make
You have LWP 6.36
You have /usr/bin/tar: tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching threads () on cpanmetadb ...
--> Working on threads
Fetching http://www.cpan.org/authors/id/J/JD/JDHEDDEN/threads-2.21.tar.gz
-> OK
Unpacking threads-2.21.tar.gz
Entering threads-2.21
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Configuring threads-2.21
Running Makefile.PL
OS unsupported:  ERROR: No 'C' compiler found to build 'threads'
-> N/A
-> FAIL Configure failed for threads-2.21. See /home/isg4/.cpanm/work/1556545965.28549/build.log for details.
Expiring 15 work directories.

I've been all over the Stack sites and most similar problems seem to stem from users not having Development Tools, and a simple installation fixes their problems. However, I can install other module (e.g. Logger::Simple), so it appears that this issue is (somewhat) module specific. This post partially addresses that this appears to be a miscommunication about which compiler is being used or where the compiler is located. Checking the compiler and some other locations/build info, I do find that the compiler appears to be trying to use a temporary build path.

(funannotate) [isg4@farnam1 ~]$ perl -V:cc
cc='/tmp/build/80754af9/perl_1527832170752/_build_env/bin/x86_64-conda_cos6-linux-gnu-gcc';
(funannotate) [isg4@c16n01 ~]$ head $(perl -V:cc)
head: cannot open ‘cc='/tmp/build/80754af9/perl_1527832170752/_build_env/bin/x86_64-conda_cos6-linux-gnu-gcc';’ for reading: No such file or directory
(funannotate) [isg4@c16n01 ~]$ which perl cpan cpanm x86_64-conda_cos6-linux-gnu-gcc
~/.ycrc/envs/funannotate/bin/perl
~/.ycrc/envs/funannotate/bin/cpan
~/.ycrc/envs/funannotate/bin/cpanm
~/.ycrc/envs/funannotate/bin/x86_64-conda_cos6-linux-gnu-gcc
(funannotate) [isg4@c16n01 envs]$ conda list | grep "^perl \|cpan\|gcc"
gcc_impl_linux-64         7.3.0                habb00fd_1
gcc_linux-64              7.3.0                h553295d_7
libgcc                    7.2.0                h69d50b8_2
libgcc-ng                 8.2.0                hdf63c60_1
perl                      5.26.2               h14c3975_0
perl-app-cpanminus        1.7044                  pl526_1    bioconda
perl-cpan-meta            2.150010                pl526_0    bioconda
perl-cpan-meta-requirements 2.140                   pl526_0    bioconda
perl-cpan-meta-yaml       0.018                   pl526_0    bioconda

I have tried tearing down and rebuilding the conda environment from scratch and reinstalling all of these modules thinking that one or more of them may have been originally installed with a different compiler, but this did not fix the problem.

Where do I go from here in terms of resolving/debugging this issue? What can I do to prevent this sort of problem in the future?

Ian Gilman

Posted 2019-04-30T14:22:20.303

Reputation: 1

No answers