I just see, that Nick has answered already, so I only add a few words...
>>>>> "sb" == Steffen Beyer <sb@sdm.de> writes:
sb> Ananda M. Kar (ananda@cs.utexas.edu) wrote:
>> I just installed the Tk-b8. I'm using perl which is installed properly but not
>> in "/usr/local/bin". Whenever I try the basic demo "perl ./basic_demo" I
>> encounter the following error.
[...]
>> What am I doing wrong or how do I fix it ??
If Nick renamed basic_demo to test.pl or t/basic_demo.t, all would be
well. You could say 'make test' and the Makefile would call
perl -Iblib test.pl
Note the -Iblib. You have to use it as long as perl is not
installed. So you say
perl -Iblib basic_demo
>> Thanks
>> Ananda
>> --
>> Ananda M. Kar |(H)458-9754 | URL: http://www.cs.utexas.edu/users/ananda/
sb> I've had the same problem because on our machines, we install all packages
sb> in a separate "/opt" (for "optional" software) subtree, where each package
[...]
sb> All this is impossible to do when every package installs its binaries
sb> in /usr/local/bin (possibly overwriting other binaries with the same name,
sb> in this process!), because after some time, it's almost impossible to know
sb> to which package a binary belongs to, and almost impossible or at least im-
sb> probable to be sure that you removed ALL binaries belonging to a package you
sb> want to de-install.
I admit, the $Config{installbin} directory is a weak point but it's a
common problem to all software installations. You can of course check
the INSTALLBIN parameter of MakeMaker and do your own thing.
If you have called make install ever, then you find at least a
complete list of all installed files in a file called something like
/usr/local/lib/perl5/IP22-irix/auto/Tk/.packlist. The final form of
the packlist is being discussed on the makemaker mailing list, and
will probably end up in a much completer dump of the module
configuration.
sb> (Why would you like to de-install packages, in the first place? Because some-
sb> times you only want to test them, and when they don't do what you would like
sb> them to do, you want to get rid of them, because you can't afford to waste disk
sb> space. The other reason is that packages evolve, and you might want to install
sb> the latest version. However, (as was the case with perl 4 / perl 5), not
sb> necessarily all binaries are preserved in the update, or new ones are intro-
sb> duced. That way, your /usr/local/bin ends up to be trashed with zombies.)
sb> I'm writing this in such detail because it might be a useful concept for others
sb> as well, and software providers should think it over if they don't want to
sb> support it - till now, installing additions for Perl is a mess!
I agree. But as you see with the .packlist, it is being worked on.
sb> My workaround to the problem was to change all the "#!/usr/local/bin" to
sb> "#!/opt/bin/perl5" (which is the correct path and name for us) in ALL the
sb> perl scripts (hairy, I know!) in the subdir where the binaries are located
sb> after the "make install", and all the "unshift(@INC, qw(./blib .))" and the
sb> like in all the scripts in the "bin" and "lib" subdirectories to the proper
sb> (absolute!!) path. (By the way, in my opinion, this is a bug in Tk-b8: It
I'm not speaking for Tk, I'm the maintainer of MakeMaker. MakeMaker in
general does, of course, not assume the current directory being the
final directory. ./blib is the place where everything is moved to
during the build. It's nothing but a parking place to give room to the
compilation phase.
sb> assumes that the current working directory will be the package's directory
sb> when something in the package is called. I don't think that this is the case,
sb> so there should be ABSOLUTE (not relative!) paths to the "blib" subdirectory!!)
I disagree. 'make install' has to be done with absolute pathnames but
not the testing phase. The testing phase should be independant of it's
location in the file system. If the filesystem changes beneath it, it
shouldn't do any harm. Exactly folks who try to be more clever than
what the installation manuals suggest regularly get bitten after a
while, because they forget to correct some pathnames and end up with a
mixture of Tk-b6, b7, and b8 somewhere.
I don't try to be more clever than the user, but at least the whole
thing is well documented, so you know, what you may expect. blib is
the parking place, and the final places have with INSTALLPRIVLIB,
INSTALLARCHLIB, INSTALLBIN, and with MakeMaker 4.23 also
INSTALLMAN1DIR and INSTALLMAN3DIR really a lot of configurable
parameters for the installation. Alas, forgot PREFIX :)
sb> Actually, I'm still working on this because I just installed Curses and Tk-b8
sb> last friday; I'm considering copying the "blib" subdir to another, more
sb> appropriate location to resolve the problem more elegantly.
Elegantly? That's definitely a NoNo. ./blib mixes all 5 above
mentioned parameters onto one directory. You're doing the wrong thing
here. Read the MakeMaker documentaion. Watch CPAN, I'm going to
release version 5.00, a much improved one, this week and currently
4.23 is on the archives. Worth a look.
sb> In case I find out more about this, I'll let you know.
sb> Hope this helps a little!
Ditto!
sb> Best regards,
sb> --
sb> Steffen Beyer
andreas