Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Win32 Perl build make problem

by cosmicperl (Chaplain)
on Nov 12, 2004 at 22:47 UTC ( #407552=perlquestion: print w/ replies, xml ) Need Help??
cosmicperl has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
   I'm compiling ActivePerl on Win2000 professional.

I've hit a bit of a snag. It's work, and then it hasn't. Here are the details of what I've done. If you fancy giving it a go yourself feel free:-

I downloaded the latest ActivePerl source from:-
ftp://ftp.activestate.com/ActivePerl/src/5.8/

I use Microsoft Visual C++ 8 as my compiler. If your a programmer and you haven't heard already you can get Visual Studio 8 express edition beta for free from Microsoft.
Visit:-
http://lab.msdn.microsoft.com/express/

I unzipped the source and tried to nmake, but it told me I was missing windows.h. I searched my machine and didn't have the file, so I guess the express version didn't have it. so I downloaded the Microsoft Windows SDK:-
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

And copies the includes and library files over to my VC++ 8 includes and library folders.

I tried 'nmake' again and it worked.

'nmake test' worked fine.

But when I did 'nmake install' it looked ok until it gave me an xcopy error that the 'html' folder did not exist. So I created the folder and put in a fake file for it to copy. This time 'nmake install' went through fine.

All looked good until I went into my new perl folder (INST_TOP = $(INST_DRV)\perlc as I have an old binary install in \perl). It only had the folders bin and html. html had the fake file I created, and bin had a few perl files, namely perlglob.exe pl2bat.bat and wperl.exe. Where is everything else? It looks to me like perl.exe, etc have all been created in source folder, and not moved to the right place. Am I missing something?

Help is much appreciated as I have some new XS modules I need to test. So I need to be able to compile new modules into perl.


Lyle

Comment on Win32 Perl build make problem
Re: Win32 Perl build make problem
by cosmicperl (Chaplain) on Nov 12, 2004 at 23:11 UTC
    I ran nmake install >install.txt to give you some details. As I suspected most of it is copying to the source folder. If anyone can tell me why they'll get a medal.

    Thanks for the pointer. As I suspected it's going into the source folder. Here are a few exerts:-
    ..\miniperl.exe -I..\lib buildext.pl nmake -nologo perldll.def ..\ +ext<br> Making B<br> nmake -nologo<br> ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib" -MExtUtils::Command + -e cp bin/piconv blib\script\piconv<br> cd ..\pod<br> copy ..\vms\perlvms.pod .\perlvms.pod<br> cd ..\win32<br> ..\perl.exe bin\pl2bat.pl ..\utils\h2ph ..\utils\splain + ..\utils\dprofpp ..\utils\perlbug ..\utils\pl2pm + ..\utils\c2ph<br> xcopy /f /r /i /d bin\*.bat c:\perlc\bin\*.*<br> 0 File(s) copied<br> ..\perl.exe -I..\lib ..\installhtml --podroot=.. --htmldir=./html + --podpath=pod:lib:ext:utils --htmlroot="file://c|\perlc\html" --lib +pod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse xcopy /f /r /i /e /d html\*.* c:\perlc\html\*.*<br> 0 File(s) copied


    It's not till the end that it actually starts putting things in the right place. What file do I need to edit to get it all going in the right place? In my Makefile I have:-
    INST_DRV = c:
    INST_TOP = $(INST_DRV)\perlc

    Any clues would be great.

    Lyle
Re: Win32 Perl build make problem
by NetWallah (Abbot) on Nov 13, 2004 at 00:07 UTC
    My guess is that it expects you to be cd'd into the target folder before running nmake.

        Earth first! (We'll rob the other planets later)

Re: Win32 Perl build make problem
by tachyon (Chancellor) on Nov 13, 2004 at 05:56 UTC

    I agree with NetWallah. As noted in the README.win32 you have to run nmake from within the win32 directory.

    cheers

    tachyon

Re: Win32 Perl build make problem
by cosmicperl (Chaplain) on Nov 15, 2004 at 23:49 UTC
    Hi All,
      I'm alreading running nmake from the win32 subfolder. That's the only place it will run from to pickup the makefile. I tried an older version on nmake, but that made no difference. Looking at the output VC8 was telling me some function calls were depreciated, so I don't think it was working properly despite what it said.

    So now I'm trying MinGW.

    I downloaded the latest from:-
    http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
    And installed. I then grabbed the dmake suggested in the readme.win32 file:-
    http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip

    Set up the PATH to use it and tried 'dmake'

    It seemed to get quite far. There were a few warnings out data types but it kept going. Then it stopped with 'Cannot find BuildInfo.h' I checked and BuildInfo.h is in the source dir. So I copied it to the win32 subfolder, but then got an error 'perldll.i invalid string' or something like that.

    So I then downloaded the gcc2.95.2 as suggest in the readme.win32
    http://downloads.ActiveState.com/pub/staff/gsar/gcc-2.95.2-msvcrt.zip

    I reset the path and wipe and reunzipped the source files to get it all fresh.

    Then when I tried dmake it didn't get very far, giving me this:-

    del /f config.h<br> copy config_H.gc config.h<br> 1 file(s) copied.<br> gcc -c -I.\include -I. -I.. -I..\lib\CORE -DWIN32 -DHAVE_DES_FCRYPT -D +PERLDLL -DPERL_CORE -s -O2 -DPERL_EXTERNAL_GLOB -o.\mini\av.o ..\av.c +<br> In file included from win32thread.h:4,<br> from ..\perl.h:2056,<br> from ..\av.c:22:<br> win32.h:314: warning: `struct _stati64' declared inside parameter list +<br> win32.h:314: warning: its scope is only this definition or declaration +, which is probably not what you want.<br> In file included from win32.h:549,<br> from win32thread.h:4,<br> from ..\perl.h:2056,<br> from ..\av.c:22:<br> win32iop.h:73: warning: `struct _stati64' declared inside parameter li +st<br> win32iop.h:74: warning: `struct _stati64' declared inside parameter li +st<br> win32iop.h:133: warning: `struct _stati64' declared inside parameter l +ist<br> win32iop.h:133: conflicting types for `win32_stat'<br> win32iop.h:74: previous declaration of `win32_stat'<br> In file included from ..\perl.h:3479,<br> from ..\av.c:22:<br> ..\thrdvar.h:85: field `Tstatbuf' has incomplete type<br> ..\thrdvar.h:86: field `Tstatcache' has incomplete type<br> dmake.exe: Error code 1, while making '.\mini\av.o'<br>

    Now I'm going to go back to trying the older compiler as it got further.
Re: Win32 Perl build make problem
by cosmicperl (Chaplain) on Nov 15, 2004 at 23:56 UTC
    What I'm getting for the new mingw and dmake is (only errors and warnings):-
    gcc -c -I.\include -I. -I.. -I..\lib\CORE -DWIN32 -DHAVE_DES_FCRYPT -DPERLDLL -PERL_CORE -s -O2 -o.\mini\win32.o win32.c<br>
    lots of lines like that, then some warnings:-
    win32.c: In function `win32_execv':<br> win32.c:4051: warning: passing arg 3 of `spawnv' from incompatible poi +nter type<br> win32.c:4053: warning: passing arg 2 of `execv' from incompatible poin +ter type<br> win32.c: In function `win32_execvp': win32.c:4073: warning: passing arg 2 of `execvp' from incompatible poi +nter type<br>
    Then a load more like the first with some:-
    C:\Perl\SOURCE\AP810_source\warnings.h -> C:\Perl\SOURCE\AP810_source\lib\CORE\warnings.h<br>
    Then some more warnings:-
    In file included from perllib.c:34:<br> perlhost.h: In function `CPerlHost* IPerlMem2Host(IPerlMem*)': perlhost.h:239: warning: invalid offsetof from non-POD type `class CPe +rlHost'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlMemShared2Host(IPerlMem*)': p +erlhost.h:244: warning: invalid offsetof from non-POD type `class CPe +rlHost'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlMemParse2Host(IPerlMem*)': pe +rlhost.h:249: warning: invalid offsetof from non-POD type `class CPer +lHost'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlEnv2Host(IPerlEnv*)': perlhos +t.h:254: warning: invalid offsetof from non-POD type `class CPerlHost +'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlStdIO2Host(IPerlStdIO*)': per +lhost.h:259: warning: invalid offsetof from non-POD type `class CPerl +Host'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlLIO2Host(IPerlLIO*)': perlhos +t.h:264: warning: invalid offsetof from non-POD type `class CPerlHost +'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlDir2Host(IPerlDir*)': perlhos +t.h:269: warning: invalid offsetof from non-POD type `class CPerlHost +'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlSock2Host(IPerlSock*)': perlh +ost.h:274: warning: invalid offsetof from non-POD type `class CPerlHo +st'; use pointer to member instead<br> perlhost.h: In function `CPerlHost* IPerlProc2Host(IPerlProc*)': perlh +ost.h:279: warning: invalid offsetof from non-POD type `class CPerlHo +st'; use pointer to member instead

    Then:-
    win32.c: In function `win32_execv':<br> win32.c:4051: warning: passing arg 3 of `spawnv' from incompatible poi +nter type<br> win32.c:4053: warning: passing arg 2 of `execv' from incompatible poin +ter type<br> win32.c: In function `win32_execvp': win32.c:4073: warning: passing arg 2 of `execvp' from incompatible poi +nter type<br>
    And finally:-
    perldll.rc:10:23: BuildInfo.h: No such file or directory<br> windres: gcc exited with status 1<br> dmake.exe: Error code 1, while making '.\perldll.res'<br>
    Why isn't it picking up BuildInfo.h? It's in the ../ folder.

    What versions on MinGW and Dmake is everyone else using?

    Lyle
Re: Win32 Perl build make problem
by Anonymous Monk on Dec 02, 2004 at 14:07 UTC
    Download perl from CPAN and you'll have no problems. ActivePerl does a number of modifications to makefiles/etc and the sourcecode they distribute doesn't always work %100

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://407552]
Approved by Arunbear
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-08-30 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls