Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally

by fizbin (Chaplain)
on Mar 15, 2006 at 15:15 UTC ( #536837=note: print w/replies, xml ) Need Help??


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

I would very much like to see the first error that the CPAN shell gets - the errors you quote aren't useful. (They basically boil down to "something went wrong earlier").

That being said, your manual compilation attempt won't succeed because the first argument to perl isn't a perl script. Re-order your arguments and put Makefile.PL at the front:

~/.cpan/build/Tree-Suffix-0.12$ perl Makefile.PL CFLAGS="$CFLAGS -I$HO +ME/MyBioTool/libstree-0.4.2/include" LDFLAGS="$LDFLAGS -L$HOME/MyBioT +ool/libstree-0.4.2/lib"
followed by the command make and, only if the previous command was successful, make test and then (again, only if make test was successful) make install.
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

Replies are listed 'Best First'.
Re^2: Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally
by bowei_99 (Friar) on Mar 15, 2006 at 15:40 UTC
    Actually, since those variables should already be defined, according to your earlier posts, all you should need to type is
    perl Makefile.PL $CFLAGS $LDFLAGS
    To make sure the variables are set correctly you can type
    printenv | grep FLAGS
    If they aren't set correctly, you can run the export command in an earlier posting to fix it.

    Also, if you don't want to sit around and wait (although for troubleshooting purposes, it's probably better to do so), you can type

    perl Makefile.PL $CFLAGS $LDFLAGS && make && make test && make install
    The && means that the command will only execute if the previous one was OK.

    -- Burvil

      I think you meant
      perl Makefile.PL "CFLAGS=$CFLAGS"
      etc.

      But in any case, this doesn't matter, since Makefile.PL doesn't accept CFLAGS or LDFLAGS as arguments.

      --
      @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
        Yeah, I realized that, too. I guess if the poster wanted those variables set when he runs make, he'd have to edit the Makefile directly, then run make ...

        -- Burvil

Re^2: Installing Perl Wrapper Module for a C Library (Tree::Suffix) Locally
by monkfan (Curate) on Mar 15, 2006 at 15:28 UTC
    I would very much like to see the first error that the CPAN shell gets
    Hi fizbin,
    This is the error I got: Running simple command:
    $ perl Makefile.PL $ make $ make install
    gave the same error as above

    Regards,
    Edward

      The problematic line is this line:

      Note (probably harmless): No library found for -lstree

      I don't know why MakeMaker outputs this "propably harmless" message, because in my experience, it has never been harmless whenever I encountered it. This error message means that the Makefile.PL could not find the library stree, most likely because you didn't supply the correct -L and -I switches to it. This seems especially valid as your stree library is installed in an uncommon path I think.

      You will have to run your Makefile.PL manually and supply the correct paths to where the header/include files of the stree library got installed. Most likely like:

      perl -w Makefile.PL "INCLUDE=-I ../stree/include" "LIBS=-L ../stree/li +b"

      Okay, so it would appear that Makefile.PL and CPAN are not honoring your cflags environment setting. Furthermore, it appears that you need to pass extra C flag arguments to Makefile.PL as "CCFLAGS", not "CFLAGS". So, I would suggest trying this:

      perl Makefile.PL CCFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
      That should produce a Makefile that you can use with "make".
      --
      @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://536837]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2022-08-15 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?