Re: Building Text::Iconv on Windows
- From: sisyphus359@xxxxxxxxx
- Date: Mon, 01 Oct 2007 01:35:23 -0700
On Sep 30, 11:58 pm, Michael Piotrowski <m...@xxxxxxxxxxx> wrote:
Hi,
I'm the author of the Text::Iconv module. Quite often I'm getting
requests from Windows users about building Text::Iconv on Windows,
probably because a binary version is not available from ActiveState.
There is a binary of version 1.4 available from the Uwinnipeg rep:
ppm install http://theoryx5.uwinnipeg.ca/ppms/Text-Iconv.ppd
(That binary would probably be updated to 1.5 if requested.)
Looks like the ActiveState build (which is an automated procedure)
fails because the iconv lib can't be found. At
http://ppm.activestate.com/BuildStatus/5.8-windows/windows-5.8/Text-Iconv-1.5.txt
we find:
Checking for iconv ... The system cannot find the path specified.
The system cannot find the path specified.
fail
Failed to find iconv, please check your settings and re-run as:
D:\cpanrun\build\5-8-0\bin\perl.exe Makefile.PL LIBS='-L/path/to/lib'
INC='-I/path/to/include'
(It's quite likely that ActiveState don't have iconv installed,
anyway.)
I'd like to help, but since I don't have access to a Windows system, I
can't say much. It does seem that people have succeeded in building
Text::Iconv on Windows, unfortunately I've never gotten feedback, so I
don't know whether there are any issues.
There's a problem in the Makefile.PL with linktest(). It's easy to
fix. On Win32 '/dev/null' does not exist - you want simply 'nul'.
Portably, you would use File::Spec->devnull.
use File::Spec;
my $devnull = File::Spec->devnull();
my $compile_line = "$compile -o $file $file.c $libs 2> $devnull";
With that change in place the following command worked fine for me
(with Text-Iconv-1.5):
perl Makefile.PL INC="-IC:/_32/msys/1.0/local/include" LIBS="-LC:/_32/
msys/1.0/local/lib -liconv"
And the 'dmake test' and 'dmake install' steps also proceeded without
error.
So, I'd like to ask people who've built Text::Iconv to please help me
out here. What tools did you use? Where can you get them? Did you
need to make any changes in the Makefile.PL or in Iconv.xs?
My method of getting the iconv library is probably not a very common
one. I built (using the MinGW port of gcc) from libiconv-1.11.tar.gz
source in the msys shell by running './configure --disable-shared --
enable-static', 'make' and 'make install'.
More commonly, folk will probably use an iconv library built using MS
Visual Studio. There's probably a dynamic (shared) Visual Studio built
library available on the web - and perhaps a static build, too.
The make utility (dmake) and the compiler that I use (MinGW port of
gcc) to build perl extensions are both freely available and work
seamlessly with the latest build of ActivePerl.
In general, irrespective of how Win32 folk get hold of the iconv
library and irrespective of the compiler/make they use to build their
perl extensions, it should make no difference to the Makefile.PL
that's needed. (It would be possible to construct exceptions ... but
that's not really your responsibility, imo.) All you really need to do
is attend to the /dev/null issue in the Makefile.PL.
Cheers,
Rob
.
- Follow-Ups:
- Re: Building Text::Iconv on Windows
- From: Michael Piotrowski
- Re: Building Text::Iconv on Windows
- Next by Date: Using external REXX function libraries with PERL
- Next by thread: Re: Building Text::Iconv on Windows
- Index(es):
Relevant Pages
|
|