The evolving Phase 2 UTF-8 support in
TWikiAlphaRelease, outlined on
ProposedUTF8SupportForI18N, works best with Perl 5.8 (though the Phase 1 UTF-8 URL support works with Perl 5.005 or higher). I recently ran into an issue building Perl on a web host, so I thought I'd document it here. I had this problem with
Dreamhost, but other web hosts may have a similar setup and hence the same issue.
If you build your own copy of Perl 5.8 and are using
TWikiOnWebHostingSites, you may get a problem whereby the
CPAN:Cwd
module's
getcwd function fails because it can't
chdir ".." all the way to the
/ directory (may be something to do with NFS but is more likely just due to security setup at
Dreamhost). I've attached a rough patch for Perl 5.8's Cwd.pm module - not suitable for integation into the Perl mainline but it works well enough to let the Perl build process complete.
Perl 5.6 also has this problem by the way, it's just that not many people need to build Perl 5.6 from source these days - in both Perl 5.6 and 5.8, the Perl build process uses
getcwd, a faster and more risky version of
cwd, provided by
CPAN:Cwd
.
Here's the problem (on the unfixed version of
Cwd.pm):
[fud:rdonkin]$ perl -e 'use Cwd; print "Cwd is ".Cwd::cwd()."\n"'
Cwd is /home/.aurey/rdonkin
[fud:rdonkin]$ perl -e 'use Cwd; print "Cwd is ".Cwd::getcwd()."\n"'
opendir(./..): Permission denied at -e line 1
Cwd is
[fud:rdonkin]$ perl -v
This is perl, v5.6.1 built for i386-linux
...
The solution is to un-tar the Perl source to
perl-5.8.3, then apply the attached patch using something like
patch -i Cwd.patch while in the parent of
perl-5.8.3. Then just do the normal build process. (The patch might work on other versions of Perl, you never know).
One other problem - on Dreamhost, processes tended to die (saying 'Killed' but with no other error message) part way through the process. This might be due to OS-level CPU limits, but in any case simply re-doing the
make command resumed from where the problem happened.
--
RichardDonkin - 29 Jan 2004
There is now a
patch to Perl 5.8.8
to fix this issue with
CPAN:Cwd
on Dreamhost - this patch should also make it into the forthcoming Perl 5.10.1.
--
RichardDonkin - 06 Mar 2008