Subject: Re: Perl compilation problems
From: [email-masked] (Walt Buehring)

10 Mar 1998 07:38:29 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
To: "chris yambo" <[email-masked]>
Cc: [email-masked]

"chris yambo" <[email-masked]> writes:
> 
> Hi, I am trying to compile perl 5.004_04 on my win95 system and it
> eventually gives me this error:

Chris,

Attached is my experience with compiling perl.  I never solved the
mystery of the missing network functions.

I've CC'd this to the list twice before but never seen it show up on
this end.  Apologies to anyone who has received multiple copies.

-----------------------------------------------------------------------------
I've managed to get perl5_004_04 ported to b19 with some finagling.
It passes 90% of all tests:

	Failed 7 test scripts out of 153, 90.20% okay.

Socket support does not work (linking cannot resolve a bunch
of network related functions, even if -lwsock32 is used) and
readdir fails with permission problems, but it works for everything I
need it to.

Heres the finagling...

1. Get and install the b19 coolview from http://www.lexa.ru/sos

2. Follow the directions in the perl distribution in README.cygwin32
   up to the point of "sh configure"

3. Apply the attached patches.  In cywin32.sh you need to edit
   the pathnames, domain, and email address.

4. Run "sh configure" and take all defaults.  At the point where it
   allows you to edit config.sh, do so and change the variables
   'd_socket' and 'd_sockpair' to 'undef'.

5. Run make.  It should Just Work.

I'm sure I've forgotten something, but this should cover the most
nasty bits.  Oh, building man pages is badly broken.

BTW, if you run configure in an Emacs shell buffer it does not
exhibit the nasty annoyance of skipping every other prompt.  But you
must edit out the tty test in "configure" first...

: Sanity checks
# if test ! -t 0; then
# 	echo "Say 'sh $me', not 'sh <$me'"
# 	exit 1
# fi

*** cygwin32.sh_ORIG	Fri Apr 04 17:40:25 1997
--- cygwin32.sh	Sun Mar 01 20:06:12 1998
***************
*** 10,17 ****
  startsh="#!$sh"
  cc='gcc2'
  ld='ld2'
! usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include'
! libpth='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib /gnuwin32/H-i386-cygwin32/lib'
  libs='-lcygwin -lm -lc -lkernel32'
  # dynamic lib stuff
  so='dll'
--- 10,17 ----
  startsh="#!$sh"
  cc='gcc2'
  ld='ld2'
! usrinc='/usr/local/cygnus/H-i386-cygwin32/i386-cygwin32/include'
! libpth='/usr/local/cygnus/H-i386-cygwin32/i386-cygwin32/lib /usr/local/cygnus/H-i386-cygwin32/lib'
  libs='-lcygwin -lm -lc -lkernel32'
  # dynamic lib stuff
  so='dll'
***************
*** 23,29 ****
  cccdlflags='-DCYGWIN32 -DDLLIMPORT '
  # flag that signals gcc2 to build exportable perl
  ccdlflags='-buildperl '
! lddlflags='-L../.. -L/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib -lperlexp -lcygwin'
  d_voidsig='undef'
  extensions='Fcntl IO Opcode SDBM_File'
  lns='cp'
--- 23,29 ----
  cccdlflags='-DCYGWIN32 -DDLLIMPORT '
  # flag that signals gcc2 to build exportable perl
  ccdlflags='-buildperl '
! lddlflags='-L../.. -L/usr/local/cygnus/H-i386-cygwin32/i386-cygwin32/lib -lperlexp -lcygwin'
  d_voidsig='undef'
  extensions='Fcntl IO Opcode SDBM_File'
  lns='cp'
***************
*** 41,50 ****
  installscript='/usr/local/bin'
  
  installsitelib='/usr/local/lib/perl5/site_perl'
! libc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib/libc.a'
  
  perlpath='/usr/local/bin/perl'
  
  sitelib='/usr/local/lib/perl5/site_perl'
  sitelibexp='/usr/local/lib/perl5/site_perl'
! usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include'
--- 41,58 ----
  installscript='/usr/local/bin'
  
  installsitelib='/usr/local/lib/perl5/site_perl'
! libc='/usr/local/cygnus/H-i386-cygwin32/i386-cygwin32/lib/libc.a'
  
  perlpath='/usr/local/bin/perl'
  
  sitelib='/usr/local/lib/perl5/site_perl'
  sitelibexp='/usr/local/lib/perl5/site_perl'
! usrinc='/usr/local/cygnus/H-i386-cygwin32/i386-cygwin32/include'
! #
! usenm='false'
! mydomain='mine.com'
! cf_email=[email-masked]'
! pager='/usr/local/cygnus/H-i386-cygwin32/bin/cat.exe'
! man1dir='/usr/local/man'
! man3dir='/usr/local/man'
! usedl='false'

*** perlgcc_ORIG	Sun Mar 01 20:10:06 1998
--- perlgcc	Fri Feb 27 22:22:46 1998
***************
*** 49,57 ****
--- 49,59 ----
  # get the full path name of a few libs:
  my $crt0 = `gcc -print-file-name=crt0.o`;
  chomp $crt0;
+ $crt0 =~ s@\\@/@g;
  my $libdir = `gcc -print-file-name=libcygwin.a`;
  chomp $libdir;
  $libdir =~ s/libcygwin\.a//g;
+ $libdir =~ s@\\@/@g;
  
  # Link exe:
  $command = "ld --base-file perl.base -o perl.exe $crt0 $obsString $libstring -L$libdir $libflagString";

*** installperl_ORIG	Sat Feb 28 13:35:20 1998
--- installperl	Sat Feb 28 13:42:31 1998
***************
*** 75,82 ****
     $installbin		|| die "No installbin directory in config.sh\n";
  -d $installbin		|| mkpath($installbin, 1, 0777);
  -d $installbin		|| $nonono || die "$installbin is not a directory\n";
- -w $installbin		|| $nonono || die "$installbin is not writable by you\n"
- 	unless $installbin =~ m#^/afs/# || $nonono;
  
  -x 'perl' . $exe_ext	|| die "perl isn't executable!\n";
  -x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
--- 75,80 ----
***************
*** 139,145 ****
  $mainperl_is_instperl = 0;
  
  if (!$versiononly && !$nonono && -t STDIN && -t STDERR
! 	&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
      local($usrbinperl)	= "$mainperldir/perl$exe_ext";
      local($instperl)	= "$installbin/perl$exe_ext";
      local($expinstperl)	= "$binexp/perl$exe_ext";
--- 137,143 ----
  $mainperl_is_instperl = 0;
  
  if (!$versiononly && !$nonono && -t STDIN && -t STDERR
! 	&& ! samepath($mainperldir, $installbin)) {
      local($usrbinperl)	= "$mainperldir/perl$exe_ext";
      local($instperl)	= "$installbin/perl$exe_ext";
      local($expinstperl)	= "$binexp/perl$exe_ext";

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".