PATCH/NOTES: perl/Tk b11.02 
Author Message
 PATCH/NOTES: perl/Tk b11.02

        I have a few notes and sample patch for perl/Tk b11.02.
        I managed to build the extension dynamically on seven
platforms (SunOS 4.1.4, Solaris 2.4, Digital UNIX 2.1, HP-UX 9.05,
IRIX 5.3, Linux 1.2.13, and AIX 3.2.5).  I needed to make a few
changes to the configuration script to have it find X properly, and I
had a problem on Digital UNIX and IRIX with loading.

1) Finding X with xmkmf

        The myConfig greps the xmkmf script, which does not work if
you have a modified version of xmkmf.  It needs to actually run the
script to obtain useful output.  A sample patch that works with (X
Consortium) X11R6.1, (SGI vendor) X11R6, and (vendor Digital) X11R5
is appended to the end of this note.

2) Using a local X build

        I compiled perl/Tk against a local X11R6.1 build on all
platforms.  The platforms which require encoding shared library
runtime path information (Linux, Solaris, IRIX, Digital UNIX) had
problems.  I tried recompiling perl to teach it about the X paths, as
well, when linking shared perl libraries.  That seemed to solve the
problem for Linux and Solaris.
        I suspect if I recompiled perl again, I might solve this
problem, but having compiled it once already and trying numerous
permutations with building perl/Tk, I finally wimped out and used the
vendor X and a static local xpm for IRIX and Digital UNIX.

3) Using a local xpm build

        I have current and shared library versions of the Xpm
libraries (3.4h) installed in the local X tree and want to use it and
not the provided xpm library in the perl/Tk distribution.  If someone
can build perl/Tk, they can build xpm.  It would be preferrable if
perl/Tk did not ship with xpm at all, but it should at least check to
see if xpm is installed before it tries to compile its own static
version.
        I moved Pixmap/xpm/Makefile.PL to
Pixmap/xpm/Makefile.PL.disabled and modified Pixmap/Makefile.PL to
link with the local Xpm (-L/usr/pubsw/X11R6/lib -lXpm -lX11 plus
whatever CCENVLINK options the platform required --
-R /usr/pubsw/X11R6/lib for Solaris and
-Wl,-rpath,/usr/pubsw/X11R6/lib for Linux).  I'm not positive that
linking against X11 was needed, but I know Xpm depends on it, it
didn't hurt, and I wasn't taking chances. (-:

4) Shared library flags

        IMHO, imake is good for exactly one thing: building X
programs.  It mostly sucks for anything else, but it does a better job
at handling X programs then anything I have seen.  autoconf comes
closest to getting it right (I consulted autoconf's macros before
writing my patch for the perl/Tk), but not close enough.  I ended up
using the vendor X for IRIX and Digital UNIX, but I used the local X
for Linux and Solaris.  I believe getting this to work properly
required adding the necessary runtime link options for the top level
Makefile and the Pixmap Makefile.

5) -lnsl and -lsocket

        Those two librares are the kiss of death on IRIX (maybe not so
much now, but I stopped trusting the libraries as of 5.2, anyways).
The only platform of the seven I built on that needs it is Solaris.
They should not used on any platform which does not need it, including
SunOS (-lnsl) and IRIX (-lnsl -lsocket).  perl/Tk does have access to
necessary database.  $Config{libs} contains the list of libraries that
perl was linked with.  If nsl or socket were needed, they would be in
that list.

6) installarchlib versus archlib

        The runtime path for perl is archlib, not installarchlib.
installarchlib is where it is installed; it need not actually exist.

                        yours,
                                Larry Schwimmer

                                Distributed Computing Operations

--- myConfig.orig       Thu Apr  4 11:47:01 1996

 require 5.002;
-my $path = "$Config{'installarchlib'}/CORE/perl.h";
+my $path = "$Config{'archlib'}/CORE/perl.h";
 die "Cannot find '$path' have you installed $^X?\n" unless (-r $path);
-print "$^X is installed in $Config{'installarchlib'} okay\n";
+print "$^X is installed in $Config{'archlib'} okay\n";
 use Config;
 use Cwd;

   }
   $uiline = undef;
   if (defined $xmkmf) {
-    open(XMKMF,$xmkmf) || die("Can't open $xmkmf: $!\n");
-    while(<XMKMF>) {
-      next unless /UseInstalled/o;
-      warn ("Odd, two lines in the $xmkmf file that have UseInstalled on them:\n$uidir$_") if defined $uiline;
-      $uidir = $_;
-    }
-    close(XMKMF);
-    while (defined $uidir) {
-      last unless ($uidir =~ s!^.*-I(\S+)/lib/X11/config!!o);
-      $try = $1;

-    }
+    chdir "config";
+    system "$xmkmf 1>/dev/null 2>&1" and die("Can't open $xmkmf: $!\n");
+    chdir 'config';
+    chop($uidir = `make`);
+    chdir '..';
+    unlink 'config/Makefile';

   }


  {
   $xlib = &lX11(1,"$X11/lib")
  }


 # Special case for sun-machines
 unless (defined $xlib)
--- /dev/null   Sun Jul  7 11:39:26 1996

+findx:

==========================================================================
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the

--




Mon, 28 Dec 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Revised self packing scrollbars patch for Tk-b11.02

2. patch to take to Tk-b11.02

3. Possible self packing scrollbars bugs in Tk-b11.02+patch

4. problem compiling Tk-b11.02..

5. Warning on Install Tk-b11.02

6. Help:Install,Perl5.003,Tk-b11.02,Linux2.0.0

7. Tk-b11.02 & perl5.003_02

8. Tk-b11.02

9. Problem compiling Tk-b11.02

10. Tk-b11.02 on Solaris 2.5?

11. Compile problems on HP 712 (Tk-b11.02) finally solved

12. Tk-b11.02 compile error

 

 
Powered by phpBB® Forum Software