Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: @INC site/lib problem on Windows 7 and XP (ActiveState Perl)

by Marshall (Canon)
on Jan 17, 2011 at 15:43 UTC ( [id://882687]=note: print w/replies, xml ) Need Help??


in reply to @INC site/lib problem on Windows 7 and XP (ActiveState Perl)

I looked on the Active State website for downloads and all I see for version 5.10 is a single link to the .msi file. Its hard for me to see how you have selected the wrong thing there.

I find your error report perplexing as I would have expected something like: "hey, it works on Machine A, but not Machine B". Do you mean that code doesn't work on either machine? You have two independent installations that have nothing to do with each other. Run the .msi and gui ppm on each machine separately - do not copy files between machines.

I am on XP pro and the .msi installer has been working great for many years. I don't have a Win 7 box, but can help with XP and so can many others. Start with XP. Get specific about what you did during the installation. Default would be C:\Perl and be installed for all users. What thing differently did you do? Get as specific as you can. And let's talk about why your XP installation doesn't work. Then completely different topic: "My Win 7 installation doesn't work".

In your case, you only have two packages so doing a manual GUI install on both machines separately is no big deal. But here's how to do it if there were 100 packages...use the command line ppm.

Type at a command prompt: "ppm help profile" and you will learn about "profile save" and "profile restore". To "clone" my installation on another computer, I run "ppm profile save myinstall", go to the other machine, install AS from the .msi then after that from command line run "ppm profile restore myinstall". That runs the ppm installer for each of my packages on the other machine. That is the right way to get the same packages on multiple machines.

The ppm installer adjusts things so that modules get put in the right directories. If you tried to copy Perl module files between machines, then I could see how you are in trouble! Don't do that.

  • Comment on Re: @INC site/lib problem on Windows 7 and XP (ActiveState Perl)

Replies are listed 'Best First'.
Re^2: @INC site/lib problem on Windows 7 and XP (ActiveState Perl)
by Anonymous Monk on Jan 30, 2011 at 17:00 UTC

    Thanks for the tip on the save/restore profile! I was under the impression that profiles only worked if you had a professional license or something from ActiveState.

    Regarding my original problem..

    On all machines, I downloaded the MSI installer and ran it to completion, using defaults for everything except the path. I set the path to <drive-letter>:/activestate/perl/5.10/ (where the only difference between machines is which drive I installed it on; C: on one computer, D: on the other.) Likewise, I used the PPM GUI on each to install the hardlink package (eventually, I have about 250 packages I want installed, but I wanted to install the base AS Perl and one package to test that everything was working before going full steam ahead.)

    I do remember many lifetimes ago when I installed the ancient AS Perl 5.6, I had a similar problem on another machine (Originally Win2K but later upgraded to XP--do not remember if I installed AS Perl 5.6 before or after the upgrade), but was able to fix it by modifying some file in the lib/ tree to modify the @INC var (it was some config file which I cannot seem to locate a similar file in 5.10.) If I can do something similar again, that would work fine for my needs. But I do not know where 5.10 stores it's config info as I cannot seem to find it.

    I've also worked around it for the time being by having all my scripts call C:/sys/bin/set-perl-env.bat (as all my machines have a C:/sys/bin folder for storing commonly used binaries and scripts) which sets up the Perl environment for the current machine before calling Perl.

    (Although I am still curious to understand why I am having this issue!)

    TIA

      Correction, I forgot I also used the PPM GUI to install a second package, Win32::Symlink, but have been only using the Win32::Hardlink package as my testing rat..
        I set the path to <drive-letter>:/activestate/perl/5.10/
        I suspect something went wrong in this GUI over-ride of the path. Active State "likes" to install into C:\Perl. I have seen this install into other directories. Use the GUI to navigate to the installation directory. I would create this non-standard c:|d:\activestate\perl\5.10 directory prior to running the install.

        Sorry that I cannot help further. It is possible to install Active State into a non-standard directory and I've seen it done. Maybe there is something a bit strange about Win7?? I think that is highly likely.

      There is a bug in core Perl on Windows that doesn't set up @INC correctly if Perl is installed into a directory that starts with the letter '5'. Your problem should go away if you install into C:/activestate/perl/v5.10 instead.

      This bug is at least 10 years old and somewhat related to finding additional site_lib directories when you are using the versioned directory layout scheme where multiple Perl versions share site_lib directories.

        There is a bug in core Perl on Windows that doesn't set up @INC correctly if Perl is installed into a directory that starts with the letter '5'.

        Is this documented somewhere? (It could explain some problems I've had in the past>)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-23 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found