Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Fail to install Math::GammaFunction

by Anonymous Monk
on Nov 03, 2013 at 20:57 UTC ( #1061074=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone, I am trying to install Math::GammaFunction on a Linux server, which requires a C -lRmath library. I do not have access to the root account and therefore I have put the Rmath/include and Rmath/lib under my local directory. But how to tell the Makefile.PL to search for Rmath in ~/local/Rmath/? I have tried to set INC and LIBS but didn't work... Many thanks.

Replies are listed 'Best First'.
Re: Fail to install Math::GammaFunction
by davido (Archbishop) on Nov 03, 2013 at 22:00 UTC

    Here is the entire Makefile.PL for that distribution:

    use 5.006; use ExtUtils::MakeMaker; # See lib/ExtUtils/ for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'Math::GammaFunction', VERSION_FROM => 'lib/Math/', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 LICENSE => 'perl', ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Math/', # retrieve abstr +act from module AUTHOR => 'Steffen Mueller <>') : ()), LIBS => ['-lRmath', '-lm'], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' INC => '-I.', # e.g., '-I. -I/usr/include/other' #INC => '-I. -I/usr/share/R/include', # e.g., '-I. - +I/usr/include/other' # Un-comment this if you add C files to link with later: # OBJECT => '$(O_FILES)', # link all the C files too );

    I'm not going to install the module, but if I were going to install it with an alternate location for -lRmath, I might try seeing what happens when I make the following change:

    INC => '-I. -I/home/me/include',

    ...where /home/me/include is the path to my local copy of the library. Give it a try, and pay attention to any error messages it generates, because they might tell you if you've specified one level too deep, or not deep enough on the route to identifying the proper path.

    Since you already suggested we assist with the distribution's Makefile.PL, I'm wondering if you already looked at the file, and tried what I'm suggesting.


      Thank you! It was me.

      But it didn't work. Actually I have also tried to put the Rmath under the installation directory but it still reported 'Note (probably harmless): No library found for -lRmath'.

      The installation still passed. But when I ran a test script, I got the error message 'perl: symbol lookup error: .../auto/Math/GammaFunction/ undefined symbol: gammafn'. I guess it's still a linking problem?

Re: Fail to install Math::GammaFunction
by Bloodnok (Vicar) on Nov 05, 2013 at 08:30 UTC
    Did you try googling ? I'm guessing not coz even the most trivial search returns about 15 million hits. Anyway, the normal/only way is to run the command perl Makefile.PL PREFIX=<some_loc>

    A user level that continues to overstate my experience :-))

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1061074]
Front-paged by Arunbear
[trahulprajapati]: I'm faicing a problem while navigating from one page to another. here is the discription- 1)I want to login webpage 2) on next page click okay 3)then next page fill some text in textbox 4) submitt. I have tried it by WWW::Scripter:: Javascript as page

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2017-06-26 15:13 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (583 votes). Check out past polls.