in reply to Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally

A couple things -
  1. You say installing manually leads you nowhere - can you give more details? Like what specific error messages, etc...
  2. I think if the variables are set correctly, as it seems they are in your ~/.bashrc, you can just run
    perl Makefile.PL make make test
  3. If you aren't sure, you can type
     source ~/.bashrc
    then type printenv, and check that the variables are set correctly.

    Also, I was able to download and install libstree from the link in your post, after which I was able to install Tree::Suffix without a problem, using the default settings. I didn't need to set of the settings like you did in your .bashrc file. Do you need to install in your home directory? If not, you can try with the default settings suggested in the docs, and see if that works.

    -- Burvil

    • Comment on Re: Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally
    • Download Code

Replies are listed 'Best First'.
Re^2: Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally
by monkfan (Curate) on Mar 15, 2006 at 07:43 UTC
    Hi,
    Thanks for your answer. To answer your point:
    Like what specific error messages, etc...
    It gives:
    Can't open perl script "CFLAGS=-I /home/ewijaya/MyBioTool/libstree-0. +4.2/include": No such file or directory. Use -S to search $PATH for it.
    I think if the variables are set correctly, as it seems they are in your ~/.bashrc, you can just run
    No, they are in my .bash_profile. Running those command you suggest also gave exactly the same error message as in my OP.
    then type printenv, and check that the variables are set correctly.
    Here is what I have:

    And no, I don't have a SU previlege. So I have no choice but to install it locally.
    Update: corrected "ewijaya" to "monkfan", that value I manually replace them.

    Regards,
    Edward
      Two things -

      1. Hm, I get the sense you come from a C background. If that's right, I can see why you would pass the flags as a parameter to perl. However, when it says

       Can't open perl script "CFLAGS=-I /home/ewijaya/MyBioTool/libstree-0.
      +4.2/include": No such file or directory.
      
      I think it's interpreting your command as the flags being the script, and since that's not what you want, nor will it work, it gives an error. I'd say cd to the place where you untarred the Tree::Suffix install files, and run perl Makefile.pl, and see what happens. If that works, try make, then make test.

      2. Re: your variables, look at:

      LDLAGS=LDFLAGS-L/home/ewijaya/MyBioTool/libstree-0.4.2/lib .... CFLAGS=-I/home/monkfan/MyBioTool/libstree-0.4.2/include
      See how LDFLAGS is different from what you have set in your .bash_profile? (Which, by the way, I think .bash_profile is for login only; if you make the changes to ~/.bashrc, you don't need to logout and log back in for changes to take effect, you can just do source ~/.bashrc. See here for more info (from a google search for .bash_profile).

      So, you need to fix LDFLAGS... not sure why it's happening for you; although when that sort of thing has happened to me before, it was because I mistyped a command to set a variable that had already been set in my .bashrc file. To do a quick fix, you could try running the line from your .bash_profile, and seeing if it's set correctly, like so -

      prompt> export LDFLAGS="-L $HOME/MyBioTool/libstree-0.4.2/lib" prompt> printenv LDFLAGS |---> this command should give you: -L $HOME/MyBioTool/libstree-0.4.2/lib

      -- Burvil