ActiveState vs. "C:\Program Files\" and "C:\Progra~1\"

P

pt

note: this post started off as a question, but turned into a blog and
eventually became an answer. I just hate to have anyone else go
through all this nonsense, so I figured I'd post it as an example of
"when in doubt, google it out".


I successfully installed ActiveState 5.8.8 (after uninstalling
5.6.something) on an XP laptop. I installed it to "C:\Program FIles
\Activestate.com\Perl". After the install, I changed the "Program
files" part of the ActiveState dirs in my PATH env var from long DOS
format to 8.3 format:
"C:\Program Files\ActiveState.com\Perl\site\bin"
to
"C:\Progra~1\ActiveState.com\Perl\site\bin"
and
"C:\Program Files\ActiveState.com\Perl\bin"
to
"C:\Progra~1\ActiveState.com\Perl\bin"

Now, when I attempt to build a CPAN module (BitTorrent), I get:
<pre>
C:\blah... \BitTorrent>perl makefile.pl
Have C:\Progra~1\ActiveState.com\Perl\lib\Config.pm expected C:
\Program Files\ActiveState.com\Perl\lib\Config.pm
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [lib]
Config says: [MSWin32-x86-multi-thread]
This may or may not cause problems. Please check your installation of
perl
if you have problems building this extension.
Writing Makefile for BitTorrent
</pre>


It *looks* like Perl is just unhappy about the directory rename. I
changed the PATH back to the original install dir and the new message
is:

C:\blahblah...\BitTorrent>perl -c Makefile.PL
Makefile.PL syntax OK

