Hello, 

I'll send my patch for util/pod2mantest to install OpenSSL 0.9.6f
correctly in a certain environment --- the environment which have
several versions of perl and pod2man in the path.


--------

Problem: pod2mantest may returns "pod2man" which cause error in Makefile 


Environment:

   OpenSSL 0.9.6f
   FreeBSD 4.6-STABLE
   Perl
   - Perl 5.005_03 in /usr/bin/perl5
   - Perl 5.6.1 in /usr/local/bin/perl


Error Message:

Installing of OpenSSL fails while using pod2man:

   konno@sangrose% make install
   + rm -f libcrypto.so.0
    :
   making all in test...    
   making all in tools...
   /usr/bin/pod2man does not work properly ('MultilineTest' failed).  Looking for a
   nother pod2man ...
   installing man1/CA.pl.1
   Can't locate Pod/Man.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5
   .005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.005
   03/mach /usr/libdata/perl/5.00503) at /usr/local/bin/pod2man line 16.
   BEGIN failed--compilation aborted at /usr/local/bin/pod2man line 16.
   *** Error code 2
   
   Stop in /home/konno/temp/openssl-0.9.6f.


Description:

A "util/pod2mantest" is a test script to determine which pod2man to be used
by Makefile to convert pod files to man files while installing OpenSSL.
Makefile runs pod2mantest with option "ignore" like this:

   konno@sangrose% cd util/
   konno@sangrose% ./pod2mantest ignore
   /usr/bin/pod2man does not work properly ('MultilineTest' failed).  Looking for a
   nother pod2man ...
   /usr/local/bin/pod2man

A last line is the pod2man which is used by Makefile.
/usr/local/bin/pod2man is used in this environment.

In pod2mantest, it runs just "/usr/local/bin/pod2man" and it use Perl 5.6.1
because there is "#!/usr/local/bin/perl" in /usr/local/bin/pod2man.

In Makefile, it runs "/usr/bin/perl5 /usr/local/bin/pod2man"
because there is such an description follows, and $(PERL) is
set as "/usr/bin/perl5":

   sh -c "$(PERL) $$pod2man \
            --section=$$sec --center=OpenSSL \
            --release=$(VERSION) `basename $$i`") \
            >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \

But /usr/local/bin/pod2man requires Pod::Man module and
there are no Pod::Man module in @INC path of /usr/bin/perl5
(Of course, there are Pod::Man in @INC path of /usr/local/bin/perl).


Solution:

Use the following patch:

--- util/pod2mantest.orig       Tue Jun 25 20:42:05 2002
+++ util/pod2mantest    Fri Aug  9 21:37:41 2002
@@ -12,6 +12,7 @@

 IFS=:
 try_without_dir=false
+PERL=/usr/bin/perl
 # First we try "pod2man", then "$dir/pod2man" for each item in $PATH.
 for dir in dummy:$PATH; do
     if [ "$try_without_dir" = true ]; then
@@ -29,8 +30,12 @@
     if [ ! "$pod2man" = '' ]; then
         failure=none

+       "$PERL" "pod2man" >/dev/null 2>&1
+       if [ $? -ne 0 ]; then
+           failure=RunWithPerlTest
+       fi

-       if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | 
grep '^MARKER - ' >/dev/null 2>&1; then
+       if "$PERL"  "$pod2man" --section=1 --center=OpenSSL --release=dev 
+pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then
            failure=MultilineTest
        fi

This patch force pod2mantest to use /usr/bin/perl to run pod2man which is
used in Makefile.

I've only tested this patch under my environment which is described above.


Comment:

You will have to correct Makefile as described in [openssl.org #203]
to install OpenSSL 0.9.6f, too.

The same problem which is described in this document was also found
in OpenSSL 0.9.6e, too.

--------


Thank you.

----------
KONNO Shunichi <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to