Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: Compile PERL from source on Windows

by MGoBlue (Novice)
on Mar 22, 2013 at 21:52 UTC ( #1024985=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Compile PERL from source on Windows
in thread Compile PERL from source on Windows

Thanks Rob!

I'm on 32 bit XP right now. I originally tried this on a 64 bit Win 7 -- with either archecture, I get the same error though. At least I'm consistent.

my preldelta matches. It should. I didn't modify it.

=encoding utf8 =head1 NAME perldelta - what is new for perl v5.16.3 =head1 DESCRIPTION

I did try to see what is in $contents and nothing was there. If I modify pod_lib.pl like so:

open Fpod, $filename or die "Can't read $filename: $!"; local $/; my $filepod = <Fpod>; close Fpod; my $contents = $filepod;

then that gets me past the original problem of "Can't extract version from pod/perldelta.pod"... that is fixed from the code snip just above.

However, with using that code snippet, it now throws another error later down in pod_lib.pl. At this point, I have an uneasy feeling about chasing modifications to pod_lib code when it has worked for others out of the box.

Thanks!


Comment on Re^6: Compile PERL from source on Windows
Select or Download Code
Re^7: Compile PERL from source on Windows
by syphilis (Canon) on Mar 23, 2013 at 07:44 UTC
    I did try to see what is in $contents and nothing was there.

    Do you have a functioning perl already built on your machine ? If you do, try running the following script. (In that script you'll first need to change $filename to point to the full path to pod/perldelta.pod on your machine.)
    ## script.pl ## use warnings; use strict; my $filename = 'C:/comp/perl-5.16.3/pod/perldelta.pod'; open RD, '<', $filename or die "Can't read: $!"; my @c = <RD>; my $contents = join '', @c; close RD or die "Can't close: $!"; my @want = $contents =~ /perldelta - what is new for perl v(5)\.(\d+)\.(\ +d+)\n/; die "Can't extract version from $filename" unless @want; print "\n@want\n";
    That script should reveal that @want contains (5, 16,3). Is that what you get ?

    Then try running the same script using the perl that you've just built with your compiler. (That perl is located in the top level source folder - ie one level up from the win32 folder.)

    To do that, cd to that top level source folder and run perl /full/path/to/above/script.pl.
    How does that fare ?
    (While you're in that folder, you might also like to check the output of perl -V just to verify that the perl that's being run is, in fact, the one that you've just built. The @INC listing at the end should *not* contain a site/lib directory, and the first directory listed should be in your source tree. )

    Sorry - out of time for tonight, but I can pick this up again tomorrow morning if need be.

    Cheers,
    Rob

      Thanks for the reply... I copied your code and put it in a file called C:\Temp\testme.pl

      That script should reveal that @want contains (5, 16,3). Is that what you get ?

      No, that is NOT what I get. I get the same error as before...

      perl testme.pl Can't extract version from C:/Temp/perl-5.16.3/pod/perldelta.pod at testme.pl line 17.

      Then try running the same script using the perl that you've just built with your compiler. (That perl is located in the top level source folder - ie one level up from the win32 folder.)

      So I change directories to C:\Temp\perl-5.16.3\ and run perl c:/Temp/testme.pl and it works!

      C:\Temp\perl-5.16.3>perl c:/Temp/testme.pl 5 16 3

      While you're in that folder, you might also like to check the output of perl -V

      Here's a dump of perl -V

      C:\Temp\perl-5.16.3>perl -V Summary of my perl5 (revision 5 version 16 subversion 3) configuration +: Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D +_CONSOLE - DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DP +ERL_TEXTMO DE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='16.00.30319.01', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -l +ibpath:"c: \perl\5.16.3\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' + name='Mic rosoft.Windows.Common-Controls' version='6.0.0.0' processorArchitectur +e='*' publ icKeyToken='6595b64144ccf1df' language='*'"' libpth=\lib libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib +comdlg32.l ib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid. +lib ws2_32 .lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.l +ib msvcrt. lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.l +ib comdlg 32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib u +uid.lib ws 2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl +32.lib msv crt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl516.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt: +ref,icf - libpath:"c:\perl\5.16.3\lib\CORE" -machine:x86 "/manifestdependency:t +ype='Win32 ' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processor +Architectu re='*' publicKeyToken='6595b64144ccf1df' language='*'"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB +_ALLOC USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Mar 20 2013 17:38:57 %ENV: PERL_INLINE_JAVA_JNI="1" @INC: C:/Temp/perl-5.16.3/lib . C:\Temp\perl-5.16.3>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2014-10-20 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (75 votes), past polls