C:\blahblah...\BitTorrent>perl Makefile.PL
Unable to find a perl 5 (by these names:
C:\Program Files\ActiveState.com\Perl\bin\perl.exe
perl.exe perl5.exe perl5.8.8.exe miniperl.exe, in these dirs:
 
S

Sisyphus

pt said:
note: this post started off as a question, but turned into a blog and
eventually became an answer. I just hate to have anyone else go
through all this nonsense, so I figured I'd post it as an example of
"when in doubt, google it out".


I successfully installed ActiveState 5.8.8 (after uninstalling
5.6.something) on an XP laptop. I installed it to "C:\Program FIles
\Activestate.com\Perl".

The advice usually offered is to simply not install perl into any directory
containing white space. (There's no need to place perl in any particular
location.)
You're free, of course, to ignore that advice - in which case you can come
up against the issues you have encountered. But if you installed ActivePerl
into, eg, C:\Perl (so that the path to the perl executable is simply
C:\Perl\bin) things should work fine.
After the install, I changed the "Program
files" part of the ActiveState dirs in my PATH env var from long DOS
format to 8.3 format:
"C:\Program Files\ActiveState.com\Perl\site\bin"
to
"C:\Progra~1\ActiveState.com\Perl\site\bin"

Does that location actually exist ? I've never known ActivePerl to create a
perl\site\bin folder.
and
"C:\Program Files\ActiveState.com\Perl\bin"
to
"C:\Progra~1\ActiveState.com\Perl\bin"

Now, when I attempt to build a CPAN module (BitTorrent), I get:
<pre>
C:\blah... \BitTorrent>perl makefile.pl
Have C:\Progra~1\ActiveState.com\Perl\lib\Config.pm expected C:
\Program Files\ActiveState.com\Perl\lib\Config.pm
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [lib]
Config says: [MSWin32-x86-multi-thread]
This may or may not cause problems. Please check your installation of
perl
if you have problems building this extension.
Writing Makefile for BitTorrent
</pre>


It *looks* like Perl is just unhappy about the directory rename. I
changed the PATH back to the original install dir and the new message
is:

C:\blahblah...\BitTorrent>perl -c Makefile.PL
Makefile.PL syntax OK

C:\blahblah...\BitTorrent>perl Makefile.PL
Unable to find a perl 5 (by these names:
C:\Program Files\ActiveState.com\Perl\bin\perl.exe
perl.exe perl5.exe perl5.8.8.exe miniperl.exe, in these dirs:
.
c:\Program Files\rubyforge.org\ruby\bin
c:\usr\local\wbin
C:\Program Files\ActiveState.com\Perl\site\bin
C:\Program Files\ActiveState.com\Perl\bin
C:\WINDOWS\system32 C:\WINDOWS
C:\WINDOWS\System32\Wbem
c:\progra~1\utils
C:\Progra~1\apachefriends.org\xampp\MySQL\bin
C:\Program Files\Perforce
C:\Program Files\QuickTime\QTSystem\
C:\PVCS\NT
c:\progra~1\vslick\win
C:\Progra~1\nmap \bin
C:\Progra~1\airsnort\bin
C:\progra
.... etc....

So that fixed the one problem, and brough up another. I dug up this
suggestion:
http://aspn.activestate.com/ASPN/Mail/Message/activeperl/556006
and added the PERL line to the Makefile.pl

It has been a long time since I've seen the need to apply that fix ....
probably more than 2 years.
Are you using the latest build (820) of ActivePerl :

perl -e "print $ActivePerl::VERSION"
That allowed the Makefile to be generated without errors, but running
it had problems:
C:\blahblah...\Convert-Bencode-1.03>nmake -f Makefile

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'C:\Program'
Stop.

That's a fairly old version of nmake. There are problems with it, though I'm
not sure that this is one of those problems.
More recent versions of nmake are freely available from Microsoft, but I
don't have a link. You should try to get a more recent version.
(If that's your real email address, you might find a more recent version
turns up in your inbox.)
I modified all instances of "Program files" in the Makefile to
"Progra~1" and the makefile worked ("test" and "install"). I think
the next step is to uninstall 5.8.8 and re-install it but specifying
an install dir of "C:\Progra~1\...etc". I guess this new-fangled
"Windows" operating system with the pesky ASCII "space" char in files
and paths is just too much for some people to understand.

My understanding is that the "space" shouldn't be posing much of a problem
these days - but I still recommend avoiding directories with spaces, just to
be safe.

You might consider to switching to 'dmake' and the MinGW compiler - both of
which are freely available and work fine with ActivePerl.

Then again ... you could alternatively install Strawberry Perl (
http://vanillaperl.com/ ) - which is a Win32 build of perl that already has
'dmake' and the MinGW compiler bundled with it.

Cheers,
Rob
 
M

Mirco Wahab

Sisyphus said:
Does that location actually exist ? I've never known ActivePerl to
create a perl\site\bin folder.

This was introduced with Build 820 (Jan 2007),
these directories ( /site/bin and /site/lib )
are empty after installation.



Regards

M.
 
S

Sisyphus

Mirco Wahab said:
This was introduced with Build 820 (Jan 2007),
these directories ( /site/bin and /site/lib )
are empty after installation.

I think the empty site/lib folder started with build 819 (accompanied by a
change in the order of the @INC directories), but I hadn't heard anything
about the creation of a site\bin folder. (I have the 32-bit build of 819 and
the 64-bit build of 820, neither of which contain a site\bin folder.)

Thanks for the info, Mirco.

Cheers,
Rob
 
M

Mirco Wahab

Sisyphus said:
I think the empty site/lib folder started with build 819 (accompanied by
a change in the order of the @INC directories), but I hadn't heard
anything about the creation of a site\bin folder. (I have the 32-bit
build of 819 and the 64-bit build of 820, neither of which contain a
site\bin folder.)

Now I downloaded the 820/x64 and /x86 to to satisfy my curiosity ;-)

$ unzip -l ActivePerl-5.8.8.820-MSWin32-x64-274739.zip | grep "site/bin"
0 01-24-07 01:17 ActivePerl-5.8.8.820-MSWin32-x64-274739/perl/site/bin/

$ unzip -l ActivePerl-5.8.8.820-MSWin32-x86-274739.zip | grep "site/bin"
0 01-24-07 01:41 ActivePerl-5.8.8.820-MSWin32-x86-274739/perl/site/bin/

Maybe you didn't extract empty diretories?

New with 820/MSI-Installer is also that it puts the
"\perl\site\bin\" together with (and before) "\perl\bin\"
into the windows %PATH.

Regards

M.
 
S

Sisyphus

Mirco Wahab said:
Now I downloaded the 820/x64 and /x86 to to satisfy my curiosity ;-)

Oooh ... you're a sad case ;-)
$ unzip -l ActivePerl-5.8.8.820-MSWin32-x64-274739.zip | grep "site/bin"
0 01-24-07 01:17
ActivePerl-5.8.8.820-MSWin32-x64-274739/perl/site/bin/

$ unzip -l ActivePerl-5.8.8.820-MSWin32-x86-274739.zip | grep "site/bin"
0 01-24-07 01:41
ActivePerl-5.8.8.820-MSWin32-x86-274739/perl/site/bin/

That looks quite conclusive.
Maybe you didn't extract empty diretories?

Yes ... I think so.
New with 820/MSI-Installer is also that it puts the
"\perl\site\bin\" together with (and before) "\perl\bin\"
into the windows %PATH.

I steer clear of the '.msi' version - I only ever grab the '.zip' version.

I would have used the latest evaluation version of WinZip (my copy of which
has now expired) to extract ActivePerl-5.8.8.820-MSWin32-x86-274739.zip to
some temp location, then run the 'Installer.bat' to install to the location
of my choice - making sure that registry and path settings were not
affected.

I've just now extracted ActivePerl-5.8.8.820-MSWin32-x86-274739.zip using an
old GnuWin32 version (5.12) of unzip, and again run 'Installer.bat'. This
time, the site\bin directory *did* get created.

I can only assume that WinZip did something that unzip did not :)

