Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread Tony Jones

> The main reason for doing that sort of thing with most unixoid systems
> is that using a unique prefix for every software package you install
> means that you can easily identify which files belong to what package
> when later on it comes time to update things.

I understand this, but I still like the seperation.
Were I installing a package, I'd understand having to operate within the
confines of someone elses location scheme, BUT I'm building from source
for gods sake.  Being able to change the base prefix of the port install
seems like a pretty basic piece of functionality. Obviously there are some
exceptions, but it would be easy for the port to inform you if PREFIX could
not be changed in the environment.

I did a 'make install' on portupgrade,  didn't realize I'd have to install
ruby to install perl :-) Grief.

Then I found my problem.  My stock shell was ksh, obtained from research.att.com
many moons ago.  It was doing some odd stuff with the environment (not via any
dotted scripts).  perl -v would work in ksh but once I su'd to root (csh) 
something was messed up.   Shrug.  chsh to sh or csh seems to work for that
shell and also when su'ing to root. With my /usr/local/perl prefix and all.  

Thanks for everyones help & chastisement :-))

tony


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread Matthew Seaman
On Thu, Dec 11, 2003 at 09:56:27AM -0800, Tony Jones wrote:
>  
> > > why is it in /usr/local/perl/bin? As far as I have seen, the ports 
> > > collection doesn't do that. did you install as a port (make install in 
> > > /usr/ports/lang/perl5.8)?
> > 
> > Yes.  make install PREFIX=/usr/local/perl
> 
> I of course also did 'make PREFIX=/usr/local/perl' before doing the install.

The main reason for doing that sort of thing with most unixoid systems
is that using a unique prefix for every software package you install
means that you can easily identify which files belong to what package
when later on it comes time to update things.

However, you don't have to do it that way on FreeBSD -- the ports
system itself keeps track of where all of the installed files come
from.  Following the defaults -- that is, using the prefixes
/usr/local or /usr/X11R6 -- means that all the binaries will appear in
locations that are already on user paths, and dependent software
packages will be able to find shared libraries to link against.

But then again, it's your system and you can do what you like with it.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread paul beard
On Dec 11, 2003, at 9:54 AM, Tony Jones wrote:

I'm very unfamiliar with the ports system.  I've never heard of 
portinstall
or portupgrade.

Just running make && make install in the appropriate port subdirectory.


It seems to me you're making this really complicated: I don't know what 
difference it makes where things get installed (/usr/local/{language}/ 
. . . ), but I have been using the ports collection as it comes without 
a problem. One of the benefits of using a system (like FreeBSD) is that 
there are some design conventions and decisions you can rely on.

My advice, and worth every penny you're paying, would be to use the 
ports system and become familiar with it before hacking around it. To 
that end, I would do, as root"
cd /usr/ports/sysutils/portupgrade; make install and then use that to 
manage the rest of it with portinstall , in your case perl5.8 
and spamassassin. You may need to run "use.perl port" between those 
steps to ensure that spamassassin gets built against perl5.8 and 
doesn't complain about the wrong version.



--
Paul Beard

paulbeard [at] mac.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread Tony Jones
 
> > why is it in /usr/local/perl/bin? As far as I have seen, the ports 
> > collection doesn't do that. did you install as a port (make install in 
> > /usr/ports/lang/perl5.8)?
> 
> Yes.  make install PREFIX=/usr/local/perl

I of course also did 'make PREFIX=/usr/local/perl' before doing the install.

Tony

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread Tony Jones

> why is it in /usr/local/perl/bin? As far as I have seen, the ports 
> collection doesn't do that. did you install as a port (make install in 
> /usr/ports/lang/perl5.8)?

Yes.  make install PREFIX=/usr/local/perl

Is that bad?  I like to have large packages installed into seperate
sub-directories in /usr/local rather than all competing for /usr/local/{bin,lib,
etc}. 

> What would happen if you were to use portinstall perl5.8 and 
> portinstall spamassassin? You may need to install the portupgrade 
> package if you haven't already done so.

I'm very unfamiliar with the ports system.  I've never heard of portinstall
or portupgrade.  

Just running make && make install in the appropriate port subdirectory.

Tony

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-11 Thread paul beard
On Dec 10, 2003, at 8:34 PM, Tony Jones wrote:

At this point, /usr/local/perl/bin/perl is installed
why is it in /usr/local/perl/bin? As far as I have seen, the ports 
collection doesn't do that. did you install as a port (make install in 
/usr/ports/lang/perl5.8)?

What would happen if you were to use portinstall perl5.8 and 
portinstall spamassassin? You may need to install the portupgrade 
package if you haven't already done so.

--
Paul Beard

paulbeard [at] mac.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Perl 5.8.2 problems (was Re: how to build Spamassassin)

2003-12-10 Thread Tony Jones

> Install Perl 5.8.2 from ports (or source)

I did this (/usr/ports/lang/perl5.8).

Made fine, but grokked during 'make install':

/bin/mkdir -p /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils
install -c -o root -g wheel -m 444  
/usr/ports/lang/perl5.8/work/BSDPAN-5.8.0/ExtUtils/MM_Unix.pm 
/usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils/MM_Unix.pm
/bin/mkdir -p /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils
install -c -o root -g wheel -m 444  
/usr/ports/lang/perl5.8/work/BSDPAN-5.8.0/ExtUtils/Packlist.pm 
/usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils/Packlist.pm
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
*** Error code 1

At this point, /usr/local/perl/bin/perl is installed (above error is some later
foo) but any attempt to run /usr/local/perl/bin/perl gets the same error from
the dynamic loader -- but I am trying it as root (see later).

Found a post from '[EMAIL PROTECTED]' to freebsd.ports (on 11/12) with the
same problem (he was on 4.8,  I'm on 4.9) but no answer.

Looks like PL_exit_flags is defined in the BSS segment of 
{/usr/local/perl}/lib/perl5/5.8.2/mach/CORE/libperl.so.

But this seems too deep a path for addition to LD_LIBRARY_PATH.

Looking back through the build logs, I could see places where commands were
run with LD_LIBRARY_PATH prepended with /usr/ports/lang/perl5.8/work/perl-5.8.2
to pick up a copy of libperl.so in that directory but not in the case where
the make failed.   So, I prepended the path to LD_LIBRARY_PATH in the
parent environment and reran make.  This solved the problem and make install
completed.

But now I get this, which is baffling me a bit:

$ /usr/local/perl/bin/perl -v
This is perl, v5.8.2 built for i386-freebsd
Copyright 1987-2003, Larry Wall
[snip]

$ su
Password:
# /usr/local/perl/bin/perl -v
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
# exit 
$ script
Script started, output file is typescript
$ /usr/local/perl/bin/perl -v
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
$ ^D
Script done, output file is typescript
$ ksh
$ /usr/local/perl/bin/perl -v
This is perl, v5.8.2 built for i386-freebsd
Copyright 1987-2003, Larry Wall
[snip]
$ ^D

Something is getting screwed up in the su and pty/script cases, as "su -" works
fine as does starting a subshell (.kshrc).

LD_LIBRARY_PATH is in the environment in all cases (=/usr/lib).

Anyone got any ideas.  It's probably something obvious but it isn't dawning
on me. Yes, I have rebooted post installing perl.  This is all 4.9 FreeBSD.

thanks!

Tony

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"