develooper Front page | perl.perl5.porters | Postings from August 2001

[ID 20010814.002] UNABLE TO BUILD PERL 5.6.1 IN WINDOWS NT

Thread Next
From:
David Rayner
Date:
August 14, 2001 03:25
Subject:
[ID 20010814.002] UNABLE TO BUILD PERL 5.6.1 IN WINDOWS NT
Message ID:
3B78FB99.9050303@netscapeonline.co.uk
Hi there,

  I work with Perl mainly in Linux but for one application I felt the 
need to put Perl on a Windows NT4.0.  I took the advice on CPAN that 
where possible it is preferable to build from scratch, and so I 
downloaded the files and went to work with a heigh-ho,

   Hours, or is it days, later I have to confess that this is the first 
time I have never been able to complete a build from CPAN instructions. 
I've listed my steps here - but I just do not understand what dmake is 
telling me!

  TIA,

  dr

STEPS IN THE PERL INSTALLATION ON WINDOWS NT4.0 WITH SERVICE PACK 6

1. Files downloaded for the installation were:
    dmake-4.1pl1-win32.zip	from: CPAN
    mingw-1.0-20010608.tar.gz	from: www.mingw.org <http://www.mingw.org>
    stable.tar.gz		from: CPAN

2. Each of these files was individually installed.

3. The following batch file was run to set the paths and directory for the
installation:

\DR\PERL\DR_INSTALL_PERL.BAT
@echo on
REM dr_install_perl.bat
REM set path for dmake so that Perl distribution ..\winw2\dmake. can find it
c:
cd \perl-5.6.1\win32
set PATH=c:\dmake-4.1;c:\dmake-4.1\startup;c:\mingw\bin;%PATH%
echo PATH=%PATH%
>END:

4. After running this batch file the console showed:

C:\>\dr\perl\dr_install_perl.bat
C:\>REM dr_install_perl.bat
C:\>REM set path for dmake so that Perl distribution ..\winw2\dmake. can find it
C:\>c:
C:\>cd \perl-5.6.1\win32
C:\perl-5.6.1\win32>set PATH=c:\dmake-4.1;c:\dmake-4.1\startup;c:\mingw\bin;C:\N
T4\system32;C:\NT4;C:\Program Files\Mts
C:\perl-5.6.1\win32>echo PATH=c:\dmake-4.1;c:\dmake-4.1\startup;c:\mingw\bin;C:\
NT4\system32;C:\NT4;C:\Program Files\Mts
PATH=c:\dmake-4.1;c:\dmake-4.1\startup;c:\mingw\bin;C:\NT4\system32;C:\NT4;C:\Pr
ogram Files\Mts
C:\perl-5.6.1\win32>

5. The mingw installation was verified by running 'gcc -V', which resulted in
this console output:

C:\perl-5.6.1\win32>gcc -v
Reading specs from c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-4/specs
gcc version 2.95.3-4 (mingw special)


6. The file makefile.mk was modified for our requirements (only that
initial section of the file which had any portion modified is shown
here, with white lines and some comments removed);

# Makefile to build perl on Windows NT using DMAKE.
# Supported compilers:
#	Visual C++ 2.0 thro 6.0
#	Borland C++ 5.02
#	Mingw32 with gcc-2.95.2 or better  **experimental**
## Make sure you read README.win32 *before* you mess with anything here!
## If you want a configuration that is the same as ActivePerl (see
## www.ActiveState.com <http://www.ActiveState.com>) make sure you set at least BUILD_FLAVOR below!
## Build configuration.  Edit the values below to suit your needs.
# Set these to wherever you want "dmake install" to put your newly
# built perl.  Setting it to a path with spaces is NOT recommended.
INST_DRV	*= c:
INST_TOP	*= $(INST_DRV)\perl
# uncomment exactly one of the following
# Visual C++ 2.x
#CCTYPE		*= MSVC20
# Visual C++ > 2.x and < 5.x SP3
#CCTYPE		*= MSVC_PRE_50SP3
# Visual C++ >= 5.x SP3
#CCTYPE		*= MSVC60
# Borland 5.02 or later
#CCTYPE		*= BORLAND
# mingw32+gcc-2.95.2 or better
CCTYPE		*= GCC
# uncomment this if your Borland compiler is older than v5.4.
#BCCOLD		= define
# uncomment this if you want to use Borland's VCL as your CRT.
#BCCVCL		= define
# set the install locations of the compiler include/libraries. Running
# VCVARS32.BAT is *required* when using Visual C.  Some versions of
# Visual C earlier than 5.x SP3 don't define MSVCDIR in the environment.
# If such is the case you may have to set CCHOME explicitly.  Spaces in
# the path name should not be quoted.
#CCHOME		*= F:\Borland\BC5
#CCHOME		*= $(MSVCDIR)
#CCHOME		*= c:\gcc-2.95.2-msvcrt
CCHOME          *= c:\mingw
CCINCDIR	*= $(CCHOME)\include
CCLIBDIR	*= $(CCHOME)\lib

7. The dmake installation was verified using 'dmake test', which produced this
console output:

C:\perl-5.6.1\win32>dmake test
ECHO is on.
del /f config.h
copy config_H.gc config.h
        1 file(s) copied.
gcc -c -I..\lib\CORE -I.\include -I. -I.. -DWIN32  -DPERLDLL -DPERL_CORE -g -O2
-o.\mini\win32.o win32.c
win32.c: In function `win32_uname':
win32.c:1631: structure has no member named `u'
win32.c:1636: warning: unreachable code at beginning of switch statement
win32.c: In function `Nt4CreateHardLinkW':
win32.c:2486: warning: initialization from incompatible pointer type
win32.c:2505: union has no member named `u'
win32.c:2506: union has no member named `u'
win32.c: In function `win32_link':
win32.c:2537: warning: assignment from incompatible pointer type
win32.c: In function `w32_DomainName':
win32.c:3675: warning: assignment from incompatible pointer type
win32.c:3677: warning: assignment from incompatible pointer type
win32.c:3695: warning: passing arg 2 of `WideCharToMultiByte' makes integer from
 pointer without a cast
win32.c:3699: warning: passing arg 2 of `WideCharToMultiByte' makes integer from
 pointer without a cast
dmake.exe:  Error code 1, while making '.\mini\win32.o'

8. if the previous step had given a zero error code then the final 'dmake install'
would have been run.

dr 13aug01





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About