Math-CDF Perl Module compiler issue
1
1
Entering edit mode
5.8 years ago
CrisMar ▴ 80

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.

perl compiler gcc perl module • 3.5k views
ADD COMMENT
1
Entering edit mode

Did you try installing usng CPAN? If you have cpanminus:

cpanm Math::CDF

Or if you don't:

cpan
install Math::CDF
ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
5.8 years ago
CrisMar ▴ 80

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

ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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,

ADD REPLY

Login before adding your answer.

Traffic: 2274 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6