Bill Jonas on Tue, 19 Feb 2002 23:42:22 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Hopefully simple Perl CPAN question


On Tue, Feb 19, 2002 at 11:13:11PM -0500, Michael Leone wrote:
> I should make this symlink from the shell, before starting perl?

Yes.

> Shouldn't the symlink be for "cc", not "gcc", since that's what the
> makefile is issuing?

It is.  The target goes first, then the name that you want the link to
be.  Since gcc is (presumably) in /usr/bin and you're making a link
called "cc" in /usr/bin, it will link to gcc in the same directory.
(Relative vs. absolute path in the link.)

$ ln -s gcc ~/bin/cc
$ ll ~/bin/cc
lrwxrwxrwx    1 bj       bj              3 Feb 19 23:27 /home/bj/bin/cc -> gcc

(Well, okay, that's a dangling symlink since I have no file called
~/bin/gcc, but you get the idea.)

> What should be "foo" in your example above? I have about a dozen
> "bundles" to install, and who knows how many files that will compile.
> I'm still confused.

Sorry, I glossed over the original post.  Usually to install a Perl
module, you unpack the tarball, cd in to the directory it just created,
then run "perl Makefile.PL"[1], "make", an optional "make test", and
"make install".

However, you're using the CPAN shell, so you don't have to do all that;
it takes care of it for you.  Just make the link and it ought to work
(assuming /usr/bin is in your $PATH, of course ;-) ).

Personally, I think the author of the Makefile in question should have
taken a bit more care when writing it, but at this point, that's neither
here nor there.

[1] Digression (since you said you weren't overly familiar with this
process): The first step writes the regular Makefile.  This is done
because how is the module to know where perl is installed on your
system?  Is it /usr/bin/perl, /usr/local/bin/perl,
/opt/pkg/perl-5.6.1/bin/perl, or someplace else?  The perl executable
itself knows.  Think of it as taking the place of the "./configure" step
you would perform when compiling C source code.  It can also check other
things, for example the Perl version number if it uses some feature not
present in earlier versions.

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/

Developer/SysAdmin for hire!   See http://www.billjonas.com/resume.html

Attachment: pgpuLsdC7AiSY.pgp
Description: PGP signature