Cheers,
Rob
 
P

pt

note: this post started off as a question, but turned into a blog and

[snip-tumalu-madarlin]

First off, thanks to all the folks who took the time to wade through
my OP and reply. A moderate razz to Goggle who lost my previous reply
to this thread. A few vectored "thank you"s to sisyphus, Mirco, and
M.Dondi. I used the "junction" utility (
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx
) from SysInternals-now-Microsoft-all-hail-on-bended-knee to create a
"C:\Perl" dir linked to "C:\Program Files\ActiveState.com\Perl". Then
re-installed Activestate 5.8.8.820 into "C:\Perl". I could have done
that without the whole "C:\Program Files\ActiveState.com" dir and
link, but I have this personal bias against installing everything
right at the root, even though it it IS like pissing upstream into a
brick wall. I like the ideas expressed in the Hierarchical File
System Standard ( http://www.pathname.com/fhs/ ), so I'm trying to do
things that way.

I am now much closer to a working solution. As it turns out, Perl 5.6
vs. 5.8 is NOT the problem (at least, not the current problem). The
CPAN modules I'm using (BitTorrent , Net::BitTorrent::*) are
problematic. For example, "BitTorrent-V0.02" actually requires PHP to
be installed. This isn't well documented (as in "not even hinted
at"). I was a bit surprised at PHP code being part of a CPAN Perl
module, but decided to "go with the flow". Since undocumented
alternate language requirements are "l'ordre du jour", I've taken it
upon myself to re-write the module to use the Chinese language version
of ALGOL-68, and the Aore dialect of SQL

BTW, for freeware archivers, I suggest 7-Zip (http://www.7-zip.org/).
 
P

pt

FYI:
Install_ActiveState_Perl.cmd:
----- cut here -----
@echo off

:: Install ActiveState Perl to "C:\Progra~1\ActiveState.com\Perl"
SetLocal EnableDelayedExpansion EnableExtensions

:: /L*+ ::= Log everything and append to specified file
::/ForceRestart ::= Require reboot after installation.
:: Probably not required but it IS, after all, only DOS.
Set MsiOpts=/L*+ ActiveStatePerl_5.8.8.820_install_log.txt /
ForceRestart

:: Command : "/Package" or "/i" to install," /Uninstall" or "/x" to
uninstall
Set MsiAction=/Package

:: If user specified a file on the cmd line, use it instead of the one
defined here.
Set MsiPkg=ActivePerl-5.8.8.820-MSWin32-x86-274739.msi
If not /%1/==// (
If exist %1 set MsiPkg=%1
)

:: note: "Perl\" is automatically appended to the specified
TARGEDIR.
:: NO WHITESPACE CHARS ALLOWED IN THE INSTALL TARGET PATH!!!! REALLY!
:: Why "ActiveState.com" ?? See the Filesystem Hierarchy Standard:
:: http://www.pathname.com/fhs/2.2/
Set MsiParams=TargetDir="C:\PROGRA~1\ActiveState.com"

cd "%cd%"

echo msiexec %MsiOpts% %MsiAction% "%MsiPkg%" %MsiParams%
msiexec %MsiOpts% %MsiAction% "%MsiPkg%" %MsiParams%

----- cut here -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top