I am trying to install biogrinder on my macOS Monterey, which needs some perl modules.
All necessary modules are installed except Math::Random::MT
When trying to install this module using the following command:
sudo cpan install Math::Random::MT
I get the following error
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Storable loaded ok (v2.62)
Reading '/Users/imac/.cpan/Metadata'
Database was generated on Mon, 17 Oct 2022 13:29:01 GMT
Running install for module 'Math::Random::MT'
CPAN: Digest::SHA loaded ok (v5.96)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for /Users/imac/.cpan/sources/authors/id/F/FA/FANGLY/Math-Random-MT-1.17.tar.gz ok
CPAN: YAML loaded ok (v1.30)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20180414_26)
Configuring F/FA/FANGLY/Math-Random-MT-1.17.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Math::Random::MT
Writing MYMETA.yml and MYMETA.json
FANGLY/Math-Random-MT-1.17.tar.gz
/Users/imac/opt/anaconda3/bin/perl Makefile.PL -- OK
Running make for F/FA/FANGLY/Math-Random-MT-1.17.tar.gz
cp MT.pm blib/lib/Math/Random/MT.pm
Running Mkbootstrap for MT ()
chmod 644 "MT.bs"
"/Users/imac/opt/anaconda3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- MT.bs blib/arch/auto/Math/Random/MT/MT.bs 644
"/Users/imac/opt/anaconda3/bin/perl" "/Users/imac/opt/anaconda3/lib/5.26.2/ExtUtils/xsubpp" -typemap '/Users/imac/opt/anaconda3/lib/5.26.2/ExtUtils/typemap' -typemap '/Users/imac/.cpan/build/Math-Random-MT-1.17-48/typemap' MT.xs > MT.xsc
mv MT.xsc MT.c
x86_64-apple-darwin13.4.0-clang -c -fno-common -DPERL_DARWIN -no-cpp-precomp -mmacosx-version-min=10.9 -fno-strict-aliasing -pipe -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"1.17\" -DXS_VERSION=\"1.17\" -fPIC --sysroot=/Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk "-I/Users/imac/opt/anaconda3/lib/5.26.2/darwin-thread-multi-2level/CORE" MT.c
In file included from MT.xs:2:
/Users/imac/opt/anaconda3/lib/5.26.2/darwin-thread-multi-2level/CORE/perl.h:694:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
^~~~~~~~~~~~~
1 error generated.
make: *** [MT.o] Error 1
FANGLY/Math-Random-MT-1.17.tar.gz
/usr/bin/make -- NOT OK
My perl version is:
perl --version
This is perl 5, version 26, subversion 2 (v5.26.2) built for darwin-thread-multi-2level
Copyright 1987-2018, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
What doesn't look Okay, is that I don't have /usr/include
folder on my machine, instead the types.h file is located in /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/sys/types.h
PS: I already installed Bio:SeqIO
module using the exact same command and it worked.
Any idea on how to get over this issue ?
Many thanks