[31682] in Perl-Users-Digest
Perl-Users Digest, Issue: 2945 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 15 09:09:25 2010
Date: Sat, 15 May 2010 06:09:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 15 May 2010 Volume: 11 Number: 2945
Today's topics:
Re: Debugging question: tracing the origin of an error. <stevem_clipthis_@clubtrout.com>
Re: Debugging question: tracing the origin of an error. <tadmc@seesig.invalid>
Re: MinGW and Perl 5.12 - Windows 32 bits ActiveState <hjp-usenet2@hjp.at>
Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState <sisyphus359@gmail.com>
Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState <dilbert1999@gmail.com>
Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState <ben@morrow.me.uk>
Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState <dilbert1999@gmail.com>
Re: perl format statement, how do I begin a line with a <stevem_clipthis_@clubtrout.com>
Re: perl format statement, how do I begin a line with a <jurgenex@hotmail.com>
Tutorial question - perldoc perlxs - learning how to wr <dilbert1999@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 May 2010 21:10:53 -0700
From: Steve M <stevem_clipthis_@clubtrout.com>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <TfpHn.20263$_84.18717@newsfe18.iad>
On 5/13/2010 10:10 AM, Ted Byers wrote:
> I have done all the usual things (as specified in the FAQ), and more,
> but it isn't enough.
>
> Here is how my script starts:
>
> use strict;
> use warnings;
> use DBI;
> use DateTime::Format::MySQL;
> use Date::Manip;
> use DateTime::Format::DateManip;
>
> BEGIN {
> $SIG{__WARN__} = sub{ print STDERR "Perl: ", @_; };
> $SIG{__DIE__} = sub{ print STDERR "Perl: ", @_; exit 1};
> }
>
> $| = 1;
>
> In the body of the script, this script does very little except make a
> DB connection, place the values from the record set that results from
> a trivial select query into a variable, and then prints it. Then all
> handles are closed and the progrma ends. The error actually arises
> after the last statement (and does not appear in ANY of my other
> scripts that use the packes listed above).
>
> Here is the error statement I get:
>
> Perl: Can't call method "FETCH" on an undefined value at C:/Perl/site/
> lib/Win32/TieRegistry.pm line 1485,<DATA> line 335 during global
> destruction.
>
> At no time have I made direct use of the file mentioned, so it must be
> something one of the above packages has done. However, there is no
> information provided as to what happened that led to this error. It
> does not even say what object is being destructed or what package
> created, or failed to create, it.
>
> How can I modify the signal handling I set up above so that I can get
> this information?
>
> Thanks
>
> Ted
I use the below to trace down this sort of thing.. Posted it in response
to something else (CGI related) a few weeks ago and no one pointed out
any obvious no-no's so it was either more or less acceptable or else was
thought so stupid is was ignored. :-)
Anyway, the meat of the thing uses Perl's caller function and it
iterates back through stack frames recording a trace. Very useful at
times and may help you determine what is going on...
I DID fiddle this a little bit to run from command line (html stuff
removed) so it might have a syntax error, though it doesn't look like it...
# a different approach to trapping errors.....
# screws up eval used as an error trap
$SIG{'__DIE__'} = $SIG{'__WARN__'} = sub {
my $error = shift;
chomp $error;
$error =~ s/[<&>]/"&#".ord($&).";"/ge; # entity escape;
$error = &Caller_error_path( $error,1,0 );
print "$error\n";
exit 0;
};
sub Caller_error_path {
my $error = shift;
my $Shift = shift;
my $Pop = shift;
$error ||= '';
my $i = 0;
my @call_list = ();
while( my($p, $f, $l, $s, $h, $w ) = caller($i++) ){
my $string = '';
$f and $string .= "$f, ";
$l and $string .= "Line: $l\n";
$s and $s !~ /main::__ANON__/ and $string .= "$s, ";
push @call_list, $string;
}
$Shift and shift @call_list;
$Pop and pop @call_list;
@call_list = reverse @call_list;
my $path = "\nTrace:\n";
$path .= join '', @call_list;
return "$path\n$error";
}
hth,
\s
--
"There is no use in your walking five miles to fish when you can depend
on being just as unsuccessful near home." M. Twain
------------------------------
Date: Sat, 15 May 2010 07:39:14 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Debugging question: tracing the origin of an error.
Message-Id: <slrnhut55v.d4c.tadmc@tadbox.sbcglobal.net>
Steve M <stevem_clipthis_@clubtrout.com> wrote:
> no one pointed out
> any obvious no-no's
> $error = &Caller_error_path( $error,1,0 );
You should lose that ampersand.
perldoc -q function
What's the difference between calling a function as &foo and foo()?
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sat, 15 May 2010 11:57:43 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: MinGW and Perl 5.12 - Windows 32 bits ActiveState
Message-Id: <slrnhuss0n.okk.hjp-usenet2@hrunkner.hjp.at>
On 2010-05-14 11:34, Dilbert <dilbert1999@gmail.com> wrote:
> On 13 mai, 20:17, Dilbert <dilbert1...@gmail.com> wrote:
>> On 17 avr, 10:36, sisyphus <sisyphus...@gmail.com> wrote:
>> > In short, for the moment at least, you'd be better off grabbing the
>> > freely available "Microsoft Platform SDK for Windows Server 2003 R2"
>> > compiler and using it with the x64 ActivePerl builds
>>
>> I can't seem to get the Windows *.exe-files I need for 64 bits from
>> MinGW, so I grabbed the freely available Microsoft Visual C++ 2008
>> Compiler (*** a whopping 200 meg !!! ***).
>>
>> I am currently downloading (45%...) ...let's see how this works out...
>
> I have downloaded and installed "Microsoft Platform SDK for Windows
> Server 2003 R2".
>
> Apparently, I can now compile with Visual C++ 2008 ...
>
> ...but the linker complains with a message:
> fatal error LNK1112: module machine type 'X86' conflicts with target
> machine type 'x64'
You are mixing 32-bit ("x86") and 64-bit ("x64") code. You can't do
that. They need to match. If I understood you correctly, your perl is
64-bits, so you need to compile your modules in 64-bit mode, too.
hp
------------------------------
Date: Sat, 15 May 2010 00:56:42 -0700 (PDT)
From: sisyphus <sisyphus359@gmail.com>
Subject: Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState
Message-Id: <e74a55bc-8cb4-4e26-ae46-f84566b8bd20@t34g2000prd.googlegroups.com>
On May 15, 3:41=A0am, Dilbert <dilbert1...@gmail.com> wrote:
>
> It looks very much as if there simply is no 64 bits in the free
> available compiler from Microsoft, only 32 bits :(
It's still there - though it looks a 32 bit application is being
found.
What command are you running to set the environment ?
What does the 'cl /?' output begin with ? It should be something like:
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for
AMD64
Copyright (C) Microsoft Corporation. All rights reserved.
>
> Whatever the outcome of my battle with MS VC++ will be, I will be
> relieved when "ppm install MinGW" works on 64 bit Windows.
According to Jan Dubois, that probably won't be for a couple of months
(at least). ActivePerl 5.12.0 needs some patching before it will work
with the MinGW64 compilers. I have patches that enable this (included
below)- they're a bit of a hack, and quite possibly *not* the way that
ActiveState will deal with the issues. But they've been working fine
for me, and you're welcome to give them a try. (I'd be interested to
hear of any problems you strike if you do use them - feel free to
email me at my CPAN address.)
For the MinGW64 compiler, you go to http://sourceforge.net/projects/mingw-w=
64/files
, as you've already discovered. Under "Toolchains targetting Win64"
grab either one of the "personal builds" or one of the "automated
builds" that has been built for win64 mingw (not for linux or cygwin)
- and make sure it's a 64-bit build (as they're also providing a 32-
bit compiler). The "automated builds" are a cross-compiler with the
names of the executables prefixed with "x86_64-w64-mingw32-" (ie
"x86_64-w64-mingw32-gcc.exe", etc.), so it might be simpler if you
choose the "sezero_20100428" build ("mingw-w64-bin_x86_64-
mingw_20100428_sezero.zip"). My patches accommodate both types of
build.
Then just unzip and add the bin folder to the path.
Cheers,
Rob
Patch to lib/ExtUtils/MM_Win32.pm (ActivePerl build 1200):
##################################################
--- MM_Win32.pm_orig Sat Apr 17 13:38:04 2010
+++ MM_Win32.pm Wed Apr 21 17:40:30 2010
@@ -33,7 +33,9 @@
my $BORLAND =3D $Config{'cc'} =3D~ /\bbcc/i ? 1 : 0;
my $GCC =3D $Config{'cc'} =3D~ /\bgcc/i ? 1 : 0;
-my $DLLTOOL =3D $Config{'dlltool'} || 'dlltool';
+my $dlltool =3D $Config{'cc'} =3D~ /x86_64\-w64\-mingw32\-/i ? 'x86_64-
w64-mingw32-dlltool'
+ : 'dlltool';
+my $DLLTOOL =3D $Config{'dlltool'} || $dlltool;
=3Dhead2 Overridden methods
@@ -359,8 +361,17 @@
sub init_linker {
my $self =3D shift;
-
- $self->{PERL_ARCHIVE} =3D "\$(PERL_INC)\\$Config{libperl}";
+
+ if($GCC &&
+ $Config{libperl} =3D~ /\.lib/ &&
+ $Config{archname} =3D~ /\-x64/) {
+ my $libperl =3D $Config{libperl};
+ $libperl =3D~ s/\.lib/\.dll/;
+ $self->{PERL_ARCHIVE} =3D "$Config{bin}\\$libperl";
+ }
+ else {
+ $self->{PERL_ARCHIVE} =3D "\$(PERL_INC)\\$Config{libperl}";
+ }
$self->{PERL_ARCHIVE_AFTER} =3D '';
$self->{EXPORT_LIST} =3D '$(BASEEXT).def';
}
##################################################
Patch to lib/ActivePerl/Config.pm (ActivePerl build 1200):
##################################################
--- Config.pm_orig Sat Apr 17 12:27:02 2010
+++ Config.pm Mon May 3 12:54:59 2010
@@ -34,8 +34,11 @@
quadtype
uquadtype
d_casti32
-);
+ dlltool
+); # libperl needs to be inserted into above list (and
appropriate _override() uncommented below)
+ # if we want to link to libperl512.a instead of perl512.dll -
SISYPHUS
my $compiler_env_initialized;
+my $gcc_pre =3D '';
use Config ();
my $CONFIG_OBJ =3D tied %Config::Config;
@@ -98,12 +101,16 @@
}
elsif ($^O eq "MSWin32" && (_gcc_requested() || !
ActiveState::Path::find_prog(_orig_conf("cc")))) {
my $gcc =3D _find_prog("gcc");
+ if(!$gcc) {
+ $gcc_pre =3D 'x86_64-w64-mingw32-';
+ $gcc =3D _find_prog("${gcc_pre}gcc");
+ }
if (!$gcc && _install_mingw($key)) {
$gcc =3D _find_prog("gcc");
}
if ($gcc) {
# assume MinGW or similar is available
- $gcc =3D _get_short_path_name($gcc);
+ unless($gcc_pre) {$gcc =3D _get_short_path_name($gcc);}
$gcc =3D~ s,\\,/,g;
my($mingw) =3D $gcc =3D~ m,^(.*)/bin/gcc\.exe$,;
if (defined $mingw) {
@@ -134,7 +141,7 @@
# New: "-lfoo -lbar"
my @libs =3D split / +/, _orig_conf($key);
# Filter out empty prefix and oldnames.lib
- @libs =3D grep {$_ && $_ ne "oldnames.lib"} @libs;
+ @libs =3D grep {$_ && $_ ne "oldnames.lib" && $_ ne
"bufferoverflowU.lib"} @libs;
# Remove '.lib' extension and add '-l' prefix
s/(.*)\.lib$/-l$1/ for @libs;
_override($key, join(' ', @libs));
@@ -150,24 +157,25 @@
_override("cpp", "$gcc -E");
_override("cpprun", "$gcc -E");
_override("cppminus", "-");
- _override("ar", _find_prog("ar"));
- _override("ld", _find_prog("g++"));
+ _override("ar", _find_prog("${gcc_pre}ar"));
+ _override("ld", _find_prog("${gcc_pre}g++"));
_override("_a", ".a");
_override("_o", ".o");
_override("obj_ext", ".o");
_override("lib_ext", ".a");
- _override("optimize", "-O2");
+ _override("optimize", "-s -O2");
_override("i64type", "long long");
_override("u64type", "unsigned long long");
_override("quadtype", "long long");
_override("uquadtype", "unsigned long long");
_override("d_casti32", "define");
+ #_override("libperl", "libperl512.a");
# Extract all library paths from lddlflags
my @libpaths =3D map "-L$_", map /^-libpath:(.+)/,
_orig_conf("lddlflags") =3D~ /(?=3D\S)(?>[^"\s]+|"[^"]*")+/g;
- _override("lddlflags", join(" ", "-mdll", @libpaths));
- _override("ldflags", join(" ", @libpaths));
+ _override("lddlflags", join(" ", "-s -mdll", @libpaths));
+ _override("ldflags", join(" ", '-s', @libpaths));
}
elsif (_gcc_requested()) {
warn "Cannot find gcc on PATH\n"
##################################################
------------------------------
Date: Sat, 15 May 2010 03:24:07 -0700 (PDT)
From: Dilbert <dilbert1999@gmail.com>
Subject: Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState
Message-Id: <ad366414-b198-421b-beab-7e593bad5616@q13g2000vbm.googlegroups.com>
On 15 mai, 09:56, sisyphus <sisyphus...@gmail.com> wrote:
> On May 15, 3:41=A0am, Dilbert <dilbert1...@gmail.com> wrote:
> > It looks very much as if there simply is no 64 bits in the free
> > available compiler from Microsoft, only 32 bits :(
>
> It's still there - though it looks a 32 bit application is being
> found.
> What command are you running to set the environment ?
> What does the 'cl /?' output begin with ? It should be something like:
>
> Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for
> AMD64
> Copyright (C) Microsoft Corporation. =A0All rights reserved.
My "cl" clearly indicates a 32 bit application:
++ C:\>cl /?
++ Compilateur d'optimisation Microsoft (R) 32=A0bits C/C++
++ version=A015.00.30729.01 pour 80x86
++ Copyright (C) Microsoft Corporation. All rights reserved.
However, I am on 64 bit Windows Vista with a 64 bit Activestate Perl
installation:
++ C:\>perl -v
++ This is perl 5, version 12, subversion 0 (v5.12.0) built for
++ MSWin32-x64-multi-thread
++ (with 1 registered patch, see perl -V for more detail)
++ Copyright 1987-2010, Larry Wall
++ Binary build 1200 [292396] provided by ActiveState
++ http://www.ActiveState.com
++ Built Apr 10 2010 22:58:59
I have downloaded the freely available VC++ compiler from
http://msdn.microsoft.com/fr-fr/express/aa975050.aspx
The vcvarsall.bat command that sets the environment variables is
located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC:
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>dir
++ Le volume dans le lecteur C s'appelle HP
++ Le num=E9ro de s=E9rie du volume est BA3E-0466
++
++ R=E9pertoire de C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC
++
++ 15/05/2010 11:45 <REP> .
++ 15/05/2010 11:45 <REP> ..
++ 14/05/2010 13:20 <REP> bin
++ 13/05/2010 20:17 <REP> Express
++ 13/05/2010 20:18 <REP> include
++ 13/05/2010 20:18 <REP> lib
++ 13/05/2010 20:17 <REP> Profile
++ 13/05/2010 20:17 <REP> redist
++ 13/05/2010 20:17 <REP> VCNewItems
++ 13/05/2010 20:18 <REP> vcpackages
++ 13/05/2010 20:18 <REP> VCProjectDefaults
++ 13/05/2010 20:18 <REP> vcprojectitems
++ 13/05/2010 20:18 <REP> vcprojects
++ 05/01/2005 16:51 1=A0247 vcvarsall.bat
++ 13/05/2010 20:17 <REP> VCWizards
++ 1 fichier(s) 1=A0247 octets
Here is an extract from "vcvarsall.bat":
++ @echo off
++ if "%1" =3D=3D "" goto x86
++ if not "%2" =3D=3D "" goto usage
++
++ if /i %1 =3D=3D x86 goto x86
++ if /i %1 =3D=3D amd64 goto amd64
++ if /i %1 =3D=3D x64 goto amd64
++ if /i %1 =3D=3D ia64 goto ia64
++ if /i %1 =3D=3D x86_amd64 goto x86_amd64
++ if /i %1 =3D=3D x86_ia64 goto x86_ia64
++ goto usage
++
++ :x86
++ if not exist "%~dp0bin\vcvars32.bat" goto missing
++ call "%~dp0bin\vcvars32.bat"
++ goto :eof
++
++ :amd64
++ if not exist "%~dp0bin\amd64\vcvarsamd64.bat" goto missing
++ call "%~dp0bin\amd64\vcvarsamd64.bat"
++ goto :eof
++
++ :ia64
++ if not exist "%~dp0bin\ia64\vcvarsia64.bat" goto missing
++ call "%~dp0bin\ia64\vcvarsia64.bat"
++ goto :eof
++
++ :x86_amd64
++ if not exist "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" goto missing
++ call "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat"
++ goto :eof
++
++ :x86_ia64
++ if not exist "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat" goto missing
++ call "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat"
++ goto :eof
I have tried the command vcvarsall with "amd64", "x64", "ia64",
"x86_amd64" and with "x86_ia64", but no success:
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
amd64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall x64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
ia64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
x86_amd64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
x86_ia64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>dir
++ Le volume dans le lecteur C s'appelle HP
++ Le num=E9ro de s=E9rie du volume est BA3E-0466
Well, not surprising at all, because the corresponding sub directories
("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
do not exist:
++ R=E9pertoire de C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
\bin
++
++ 14/05/2010 13:20 <REP> .
++ 14/05/2010 13:20 <REP> ..
++ 13/05/2010 20:17 <REP> 1036
++ 31/07/2008 15:52 165=A0376 atlprov.dll
++ 31/07/2008 15:52 77=A0312 bscmake.exe
++ 31/07/2008 15:52 677=A0872 c1.dll
++ 31/07/2008 15:52 2=A0326=A0520 c1xx.dll
++ 31/07/2008 15:52 2=A0363=A0888 c2.dll
++ 31/07/2008 15:52 129=A0520 cl.exe
++ 29/07/2008 02:57 289 cl.exe.config
++ 31/07/2008 15:52 33=A0784 cvtres.exe
++ 31/07/2008 15:52 17=A0920 dumpbin.exe
++ 31/07/2008 15:52 17=A0920 editbin.exe
++ 13/05/2010 20:18 <REP> fr
++ 31/07/2008 15:52 17=A0912 lib.exe
++ 31/07/2008 15:06 801=A0272 link.exe
++ 29/07/2008 02:57 289 link.exe.config
++ 31/07/2008 15:52 361=A0968 ml.exe
++ 31/07/2008 13:31 72=A0192 msobj80.dll
++ 29/07/2008 13:36 193=A0536 mspdb80.dll
++ 29/07/2008 13:36 288=A0768 mspdbcore.dll
++ 29/07/2008 13:36 107=A0520 mspdbsrv.exe
++ 31/07/2008 15:52 94=A0200 nmake.exe
++ 31/07/2008 15:52 20=A0480 undname.exe
++ 07/03/2007 16:44 31 vcvars32.bat
++ 31/07/2008 15:52 40=A0448 xdcmake.exe
++ 29/07/2008 02:57 289 xdcmake.exe.config
++ 23 fichier(s) 7=A0809=A0306 octets
What does exist, however, is "bin\vcvars32.bat", so let's try the only
option that's available: "vcvarsall x86"
++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall x86
++ Setting environment for using Microsoft Visual Studio 2008 x86
tools.
Well, it's certainly not 64 bits, but as I said, it's the only option
available.
Here are the relevant environment variables:
C:\>set
INCLUDE=3DC:\Program Files (x86)\Microsoft Visual Studio 9.0\Include;C:
\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include;C:\Program
Files\Microsoft SDKs\Windows\v6.1\Include;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Include\gl; C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\include
LIB=3DC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Lib\amd64;C:
\Program Files\Microsoft SDKs\Windows\v6.1\Lib\X64;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\lib
LIBPATH=3DC:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows
\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft
Visual Studio 9.0\VC\LIB
Path=3DC:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:
\Windows\System32\Wbem;c:\Program Files (x86)\Microsoft SQL Server
\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS
\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
> > Whatever the outcome of my battle with MS VC++ will be, I will be
> > relieved when "ppm install MinGW" works on 64 bit Windows.
>
> According to Jan Dubois, that probably won't be for a couple of months
> (at least). ActivePerl 5.12.0 needs some patching before it will work
> with the MinGW64 compilers. I have patches that enable this (included
> below)- they're a bit of a hack, and quite possibly *not* the way that
> ActiveState will deal with the issues. But they've been working fine
> for me, and you're welcome to give them a try. (I'd be interested to
> hear of any problems you strike if you do use them - feel free to
> email me at my CPAN address.)
>
> For the MinGW64 compiler, you go tohttp://sourceforge.net/projects/mingw-=
w64/files
> , as you've already discovered. Under "Toolchains targetting Win64"
> grab either one of the "personal builds" or one of the "automated
> builds" that has been built for win64 mingw (not for linux or cygwin)
> - and make sure it's a 64-bit build (as they're also providing a 32-
> bit compiler). The "automated builds" are a cross-compiler with the
> names of the executables prefixed with "x86_64-w64-mingw32-" (ie
> "x86_64-w64-mingw32-gcc.exe", etc.), so it might be simpler if you
> choose the "sezero_20100428" build ("mingw-w64-bin_x86_64-
> mingw_20100428_sezero.zip"). My patches accommodate both types of
> build.
>
> Then just unzip and add the bin folder to the path.
> Patch to lib/ExtUtils/MM_Win32.pm (ActivePerl build 1200):
> Patch to lib/ActivePerl/Config.pm (ActivePerl build 1200):
I will try downloading "mingw-w64-bin_x86_64-
mingw_20100428_sezero.zip" with your suggested patches to "lib/
ExtUtils/MM_Win32.pm" and "lib/ActivePerl/Config.pm".
I will let you know how I get on.
Thanks for your help
------------------------------
Date: Sat, 15 May 2010 12:37:07 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState
Message-Id: <3kd2c7-1dr1.ln1@osiris.mauzo.dyndns.org>
Quoth Dilbert <dilbert1999@gmail.com>:
>
> I have tried the command vcvarsall with "amd64", "x64", "ia64",
> "x86_amd64" and with "x86_ia64", but no success:
>
> ++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
> amd64
> ++ The specified configuration type is missing. The tools for the
> ++ configuration might not be installed.
> Well, not surprising at all, because the corresponding sub directories
> ("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
> do not exist:
It looks like you've either downloaded the wrong package, or not
installed everything. Did the installer ask you any questions about
64bit versions of the compiler?
Ben
------------------------------
Date: Sat, 15 May 2010 05:27:57 -0700 (PDT)
From: Dilbert <dilbert1999@gmail.com>
Subject: Re: MinGW and Perl 5.12 - Windows 64 bits ActiveState
Message-Id: <fd642c15-aa93-4559-8f96-9d6c7d7f2d5c@f14g2000vbn.googlegroups.com>
On 15 mai, 13:37, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Dilbert <dilbert1...@gmail.com>:
> > I have tried the command vcvarsall with "amd64", "x64", "ia64",
> > "x86_amd64" and with "x86_ia64", but no success:
>
> > ++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
> > amd64
> > ++ The specified configuration type is missing. =A0The tools for the
> > ++ configuration might not be installed.
> > Well, not surprising at all, because the corresponding sub directories
> > ("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
> > do not exist:
>
> It looks like you've either downloaded the wrong package,
I have downloaded it from
http://msdn.microsoft.com/fr-fr/express/aa975050.aspx
is this the correct package ?
is this the latest package?
> or not installed everything. Did the installer ask you any
> questions about 64bit versions of the compiler?
I can't remember any question about 64 or 32 bit versions during the
install.
Does anybody know
- where to download and
- how to install
the free MS VC++ Express compiler for 64 bits ?
------------------------------
Date: Fri, 14 May 2010 21:16:46 -0700
From: Steve M <stevem_clipthis_@clubtrout.com>
Subject: Re: perl format statement, how do I begin a line with a hash mark?
Message-Id: <glpHn.20264$_84.854@newsfe18.iad>
On 5/14/2010 2:24 PM, Tad McClellan wrote:
> John Bokma<john@castleamber.com> wrote:
>
>> posting top not for you thank.
>
>
> one good!
>
>
Hmmmm... in the spirit of the endless quibble, shouldn't the punctuation
operator lead, as in:
!one Good
:-)
\s
--
"There is no use in your walking five miles to fish when you can depend
on being just as unsuccessful near home." M. Twain
------------------------------
Date: Sat, 15 May 2010 05:22:07 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: perl format statement, how do I begin a line with a hash mark?
Message-Id: <m74tu5l1gbvck3jc2no0o6vumiodij5oud@4ax.com>
joinerda <joinerda@gmail.com> wrote:
>I would like to use a perl format statement to autogenerate qsub files
If I remember correctly there have been previous discussions about
format() and the general consensus was to use printf() instead, AFAIR
because printf() is easier to use and has less problems than format().
jue
------------------------------
Date: Sat, 15 May 2010 05:17:47 -0700 (PDT)
From: Dilbert <dilbert1999@gmail.com>
Subject: Tutorial question - perldoc perlxs - learning how to write XS-based code
Message-Id: <b9891365-d4c6-4290-9b5e-49a27afb3292@z33g2000vbb.googlegroups.com>
I have been using swig http://www.swig.org/ to incorporate simple C
subroutines into my Perl programs. That works fine, no complaint at
all.
However, I would now like to get my hands dirty and learn how to
communicate between Perl and C from the bottom up using XS-code.
I am thinking about reading "perldoc perlxs", but before I embark on
that adventure, I would ask for your oppinion:
- Would you recommed reading "perldoc perlxs" ?
- Are there any other tutorials ?
For example, if I wrote a C-function
first_test(int i, double d, char* s)
that returns a list -- three values:
* the first value is i - 1234
* the second value is d / 4.2
* the third value is a string "<".s.">".
My first beginner questions would be like:
- How do parameters get passed into the C-function ?
- What happens if Perl gives a string, but the C-function expects a
double ?
- What happens if Perl gives a double, but the C-function expects a
string ?
- How can a C-function return a list of values ?
- Do I need to allocate (malloc ?) memory to return values ?
- Who is reponsible for garbage collections of the allocated memory ?
- Can I pass / return more complicated data structures (hashes of
hashes, lists of lists, etc...) ?
Many questions, but I don't expect an immediate answer. What I really
want to know is: what would be the best tutorial for me ?
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 2945
***************************************