Do not delete posts, specially after they got useful suggestions. The purpose of this forum is two-fold: help people with their problems by directly answering to their questions, and be a repository is questions and answers. Deleting a post defeats the second purpose.
Hello, Cannot find the answer anywhere online. Trying to compile a Perl Module, Math-CDF, for an CLIP (RNA-protein crosslink analysis) and I am getting an error when I run the make commands.
Within the folder I have to run:
$perl Makefile.PL
$make
$make test
$make install
running $perl Makefile.PL runs fine but $make hits the following error:
Skip blib/lib/Math/CDF.pm (unchanged)
cd cdflib && /usr/bin/make LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-O3" PREFIX="/usr/local/ActivePerl-5.24/site" PASTHRU_DEFINE=' ' PASTHRU_INC=' '
make[1]: Nothing to be done for `all'.
Running Mkbootstrap for CDF ()
chmod 644 "CDF.bs"
"/usr/local/ActivePerl-5.24/bin/perl-dynamic" -MExtUtils::Command::MM -e 'cp_nonempty' -- CDF.bs blib/arch/auto/Math/CDF/CDF.bs 644
/usr/bin/gcc -c -fno-common -DPERL_DARWIN -no-cpp-precomp -mmacosx-version-min=10.9 -arch x86_64 -DUSE_SITECUSTOMIZE -DPERL_RELOCATABLE_INCPUSH -fno-strict-aliasing -pipe -fstack-protector -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"0.1\" -DXS_VERSION=\"0.1\" "-I/usr/local/ActivePerl-5.24/lib/CORE" CDF.c
gcc: error: unrecognized command line option '-no-cpp-precomp'
make: *** [CDF.o] Error 1
Any ideas? I've tried removing the -no-cpp-precomp flag but still doesn't run. P.S I am running a Mac O.S Yosemite Version 10.10.5 and I working with Perl modules for the first time. I have make and gcc under: /usr/bin/gcc /usr/bin/make Thanks.
1 answer
Can't seem to delete the post, but thanks everyone for your help. The solution here was just to delete the -'-no-cpp-precomp' flag from the makefile and re run. It is running smoothly now, I am using it for this bioinformatics protocol: https://zhanglab.c2b2.columbia.edu/index.php/CTK_Documentation
Hi:
Can you write down your way of install the Math::CDF in details. I have meet the problem after using CPAN to install. I checked its location:
$ perldoc -l Math::CDF
/home/caiqi/perl5/lib/perl5/x86_64-linux/Math/CDF.pm
Then I started to follow the protocol as the document said:
$export PERL5LIB=~/czplib/
$ PATH=$PATH:~/ctk/
$ export PATH
Then I typed my first command and hit the problem:
$ for f in PUM2_high PUM2_low; do perl ~/ctk/fastq_filter.pl -v -if sanger -f mean:0-24:20 -of fastq ../fastq/$f.fastq.gz - | gzip -c > $f.filter.fastq.gz; done
Can't locate loadable object for module Math::CDF in @INC (@INC contains: /home/caiqi/czplib/ /software/perl-5.24.1-el7-x86_64/lib/site_perl/5.24.1/x86_64-linux /software/perl-5.24.1-el7-x86_64/lib/site_perl/5.24.1 /software/perl-5.24.1-el7-x86_64/lib/5.24.1/x86_64-linux /software/perl-5.24.1-el7-x86_64/lib/5.24.1 .) at /home/caiqi/czplib/Common.pm line 924. Compilation failed in require at /home/caiqi/czplib/Common.pm line 924. BEGIN failed--compilation aborted at /home/caiqi/czplib/Common.pm line 924. Compilation failed in require at /home/caiqi/ctk/fastq_filter.pl line 10. BEGIN failed--compilation aborted at /home/caiqi/ctk/fastq_filter.pl line 10. Can't locate loadable object for module Math::CDF in @INC (@INC contains: /home/caiqi/czplib/ /software/perl-5.24.1-el7-x86_64/lib/site_perl/5.24.1/x86_64-linux /software/perl-5.24.1-el7-x86_64/lib/site_perl/5.24.1 /software/perl-5.24.1-el7-x86_64/lib/5.24.1/x86_64-linux /software/perl-5.24.1-el7-x86_64/lib/5.24.1 .) at /home/caiqi/czplib/Common.pm line 924. Compilation failed in require at /home/caiqi/czplib/Common.pm line 924. BEGIN failed--compilation aborted at /home/caiqi/czplib/Common.pm line 924. Compilation failed in require at /home/caiqi/ctk/fastq_filter.pl line 10. BEGIN failed--compilation aborted at /home/caiqi/ctk/fastq_filter.pl line 10.
Then I chekced again the Math/CDF.pm after the mistake and found it is there:
$ perldoc -l Math::CDF
/home/caiqi/czplib/Math/CDF.pm
I don't know how to make it work. Thanks for your help,
Log in to answer this question.
Did you try installing usng CPAN? If you have cpanminus:
Or if you don't:
This is due to Apple having messed up with gcc in the past. See this blog post. Also, why would you use ActivePerl ? Mac OS comes already with perl installed and if you need another version, you should use perlbrew. By the way this is not a bioinformatics question. This should be posted on StackOverflow.
Thanks! I am still new at this, will move it over to stack over flow soon. Will try CPAN minus as soon as I get to a better connection.
Only using ActivePerl because I was told to have the latest version, but I see your point, hope all these issues get sorted out.
If you are on Mac, if I am not mistaken (I don't use Mac), the recommendation is to use homebrew for Perl, Python, GCC, and so on. Or try conda, another package manager, but which works on Mac, Linux and Windows.