Re: Wrong Build Environment

2008-09-25 Thread Boris Samorodov
On Wed, 24 Sep 2008 22:10:12 -0500 Martin McCormick wrote:

   I can't think what bone-head thing I did to cause this,
 but I've ruled out problems with the mrtg port or perl5.8. I
 actually built perl5.8 from a slightly older port, once, and got
 the same results. The port of mrtg is fairly old and was
 installed successfully on the system that works and also
 installed successfully on the broken system except it can't find
 its libraries.

   Any ideas?

1. Make sure that you really have only one perl version and all
dependent ports use the same version. A simple command may help:
-
% ls -l /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl
/usr/local/lib/perl5:
total 6
drwxr-xr-x  46 root  wheel  3072 23 sep 19:06 5.8.8
drwxr-xr-x   3 root  wheel   512 23 sep 19:06 site_perl

/usr/local/lib/perl5/site_perl:
total 2
drwxr-xr-x  6 root  wheel  512 24 sep 13:53 5.8.8
-
You should get directories only for one perl version. If there are
others than find out which perl dependent ports were not updated.

2. Make sure that you really don't have that file at your system.
Find(1) may help here while locate(1) may have a stale database.

3. Make sure your pkg database doesn't register the meeded file as
installed. The following command may give some info:
-
% grep filename /var/db/pkg/p5-*/+CONTENTS
-

4. Compare an output of the command make all-depends-list at both
systems for the mrtg port.

5. Not using make clean may give one a trouble. Ex., someone
deletted a port by a pkg_delete command but $WRKDIR contains a flag
that this port had been installed -- here is a problem!

6. Examine configure.log file for the mrtg port to find out what this
port is looking for to determine an existance of the needed port. My
customer got a problem after cancelling a port installation at a
middle of the process: header files were installed but libraries
were not and a port was not registered at a pkg database. But those
header files were used by other port's Makefiles to detect if a port
is installed...


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


Re: Wrong Build Environment

2008-09-25 Thread Martin McCormick
One of many greatly appreciated suggestions Boris Samorodov wrote:

 % grep filename /var/db/pkg/p5-*/+CONTENTS

While looking in that directory, I noticed the good
system had net-snmp-5.2.2_1

The broken system had had the wrong version of net-snmp
earlier in the week but  I remember doing a deinstall which left
no net-snmp distribution at all, possibly the problem.

The broken system is newer and the net-snmp5x port there
is net-snmp5.3x so I installed that. It did lots of things to
perl5.8 but when done, I still had the same problem of wrong
files in /usr/local/lib/perl5/site_perl/5.8.8.

The make all-depends-list output from both systems was
identical.

Finally, more out of frustration than logical procedure,
I got an un-updated port of mrtg whose Makefile was dated in
2007. Next, I went to the broken system and for the
ten-thousandth time, did make deinstall. A ls -l of
/usr/local/lib/perl5/site_perl/5.8.8 verified that mrtg-related
files were gone.

I then did rm -r on the mrtg port I had been building
with and un-tar'd the older mrtg port.

make install ran and low and behold, the 5.8 directory
in /usr/local/lib/perl5/site_perl now had the proper list of
files.

I then put back the newer port of mrtg whose Makefile is
dated in June, did a make deinstall and make install cycle and
expected to see the problem again. Instead, the perl library
changes, most likely based upon the installation of the proper
net-snmp package survived and all now appears to be well.

Thanks to everybody who helped. This was one of the most
puzzling UNIX trouble-shooting adventures I have been on in
years.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Wrong Build Environment

2008-09-24 Thread Martin McCormick
After several days of attempting to build mrtg on a
FreeBSD6.3 system, I know what is wrong but am not sure what I
did to break things nor how to roll back the change.

On the broken system, I can deinstall both perl5.8 and
mrtg and then do a make install for mrtg which also builds
perl5.8 and installs it. When done, I have
/usr/local/lib/perl5/site_perl/5.8 but the libraries mrtg needs
are not there. Instead, there are very similar files which mrtg
is not looking for.

On another 6.3 system, I installed mrtg via the same
port and it also creates the exact same directory but it
contains the correct files. I have not set any environment
variables to anything other than the normal settings on either
system.

Is there a proper way to determine where the make
process is going wrong?

It is almost certainly some file in /usr/lib that got
built wrong that keeps steering the make attempt to populate
/usr/lib/perl5/site_perl/5.8.8 with the wrong files.

Other than that, there are no complaints during the
build process. You just can't run the executable because it
can't find any of the files it needs.

I can't think what bone-head thing I did to cause this,
but I've ruled out problems with the mrtg port or perl5.8. I
actually built perl5.8 from a slightly older port, once, and got
the same results. The port of mrtg is fairly old and was
installed successfully on the system that works and also
installed successfully on the broken system except it can't find
its libraries.

Any ideas?

Thank you.

A very tired Martin McCormick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]