Re: New Perl-Installation on new OS X
On Thu, Jun 09, 2011 at 12:43:43PM +0200, Marek Stepanek wrote: But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw ... How is it possible, that I have $PERL5LIB set to %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin in [my .profile] I only have one line: test -r /sw/bin/init.sh . /sw/bin/init.sh So you're wondering where the /sw/wibble is coming from, and you've found something mentioning /sw/wibble in your .profile. D'you think they might be related? Several fixes come to mind: 1. delete that line from .profile. This will, however, prevent anything else that it does from happening. 2. edit /sw/bin/init.sh to prevent it from messing with PERL5LIB. 3. save PERL5LIB before that line and restore it afterwards. 4. just set PERl5LIB to whatever you fancy after that line. This will, however, mean that you override any changes that may be made to your startup files elsewhere at a later date. -- David Cantrell | Reality Engineer, Ministry of Information Blessed are the pessimists, for they test their backups
Re: New Perl-Installation on new OS X
At 11:45 +0100 10/06/2011, David Cantrell wrote: Several fixes come to mind: ... 4. just set PERl5LIB to whatever you fancy after that line. This will, however, mean that you override any changes that may be made to your startup files elsewhere at a later date. What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? Would that override anything written to .profile etc.? JD
Re: New Perl-Installation on new OS X
On Fri, Jun 10, 2011 at 10:34 AM, John Delacour j...@bd8.com wrote: At 11:45 +0100 10/06/2011, David Cantrell wrote: Several fixes come to mind: ... 4. just set PERl5LIB to whatever you fancy after that line. This will, however, mean that you override any changes that may be made to your startup files elsewhere at a later date. What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? That plist is for setting up environment variables for GUI apps. It has no effect on shell sessions. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 10:38 -0400 10/06/2011, Sherm Pendley wrote: What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? That plist is for setting up environment variables for GUI apps. It has no effect on shell sessions. Obviously I'm missing something. If I do set it, it seems to have the same effect superficially as fink's exporting it via .profile/init.sh, which I thought was the problem: perl -V Compiled at Jan 26 2010 17:48:53 %ENV: PERL5LIB=/usr/local/lib/perl5/site_perl/5.14.0 @INC: /usr/local/lib/perl5/site_perl/5.14.0 /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level perl -e 'print $ENV{PERL5LIB}' /usr/local/lib/perl5/site_perl/5.14.0 JD
Re: New Perl-Installation on new OS X
At 10:38 -0400 6/10/11, Sherm Pendley wrote: On Fri, Jun 10, 2011 at 10:34 AM, John Delacour j...@bd8.com wrote: What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? That plist is for setting up environment variables for GUI apps. It has no effect on shell sessions. That's not the case for 10.3.9. Has it changed? I have been defining $PERL5LIB and some other stuff in environment.plist for years mostly because of AppleScripts I like to use. Most of the scripts are executed with osascript from a shell and they work fine with no additional redefinition in .tcshrc. They also work OK when I log in to 10.3.9 from a Linux box or use bbedit worksheets. I always thought environment.plist was just a way to be sure things were set immediately after the sort of login that is used to start up the machine rather than waiting for a shell style login. -- -- A fair tax is one that you pay but I don't --
Re: New Perl-Installation on new OS X
On Fri, Jun 10, 2011 at 11:11 AM, John Delacour j...@bd8.com wrote: At 10:38 -0400 10/06/2011, Sherm Pendley wrote: What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? That plist is for setting up environment variables for GUI apps. It has no effect on shell sessions. Obviously I'm missing something. If I do set it, it seems to have the same effect superficially as fink's exporting it via .profile/init.sh Yes, but since .profile is evaluated later, whatever it does will override what's set in the plist. Thus, changes in the plist will have no effect on shell sessions that set the same variable. Nor, as far as I can tell, will anything the OP does with respect to his @INC. My best guess about that his unable to create a distribution object relates to many of the files under ~/.cpan being owned by root. This whole Fink/@INC/PERL5LIB subthread is little more than a pointless distraction that won't solve the OP's actual problem. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
On Fri, Jun 10, 2011 at 04:11:43PM +0100, John Delacour wrote: At 10:38 -0400 10/06/2011, Sherm Pendley wrote: What would be the effect of setting a value (or no value) for PERL5LIB in ~/.MacOSX/environment.plist? That plist is for setting up environment variables for GUI apps. It has no effect on shell sessions. Obviously I'm missing something. If I do set it, it seems to have the same effect ... Are you using Terminal.app? That's a GUI application, so it takes effect, and is then inherited by the shell. Try sshing into your Mac from elsewhere. -- David Cantrell | Enforcer, South London Linguistic Massive PERL: Politely Expressed Racoon Love
Re: New Perl-Installation on new OS X
At 16:47 +0100 10/06/2011, David Cantrell wrote: Are you using Terminal.app? That's a GUI application, so it takes effect, and is then inherited by the shell. Try sshing into your Mac from elsewhere. Right. I ran a script from cgi-bin on my local server and indeed this key was missing. The same script run in BBEdit had it. All clear. Thanks. JD
RE: New Perl-Installation on new OS X
On Fri, 10 Jun 2011, Sherm Pendley wrote: Yes, but since .profile is evaluated later, whatever it does will override what's set in the plist. Thus, changes in the plist will have no effect on shell sessions that set the same variable. I use this line in my .bash_profile to make sure I use the same PATH everywhere (and only have to edit it in one place): export PATH=`/usr/libexec/PlistBuddy -c 'Print :PATH' ~/.MacOSX/environment.plist` The same can be done for PERL5LIB. Cheers, -Jan
Re: New Perl-Installation on new OS X
On Fri, Jun 10, 2011 at 2:27 PM, Jan Dubois j...@activestate.com wrote: On Fri, 10 Jun 2011, Sherm Pendley wrote: Yes, but since .profile is evaluated later, whatever it does will override what's set in the plist. Thus, changes in the plist will have no effect on shell sessions that set the same variable. I use this line in my .bash_profile to make sure I use the same PATH everywhere (and only have to edit it in one place): export PATH=`/usr/libexec/PlistBuddy -c 'Print :PATH' ~/.MacOSX/environment.plist` The same can be done for PERL5LIB. It can be - and I've copied that into my Collection of Handy Stuff. :-) But the question is, should it be done for PERL5LIB? That affects *all* Perls, and if you've included the path to modules compiled for (say) 5.12, but you're running 5.10, those modules won't work. That's exactly the problem that bit Fink some time ago - their init.sh used PERL5LIB to add their Perl module directories, which had modules they'd compiled with 5.6 - when Apple then released a version of Mac OS X that used Perl 5.8.1, those Fink-provided modules no longer worked. There was much wailing and gnashing of teeth over Fink breaking Apple's Perl, but in fact they didn't do that; they hadn't touched Apple's Perl at all, they had simply told *all* Perls to look for modules that only some Perls would be able to use. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
RE: New Perl-Installation on new OS X
On Fri, 10 Jun 2011, Sherm Pendley wrote: But the question is, should it be done for PERL5LIB? That affects *all* Perls, and if you've included the path to modules compiled for (say) 5.12, but you're running 5.10, those modules won't work. Ah, yes, sorry, lost track of the real topic of the thread. I think a better way to modify your @INC is on a per-installation basis. For Apple's Perl you have the AppendToPath and PrependToPath mechanism, e.g. $ cat /Library/Perl/5.10.0/AppendToPath /System/Library/Perl/Extras/5.10.0 There is no PrependToPath file by default, but you can create one yourself, and all directories listed in there will be put at the front of @INC, just as if you put them into PERL5LIB. If you build your own Perl, then you may want to ./Configure it with -Dusesitecustomize. That way you can modify @INC in a perl/site/lib/sitecustomize.pl file at runtime. ActivePerl uses this mechanism to add a per-user install directory to @INC: $ cat /usr/local/ActivePerl-5.14/site/lib/sitecustomize.pl # ~/Library/ActivePerl-5.14 is the default location for PPM install # So make sure we look for modules there if (my $home = (getpwuid($))[7]) { my $lib = $home/Library/ActivePerl-5.14/lib; unless (grep { $_ eq $lib } @INC) { # Insert $lib just ahead of 'site/lib' so that overrides # via $ENV{PERL5LIB} or 'perl -I...' still works (my $site = __FILE__) =~ s,/sitecustomize\.pl\z,,; my $i = $#INC; $i-- while $i 0 $INC[$i] ne $site; splice(@INC, $i, 0, $lib); } } This sitecustomize.pl script is a little more complicated because it inserts the directory behind the ones specified with PERL5LIB and -I, but before the builtin ones: $ PERL5LIB=~/mylib perl -E 'say for @INC' /Users/jan/mylib /Users/jan/Library/ActivePerl-5.14/lib /usr/local/ActivePerl-5.14/site/lib /usr/local/ActivePerl-5.14/lib . So again, you can customize your @INC setup for each Perl installation independently without resorting to global environment variables, which will just get in the way at the wrong time... Cheers, -Jan
RE: New Perl-Installation on new OS X
At 13:21 -0700 10/06/2011, Jan Dubois wrote: I think a better way to modify your @INC is on a per-installation basis. For Apple's Perl you have the AppendToPath and PrependToPath mechanism... There is no PrependToPath file by default, but you can create one yourself, and all directories listed in there will be put at the front of @INC, just as if you put them into PERL5LIB. If you build your own Perl, then you may want to ./Configure it with -Dusesitecustomize. That way you can modify @INC in a perl/site/lib/sitecustomize.pl file at runtime. Very useful information, Jan. Many thanks. JD
Re: New Perl-Installation on new OS X
On 09.06.2011 05:38, Sherm Pendley wrote: I'm probably over-cautious, but I never migrate - I always format and make a clean install, then do a clean install of all my apps. I back up my home directory, and copy it over, which preserves all my personal preferences and such. sherm-- Sherm, I would like to keep now my installation, as it is. If possible. Or I would compile perl-5.14.0 under /usr/local But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw ... How is it possible, that I have $PERL5LIB set to %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin I only see two files: ~/.profile and ~/.tcshrc in the first file I only have one line: test -r /sw/bin/init.sh . /sw/bin/init.sh in .tcshrc is longer: *** setenv LC_ALL C setenv LANG en_GB.UTF-8 # export LC_MESSAGES=CHow to set this var? # export ARCHFLAGS=-arch i386 -arch x86_64 set complete=enhance set addsuffix set autoexpand set histdup=erase set autolist set autocorrect set backslash_quote set correct=cmd set dspmbyte=utf8 unset histlit set symlinks=ignore unset recexact bindkey -k up history-search-backward bindkey -k down history-search-forward alias ls ls -sGF alias rm rm -i alias srm srm -i alias mv mv -i alias twics cd ~/Documents/tschessfeils_new/twics_new alias mysql /usr/local/mysql/bin/mysql alias mysqladmin /usr/local/mysql/bin/mysqladmin set path = (/usr/local/mysql/bin $path) set path = (/usr/local/bin $path) set path = (/sw/include $path) set path = (/usr/local/sbin $path) alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc test -r /sw/bin/init.csh source /sw/bin/init.csh *** To export the right PERL5LIB, can I add the following line to ~/.tcshrc set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0) ? Syntax seems alright, but I have still the /sw path at the beginning: %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin:/System/Library/Perl/5.10.0:/Library/Perl/5.10.0 And in @INC too: @INC: /sw/lib/perl5/5.10.0/darwin-thread-multi-2level /sw/lib/perl5/5.10.0 /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 Sorry for this long email. marek
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 6:43 AM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw ... How is it possible, that I have $PERL5LIB set to %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin I only see two files: ~/.profile and ~/.tcshrc PERL5LIB can be set in either one; which one is executed depends on what shell you're using. The current default shell is Bash, which reads .profile - at one point in ancient history, the default was Tcsh, which reads .tcshrc. in the first file I only have one line: test -r /sw/bin/init.sh . /sw/bin/init.sh If you haven't changed your default shell, that's the culprit. It executes Fink's init.sh script, which exports the PERL5LIB environment variable. Again, this behavior goes back a while - they used to think it was a good idea for the system Perl to be able to see modules that Fink had installed under /sw/lib. I haven't used Fink in a while - I switched to MacPorts - but I *thought* they stopped doing that after a few Mac OS X releases, each with a new version of Perl that disagreed with those modules, showed them how problematic that was. If you've been migrating for a while, that line in .profile could be a remnant from an old install. At any rate, delete (# or comment) that line, exit from the shell session and start a new one, and that should clear up your PERL5LIB variable. To export the right PERL5LIB, can I add the following line to ~/.tcshrc set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0) That wouldn't accomplish anything - PERL5LIB just adds to the default paths, and the above are already in the default. Syntax seems alright, but I have still the /sw path at the beginning: Did you log out of the current shell session, and back in? These startup files are only processed when you start a new shell session, not every time they're changed. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
--As of June 8, 2011 5:39:57 PM -0400, Sherm Pendley is alleged to have said: Blaming other people for your ignorance is a habit with you, isn't it? Yes, I'm responsible for who *I* send emails to. I'm not responsible for who the list sends emails to. A correctly-configured list will look at the To: and CC: headers of any mail it receives, and won't send an additional copy to anyone who's already received one. --As for the rest, it is mine. I'd argue that's a broken list, as it doesn't send me mail with the list headers. There are major arguments over the technically correct solution. Let's not get into them here. Suffice it to say, if someone asks you to not CC them when you send to the list, it's polite not to. (At least for that discussion.) Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 7:40 AM, Daniel Staal dst...@usa.net wrote: Suffice it to say, if someone asks you to not CC them when you send to the list, it's polite not to. (At least for that discussion.) In general, I'd agree - but I also think it's appropriate to consider the tone reason for the request. By the time John got around to that, I had already debunked his theory about Fink, and asked him to stop the off-topic digressions about overpriced Mac hardware. I suspect he was just upset about that, and looking for any excuse to complain about something. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
Thank you Sherm! This is a step in the right direction. But my cpanplus Perl is still broken, with messages like: Unable to create a new distribution object for 'Archive::Tar', although I have no /sw in the %ENV or @INC any more. % perl -V even does not show a %ENV at all. This is certainly not right, isn't it? In the @INC is now: @INC: /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 the .profile is not changing anything, whether I remove it or not. And the X11 terminal is not working any more, not finding the path. If I put back the line test -r /sw/bin/init.csh source /sw/bin/init.csh into my ~/.tchrc the X11-terminal (Fink) is working again. But I have back in my % perl -V %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin:/System/Library/Perl/5.10.0:/Library/Perl/5.10.0 Probably I will leave the apple Perl it as it is, and make a new install of perl-5.14.0 under /usr/local Thank you again marek
Re: New Perl-Installation on new OS X
I recently installed Fink to see if it had pdffonts. This conversation has scared me; I have uninstalled Fink. I certainly don't want to start looking for Perl modules in /sw. Now I see no PERL5LIB in %ENV. I guess Perl is looking in /System/Library/Perl/5.10.0 /Library/Perl/5.10.0 /System/Library/Perl/Extras/5.10.0 but I really don't know. Regards, Vic On Jun 9, 2011, at 7:08 AM, Sherm Pendley wrote: On Thu, Jun 9, 2011 at 6:43 AM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: But perhaps this list could help me, to get @INC and $PERL5LIB clean of /sw ... How is it possible, that I have $PERL5LIB set to %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin I only see two files: ~/.profile and ~/.tcshrc PERL5LIB can be set in either one; which one is executed depends on what shell you're using. The current default shell is Bash, which reads .profile - at one point in ancient history, the default was Tcsh, which reads .tcshrc. in the first file I only have one line: test -r /sw/bin/init.sh . /sw/bin/init.sh If you haven't changed your default shell, that's the culprit. It executes Fink's init.sh script, which exports the PERL5LIB environment variable. Again, this behavior goes back a while - they used to think it was a good idea for the system Perl to be able to see modules that Fink had installed under /sw/lib. I haven't used Fink in a while - I switched to MacPorts - but I *thought* they stopped doing that after a few Mac OS X releases, each with a new version of Perl that disagreed with those modules, showed them how problematic that was. If you've been migrating for a while, that line in .profile could be a remnant from an old install. At any rate, delete (# or comment) that line, exit from the shell session and start a new one, and that should clear up your PERL5LIB variable. To export the right PERL5LIB, can I add the following line to ~/.tcshrc set PERL5LIB = (/System/Library/Perl/5.10.0:/Library/Perl/5.10.0) That wouldn't accomplish anything - PERL5LIB just adds to the default paths, and the above are already in the default. Syntax seems alright, but I have still the /sw path at the beginning: Did you log out of the current shell session, and back in? These startup files are only processed when you start a new shell session, not every time they're changed. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 16:14 +0100 09/06/2011, Marek Stepanek wrote: Probably I will leave the apple Perl it as it is, and make a new install of perl-5.14.0 under /usr/local That is what I do, so that the two installations are independent. I configure simply like this: cd downloaded_directory ./Configure -de -Dperladmin=em...@addr.com -Dcf_email=em...@addr.com make make test sudo make install Others may have more elaborate configuration suggestions but this works fine for me. If I want to use the latest perl I change the shebang accordingly. One thing to remember, of course, is that to add modules with cpan to 5.14.0 so configured, rather than to Apple's installation, you need to cd /usr/local/bin; sudo ./cpan JD
Re: New Perl-Installation on new OS X
Good morning, On 9/06/11 at 4:40 PM +0100, John Delacour j...@bd8.com wrote: One thing to remember, of course, is that to add modules with cpan to 5.14.0 so configured, rather than to Apple's installation, you need to cd /usr/local/bin; sudo ./cpan I haven't followed all of this thread (it was digressing there for a while). Would perlbrew be a solution for the OP. I've only been using it a short while but it makes installing and using a custom perl very simple. http://search.cpan.org/perldoc?perlbrew Eg: $ perlbrew install perl-5.14.0 $ perlbrew switch perl-5.14.0 $ cpan Works a treat for me. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au O ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 8:14 AM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: Thank you Sherm! This is a step in the right direction. But my cpanplus Perl is still broken, with messages like: Unable to create a new distribution object for 'Archive::Tar', although I have no /sw in the %ENV or @INC any more. To be honest, I wouldn't have expected removing the /sw directories from @INC to fix anything. That's why I told John that worrying about Fink was pointless - there was nothing in your original report that suggested it might have been the source of the problem. Have you checked permissions on ~/.cpan? The error message sounds like it can't download and/or unpack the Archive::Tar package. If you're not running the CPAN shell as root (and you shouldn't be!), try making sure that the .cpan directory and everything under it is owned and writable by your user: cd ~ sudo chown -R your_username .cpan chmod -R g+w .cpan You need sudo for the chown because, if anything is owned by someone else, you'll need root authority to change its ownership. even does not show a %ENV at all. This is certainly not right, isn't it? That doesn't mean you have no environment variables at all, just none that Perl cares about. (If you recall, it was only showing PERL5LIB before, even though you probably had a lot more than that.) sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 10:55 AM, Vic Norton v...@norton.name wrote: I recently installed Fink to see if it had pdffonts. This conversation has scared me; I have uninstalled Fink. I certainly don't want to start looking for Perl modules in /sw. Fear is the mind-killer. :-) Understanding what Fink does, and does NOT do, is key here. It doesn't damage or modify your system Perl in any way. All it does is add a single environment variable that Perl (any Perl, not just Apple's) looks for when it starts up. If you want the rest of Fink, but don't want its changes to PERL5LIB, just undo them. Leave the call to its init.sh in your .profile, and immediately after that, add a line that overrides its changes to PERL5LIB: export PERL5LIB='' sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 11:54 AM, Charlie Garrison garri...@zeta.org.au wrote: Good morning, I haven't followed all of this thread (it was digressing there for a while). Would perlbrew be a solution for the OP. I've only been using it a short while but it makes installing and using a custom perl very simple. I've been meaning to check that out. It must do more than what I think it does, because installing a new Perl is already pretty simple: ./Configure -des --prefix=/where/ever make make test sudo make install I'll have to read up on it (thanks for the link) to see what else it does... sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
I haven't followed all of this thread (it was digressing there for a while). Would perlbrew be a solution for the OP. I've only been using it a short while but it makes installing and using a custom perl very simple. I installed the preconfigured version from active state recently and was pleasantly surprised at how it took care of pretty much everything. That might be another option for the original poster. Wayne
Re: New Perl-Installation on new OS X
On Thu, Jun 9, 2011 at 13:22, Sherm Pendley sherm.pend...@gmail.com wrote: On Thu, Jun 9, 2011 at 11:54 AM, Charlie Garrison garri...@zeta.org.au wrote: Good morning, I haven't followed all of this thread (it was digressing there for a while). Would perlbrew be a solution for the OP. I've only been using it a short while but it makes installing and using a custom perl very simple. I've been meaning to check that out. It must do more than what I think it does, because installing a new Perl is already pretty simple: ./Configure -des --prefix=/where/ever make make test sudo make install I'll have to read up on it (thanks for the link) to see what else it does... snip The main feature is that it downloads and installs whatever version you ask it to install. The second feature is that it manages more than one copy of perl for you. So, say you have a work version of perl that is at 5.8.8 and a home version that is at 5.14.0. You can say perlbrew install perl-5.8.8 perlbrew install perl-5.14.0 perlbrew switch perl-5.14.0 At this point the version of perl found in the PATH will be 5.14.0 perlbrew switch perl-5.8.8 Now, the version of perl found in the PATH will be 5.8.8 Let's go further and say your work has a web code and backend code. Different modules are installed in each environment. You can say perlbrew install perl-5.8.8 --as web perlbrew install perl-5.8.8 --as backend You can then switch between them like this perlbrew switch web perlbrew switch backend Any modules you install with cpan, cpanp, or cpanm (hint: use perlbrew install-cpanm to get cpanm easily and globally for all of the managed perls) will only get installed in the current version. If patchperl is installed (and it gets installed by the install script from the POD), it will allow you to build older versions of perl that break on newer machines. That is about all it does, but that can be incredibly useful. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 10:02 AM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: I have a new laptop. Congrats! I have a new iMac, so I know the feeling. :-) 1) The complier 'gcc-4.2' is not in your PATH. Add it to the PATH and try again. OR 2) The compiler isn't installed on your system. Did you reinstall Xcode, or did you migrate it from your old machine? If you migrated, you might want to try installing a fresh copy of Xcode. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 16:02 +0200 08/06/2011, Marek Stepanek wrote: ...So, gcc seems to be al right. Is it possible, that the migration assistant has mixed up, 32bit compiled modules with 64bit? Or is there a confusion with the Perl of Fink? Here my Perl: Built under darwin Compiled at Jan 26 2010 17:48:54 %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin @INC: /sw/lib/perl5/5.10.0/darwin-thread-multi-2level /sw/lib/perl5/5.10.0 ... I think you're going to have trouble until you get rid of everything Fink has installed and everything it's changed in /usr/bin. If I were you I'd probably delete /usr/bin/perl and replace it with a link but I'd wait for others to give you more experienced advice. I would also install the latest Xcode. Note that gcc -v will give you gcc-4.0 and not gcc-4.2 unless you have replaced Apple's original link, so maybe Fink did that too. JD
Re: New Perl-Installation on new OS X
On 08.06.2011 17:31, John Delacour wrote: At 16:02 +0200 08/06/2011, Marek Stepanek wrote: ...So, gcc seems to be al right. Is it possible, that the migration assistant has mixed up, 32bit compiled modules with 64bit? Or is there a confusion with the Perl of Fink? Here my Perl: Built under darwin Compiled at Jan 26 2010 17:48:54 %ENV: PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin @INC: /sw/lib/perl5/5.10.0/darwin-thread-multi-2level /sw/lib/perl5/5.10.0 ... I think you're going to have trouble until you get rid of everything Fink has installed and everything it's changed in /usr/bin. If I were you I'd probably delete /usr/bin/perl and replace it with a link but I'd wait for others to give you more experienced advice. I would also install the latest Xcode. Note that gcc -v will give you gcc-4.0 and not gcc-4.2 unless you have replaced Apple's original link, so maybe Fink did that too. JD Thank you John, Thank you Sherm! I did install the new XCode. offtopicMy new laptop was a not really cheap: 2600 Euros, and Apple is asking for the XCode download 3.90 Euros. This is nit-picking in my eyes. I don't know, where Apple is going, but I see in the last years only toys and no real support of professionals./offtopic gcc-4.2 was installed with the latest XCode 4.0.2 Is Fink installing into /usr/bin ? Or is it a misunderstanding? Probably there are old and new mixed up from migrating from my back-up. marek
Re: New Perl-Installation on new OS X
On 08.06.2011 18:03, Melton Low wrote: xCode 4 should have been included with your new Mac. Check in the Optional Application install disc. Mel Not here in Germany :-( In old times there was XCode on the optional installer DVD. Now there are only toys: iDVD, Sound Jingles, iPhoto ... That's all, what Apple offers as extra for a 2600 Euro computer ... marek
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 11:31 AM, John Delacour j...@bd8.com wrote: I think you're going to have trouble until you get rid of everything Fink has installed and everything it's changed in /usr/bin. Fink neither changes nor installs anything in /usr/anything. It's all under /sw. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 17:55 +0200 08/06/2011, Marek Stepanek wrote: gcc-4.2 was installed with the latest XCode 4.0.2 Is Fink installing into /usr/bin ? Or is it a misunderstanding? I have both gcc-4.0 and gcc-4.2 in /usr/bin but gcc points to gcc-4.0. I have Xcode version 3.2.6 and I see in Get Info that there is an option to open in 32-bit mode. That may have been switched on in the migration... but listen to wiser counsel than mine. offtopicMy new laptop was a not really cheap: 2600 Euros, and Apple is asking for the XCode download 3.90 Euros. This is nit-picking in my eyes. I don't know, where Apple is going, but I see in the last years only toys and no real support of professionals. I have been thinking so all day after watching the announcement of iCloud, a complete non-happening designed, like everything Apple, for shop-happy groupees. It is free, up to a point, once you have bought your latest Mac, your latest iPhone and your latest iPad, paid the interest on the loans and the subscription to all the service providers for the connectivity needed to download tune after useless tune at an inflated price. My first 128K Mac with a dot matrix printer cost me over $4,000 in 1984, so the writing has been on the wall for a long time. /offtopic JD
Re: New Perl-Installation on new OS X
At 18:16 +0200 08/06/2011, Marek Stepanek wrote: On 08.06.2011 18:03, Melton Low wrote: xCode 4 should have been included with your new Mac. Check in the Optional Application install disc. XCode 4 is only for bleeding-edge developers. Not here in Germany :-( In old times there was XCode on the optional installer DVD. Now there are only toys: iDVD, Sound Jingles, iPhoto ... That's all, what Apple offers as extra for a 2600 Euro computer ... XCode 3.2.6 should be on the disks and is all you need. On the main install disk I got with the Mac Mini in January there is a folder Optional Installs with the XCode package in it. I have a feeling Sofware Update has updated it since I first installed it. If it's not on the disk you can get it free from http://developer.apple.com/devcenter/mac/index.action provided you are a member -- and this grade of membership is free. Good luck. JD
Re: New Perl-Installation on new OS X
xCode 4 should have been included with your new Mac. Check in the Optional Application install disc. Mel On Wed, Jun 8, 2011 at 9:55 AM, Marek Stepanek marekstepa...@yahoo.co.ukwrote: On 08.06.2011 17:31, John Delacour wrote: At 16:02 +0200 08/06/2011, Marek Stepanek wrote: ...So, gcc seems to be al right. Is it possible, that the migration assistant has mixed up, 32bit compiled modules with 64bit? Or is there a confusion with the Perl of Fink? Here my Perl: Built under darwin Compiled at Jan 26 2010 17:48:54 %ENV: PERL5LIB=/sw/lib/perl5:/sw/**lib/perl5/darwin @INC: /sw/lib/perl5/5.10.0/darwin-**thread-multi-2level /sw/lib/perl5/5.10.0 ... I think you're going to have trouble until you get rid of everything Fink has installed and everything it's changed in /usr/bin. If I were you I'd probably delete /usr/bin/perl and replace it with a link but I'd wait for others to give you more experienced advice. I would also install the latest Xcode. Note that gcc -v will give you gcc-4.0 and not gcc-4.2 unless you have replaced Apple's original link, so maybe Fink did that too. JD Thank you John, Thank you Sherm! I did install the new XCode. offtopicMy new laptop was a not really cheap: 2600 Euros, and Apple is asking for the XCode download 3.90 Euros. This is nit-picking in my eyes. I don't know, where Apple is going, but I see in the last years only toys and no real support of professionals./offtopic gcc-4.2 was installed with the latest XCode 4.0.2 Is Fink installing into /usr/bin ? Or is it a misunderstanding? Probably there are old and new mixed up from migrating from my back-up. marek
Re: New Perl-Installation on new OS X
I had a similar problem with my new MacBook Pro but I haven't had the time to look into it further. I use MacPort and I ended up deleting everything from MacPort before re-installing everything. As for deleting Perl from /usr/bin that is a VERY BAD IDEA. That came as part of the Apple OS so it's used by Apple for software install and upgrades. Never ever delete anything installed by Apple. Mel On Wed, Jun 8, 2011 at 9:31 AM, John Delacour j...@bd8.com wrote: At 16:02 +0200 08/06/2011, Marek Stepanek wrote: ...So, gcc seems to be al right. Is it possible, that the migration assistant has mixed up, 32bit compiled modules with 64bit? Or is there a confusion with the Perl of Fink? Here my Perl: Built under darwin Compiled at Jan 26 2010 17:48:54 %ENV: PERL5LIB=/sw/lib/perl5:/sw/**lib/perl5/darwin @INC: /sw/lib/perl5/5.10.0/darwin-**thread-multi-2level /sw/lib/perl5/5.10.0 ... I think you're going to have trouble until you get rid of everything Fink has installed and everything it's changed in /usr/bin. If I were you I'd probably delete /usr/bin/perl and replace it with a link but I'd wait for others to give you more experienced advice. I would also install the latest Xcode. Note that gcc -v will give you gcc-4.0 and not gcc-4.2 unless you have replaced Apple's original link, so maybe Fink did that too. JD
Re: New Perl-Installation on new OS X
On Jun 8, 2011, at 10:33 AM, John Delacour wrote: At 18:16 +0200 08/06/2011, Marek Stepanek wrote: On 08.06.2011 18:03, Melton Low wrote: xCode 4 should have been included with your new Mac. Check in the Optional Application install disc. XCode 4 is only for bleeding-edge developers. Not here in Germany :-( In old times there was XCode on the optional installer DVD. Now there are only toys: iDVD, Sound Jingles, iPhoto ... That's all, what Apple offers as extra for a 2600 Euro computer ... XCode 3.2.6 should be on the disks and is all you need. On the main install disk I got with the Mac Mini in January there is a folder Optional Installs with the XCode package in it. I have a feeling Sofware Update has updated it since I first installed it. If it's not on the disk you can get it free from http://developer.apple.com/devcenter/mac/index.action provided you are a member -- and this grade of membership is free. Good luck. JD xcode4 is only available if you are a $99/yr developer.
Re: New Perl-Installation on new OS X
At 10:54 -0700 08/06/2011, rd ackerman wrote: On Jun 8, 2011, at 10:33 AM, John Delacour wrote: If it's not on the disk you can get it free from http://developer.apple.com/devcenter/mac/index.action provided you are a member -- and this grade of membership is free. xcode4 is only available if you are a $99/yr developer. If you read what I wrote you will see I was not talking about XCode 4. Besides, as Marek said in the beginning, you can get it for $4.99 at the app store - http://itunes.apple.com/us/app/xcode/id422352214?mt=12ls=1 JD
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 1:16 PM, John Delacour j...@bd8.com wrote: I have been thinking so all day after watching the announcement of iCloud, a complete non-happening designed, like everything Apple, for shop-happy groupees. It is free, up to a point, once you have bought your latest Mac, your latest iPhone and your latest iPad, paid the interest on the loans and the subscription to all the service providers for the connectivity needed to download tune after useless tune at an inflated price. Any chance we might keep this on-topic for once? I don't see how *any* of this whine-fest is relevant to the issue at hand. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 11:49 AM, Melton Low softw.d...@gmail.com wrote: I use MacPort and I ended up deleting everything from MacPort before re-installing everything. A pointless exercise - Like Fink, MacPorts doesn't touch /usr. Everything relevant to MacPorts is found under /opt/local. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 15:18 -0400 08/06/2011, Sherm Pendley wrote: On Wed, Jun 8, 2011 at 11:49 AM, Melton Low softw.d...@gmail.com wrote: I use MacPort and I ended up deleting everything from MacPort before re-installing everything. A pointless exercise - Like Fink, MacPorts doesn't touch /usr. Everything relevant to MacPorts is found under /opt/local. Please explain then how Marek gets /sw/lib/perl5/5.10.0 ... when he does perl -V from the command line. Are you saying that a script on his machine with the shebang #!/usr/bin/perl will completely ignore /sw/...? If I do perl -V I get the Apple installation If I do /usr/local/bin/./perl -V then I get /usr/local/lib/perl5/site_perl/5.14.0... JD PS. I don't need two copies of every posting to the list.
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 3:40 PM, John Delacour j...@bd8.com wrote: At 15:18 -0400 08/06/2011, Sherm Pendley wrote: On Wed, Jun 8, 2011 at 11:49 AM, Melton Low softw.d...@gmail.com wrote: I use MacPort and I ended up deleting everything from MacPort before re-installing everything. A pointless exercise - Like Fink, MacPorts doesn't touch /usr. Everything relevant to MacPorts is found under /opt/local. Please explain then how Marek gets /sw/lib/perl5/5.10.0 ... when he does perl -V from the command line. Are you saying that a script on his machine with the shebang #!/usr/bin/perl will completely ignore /sw/...? No. I'm saying that there are *many* ways to influence @INC without bothering any files under /usr. PERL5LIB, for one. PS. I don't need two copies of every posting to the list. Complain to the list admins. They're the ones who broke reply all, not me. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
At 16:17 -0400 08/06/2011, Sherm Pendley wrote: No. I'm saying that there are *many* ways to influence @INC without bothering any files under /usr. PERL5LIB, for one. I'm sure that's very clear to everyone who already knows what you are talking about. Are you saying that by editing ~/.bashrc or some such file one could remove this environment variable that has been added by some fink or port or other animal? If that's what you mean, why not say so. I thought people asked questions on this list in order to get useful answers rather than merely to be informed that someone has the answer but hasn't the time to give it. PS. I don't need two copies of every posting to the list. Complain to the list admins. They're the ones who broke reply all, not me. You alone are responsible for who you send emails to. Are you getting a duplicate of this? JD
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 5:20 PM, John Delacour j...@bd8.com wrote: At 16:17 -0400 08/06/2011, Sherm Pendley wrote: PERL5LIB, for one. I'm sure that's very clear to everyone who already knows what you are talking about. Are you saying that by editing ~/.bashrc or some such file one could remove this environment variable that has been added by some fink or port or other animal? If that's what you mean, why not say so. Because there's nothing at all Mac-specific about it, and it's well-covered in the Perl man pages and many many tutorials, as well as having been discussed right here already, *many* times. If you can't be bothered to do even the most basic research, that's neither my fault nor my problem. I gave you the clue you needed, now go to Google and use it. Complain to the list admins. They're the ones who broke reply all, not me. You alone are responsible for who you send emails to. Blaming other people for your ignorance is a habit with you, isn't it? Yes, I'm responsible for who *I* send emails to. I'm not responsible for who the list sends emails to. A correctly-configured list will look at the To: and CC: headers of any mail it receives, and won't send an additional copy to anyone who's already received one. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: New Perl-Installation on new OS X
On Wed, Jun 8, 2011 at 11:55 AM, Marek Stepanek marekstepa...@yahoo.co.uk wrote: offtopicMy new laptop was a not really cheap: 2600 Euros Ouch! At the current rate, that translates to roughly $3800 USD - $1400 more than the highest-price MacBook Pro in the US store. I wonder, how much of that was import taxes tariffs? Probably there are old and new mixed up from migrating from my back-up. I'm probably over-cautious, but I never migrate - I always format and make a clean install, then do a clean install of all my apps. I back up my home directory, and copy it over, which preserves all my personal preferences and such. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net