Re: problems with intel architecture
On Apr 3, 2006, at 3:56 PM, Joel Rees wrote: Even though it's not as necessary as it was when the system perl was at v5.6 and we all wanted the Unicode stuff in v5.8, I'm still inclined to build a separate install of perl for application use. That way I don't have to worry as much about fine-tuning what gets installed, and I find it's easier to get cpan to behave, as well. (Not that you can ever ignore what gets installed, but it's easier to protect the server if you keep the OS clean.) Are there OS functions that rely on perl? What sorts of things? Are there nice directions somewhere for setting up a separate install? Also, how does CPAN module determine what's installed? I hesitated to just remove stuff from /Library/Perl until Ed told me to do so, because I figured that CPAN was keeping some state info about what was there. Thanks, Cheryl
Re: problems with intel architecture
On Tue, April 4, 2006 11:44 am, Cheryl Chase said: Are there OS functions that rely on perl? What sorts of things? Just to answer: yes, there are OS functions that rely on perl. If I was on my Mac I could probably pull up quite a few. One I'm fairly sure that uses perl is installers. (Not always, but often.) XCode makes it relatively simple to embed basic scripts (perl, shell, or otherwise) into a project. It wouldn't surprise me to find Perl is all kinds of odd applications, for some quick thing. 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: problems with intel architecture
On Apr 4, 2006, at 2:16 PM, Dominic Dunlop wrote: On 2006–04–04, at 17:44, Cheryl Chase wrote: Are there OS functions that rely on perl? What sorts of things? Yes. Not many, though. You can see what's there if you type $ locate *.pl in a terminal window. That will only show the files ending in .pl. Scripts use the #! line to determine the interpreter to run them with, not the filename extension. sherm-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
Re: problems with intel architecture
On Apr 4, 2006, at 11:44 AM, Cheryl Chase wrote: On Apr 3, 2006, at 3:56 PM, Joel Rees wrote: Even though it's not as necessary as it was when the system perl was at v5.6 and we all wanted the Unicode stuff in v5.8, I'm still inclined to build a separate install of perl for application use. That way I don't have to worry as much about fine-tuning what gets installed, and I find it's easier to get cpan to behave, as well. (Not that you can ever ignore what gets installed, but it's easier to protect the server if you keep the OS clean.) Are there OS functions that rely on perl? What sorts of things? Obviously the low-level kernel stuff like task switching, memory management, etc. aren't in Perl. But higher-level functions like cron jobs, startup scripts, installation scripts, etc. are often written in Perl. Unix admins had been using it for that sort of thing for years before web developers started using it. Installing a single perl may seem normal to users who are more accustomed to MacPerl and/or ActiveState's Perl for Windows, but it's *not* normal to install *nix perl that way. Sun even ships Solaris with two versions already installed, the latest version as /usr/bin/ perl, and whatever version they've verified their scripts against as / opt/sun/perl5.x.y/bin/perl. Are there nice directions somewhere for setting up a separate install? They're included with Perl. Actually, doing so is the path of least resistance, as the default is to install under /usr/local, which will not disturb Apple's perl. Also, how does CPAN module determine what's installed? It looks in @INC. sherm-- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
Re: problems with intel architecture
Are there OS functions that rely on perl? What sorts of things? Yes. Not many, though. You can see what's there if you type $ locate *.pl in a terminal window. That will only show the files ending in .pl. Scripts use the #! line to determine the interpreter to run them with, not the filename extension. I was thinking, let's write a script to check the first lines. But I'm lazy. file /*bin/* | grep perl file /usr/*bin/* | grep perl gets everything in the usual places for system executables. Of course it misses utility scripts in odd places, including all those found by the locate *.pl command. Since I'm a little weak with one-liners and with File::Find, I should try to work up a one-liner that would do a recursive descent, and log out and back in as a user that can sudo so I can descend all the places my working user can't. But I'm lazy. ;-/
Re: problems with intel architecture
Not a one-liner and not even pretty, but since I needed the practice: - #! /usr/bin/perl use File::Find; @l = ( / ); sub w { if ( -d $_ ) { my $dir = $File::Find::dir; if ( system( file * | grep perl ) == 0 ) { print *** from: $dir ***\n; } } } find( \w, @l ); - Overkill. Gets a lot of can't cd errors, of course, since I'm not running it as root, and it takes a while to run, too. Finds a bit more than scripts, too, so it really doesn't serve the original question, Heh. A bunch of people wrote Are there OS functions that rely on perl? What sorts of things? Yes. Not many, though. You can see what's there if you type $ locate *.pl in a terminal window. That will only show the files ending in .pl. Scripts use the #! line to determine the interpreter to run them with, not the filename extension. I was thinking, let's write a script to check the first lines. But I'm lazy. file /*bin/* | grep perl file /usr/*bin/* | grep perl gets everything in the usual places for system executables. Of course it misses utility scripts in odd places, including all those found by the locate *.pl command. Since I'm a little weak with one-liners and with File::Find, I should try to work up a one-liner that would do a recursive descent, and log out and back in as a user that can sudo so I can descend all the places my working user can't. But I'm lazy. ;-/
File:Find-ing perl stuff on a mac (Re: problems with intel architecture)
Hmm. On 2006.4.5, at 08:48 AM, Joel Rees wrote: Not a one-liner and not even pretty, but since I needed the practice: - #! /usr/bin/perl use File::Find; @l = ( / ); sub w { if ( -d $_ ) { my $dir = $File::Find::dir; if ( system( file * | grep perl ) == 0 ) { print *** from: $dir ***\n; } } } find( \w, @l ); - After about two hours of running (on an old clamshell iBook) and dredging up some really interesting stuff, it seems to have completed without descending into /usr/bin. Anyone have any ideas why?
Re: problems with intel architecture
On Apr 2, 2006, at 3:32 PM, Edward Moy wrote: A native intel program can't load a ppc binary (like Expat.bundle). Similarly, a ppc program running in Rosetta can't load an intel binary. In the native or Rosetta environments, there can be no mixing of binaries. You should probably move aside (or remove) the stuff in /Library/ Perl/5.8.6 (leaving the AppendToPath file), or at least the ones that have .bundle files. Then you'll have to reinstall those CPAN modules. Thanks Ed. That helped get me going. For others who may be investigating the same problem, let me add that CPAN was not totally successful at rebuilding some modules, for reasons I don't completely understand, but which probably included needing some stuff like LWP and HTTP in order to fetch things. But I was able to download them manually from http://www.cpan.org, move them to /var/root/.cpan/build, and manually build and install them. Cheryl
Re: problems with intel architecture
On 2006.4.4, at 07:37 AM, Cheryl Chase wrote: On Apr 2, 2006, at 3:32 PM, Edward Moy wrote: A native intel program can't load a ppc binary (like Expat.bundle). Similarly, a ppc program running in Rosetta can't load an intel binary. In the native or Rosetta environments, there can be no mixing of binaries. You should probably move aside (or remove) the stuff in /Library/Perl/5.8.6 (leaving the AppendToPath file), or at least the ones that have .bundle files. Then you'll have to reinstall those CPAN modules. Thanks Ed. That helped get me going. For others who may be investigating the same problem, let me add that CPAN was not totally successful at rebuilding some modules, for reasons I don't completely understand, but which probably included needing some stuff like LWP and HTTP in order to fetch things. But I was able to download them manually from http://www.cpan.org, move them to /var/root/.cpan/build, and manually build and install them. Even though it's not as necessary as it was when the system perl was at v5.6 and we all wanted the Unicode stuff in v5.8, I'm still inclined to build a separate install of perl for application use. That way I don't have to worry as much about fine-tuning what gets installed, and I find it's easier to get cpan to behave, as well. (Not that you can ever ignore what gets installed, but it's easier to protect the server if you keep the OS clean.)
Re: problems with intel architecture
A native intel program can't load a ppc binary (like Expat.bundle). Similarly, a ppc program running in Rosetta can't load an intel binary. In the native or Rosetta environments, there can be no mixing of binaries. You should probably move aside (or remove) the stuff in /Library/Perl/ 5.8.6 (leaving the AppendToPath file), or at least the ones that have .bundle files. Then you'll have to reinstall those CPAN modules. -- Edward Moy Apple Computer, Inc. [EMAIL PROTECTED] (This message is from me as a reader of this list, and not a statement from Apple.) On Apr 2, 2006, at 3:19 PM, Cheryl Chase wrote: I'm a casual perl user. I just upgraded from a PPC OSX machine to a MacBook Pro, and I can't get perl to work right for me. I used the Apple Migration Assistant to move my data from my PPC machine to the MacBook Pro. Trying to run a simple perl script (requiring XML-RPC, DBI, and DBD- mysql) with the installed Apple Perl, I get errors like this: @GlenEllen Fetch % perl walk.pl Can't load '/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/XML/ Parser/Expat/Expat.bundle' for module XML::Parser::Expat: dlopen(/ Library/Perl/5.8.6/darwin-thread-multi-2level/auto/XML/Parser/Expat/ Expat.bundle, 1): no suitable image found. Did find: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/XML/ Parser/Expat/Expat.bundle: mach-o, but wrong architecture at / System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230. at /Library/Perl/5.8.6/darwin-thread-multi-2level/XML/Parser.pm line 14 Compilation failed in require at /Library/Perl/5.8.6/darwin-thread- multi-2level/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /Library/Perl/5.8.6/darwin- thread-multi-2level/XML/Parser.pm line 18. Compilation failed in require at /Library/Perl/5.8.6/RPC/XML/ Parser.pm line 85. BEGIN failed--compilation aborted at /Library/Perl/5.8.6/RPC/XML/ Parser.pm line 85. Compilation failed in require at /Library/Perl/5.8.6/RPC/XML/ Client.pm line 47. Compilation failed in require at Confluence.pm line 24. BEGIN failed--compilation aborted at Confluence.pm line 24. Compilation failed in require at walk.pl line 2. BEGIN failed--compilation aborted at walk.pl line 2. @GlenEllen Fetch % If I try to install XML-RPC with CPAN, I get a similar kind of failure: CPAN.pm: Going to build R/RB/RBERJON/XML-SAX-Expat-0.37.tar.gz cp Expat.pm blib/lib/XML/SAX/Expat.pm Manifying blib/man3/XML::SAX::Expat.3pm /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/00basicCan't load '/Library/Perl/5.8.6/darwin-thread- multi-2level/auto/XML/Parser/Expat/Expat.bundle' for module XML::Parser::Expat: dlopen(/Library/Perl/5.8.6/darwin-thread- multi-2level/auto/XML/Parser/Expat/Expat.bundle, 2): no suitable image found. Did find: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/XML/ Parser/Expat/Expat.bundle: mach-o, but wrong architecture at / System/Library/Perl/5.8.6/darwin-thread-multi-2level/DynaLoader.pm line 230. at /Library/Perl/5.8.6/darwin-thread-multi-2level/XML/Parser.pm line 14 Compilation failed in require at /Library/Perl/5.8.6/darwin-thread- multi-2level/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /Library/Perl/5.8.6/darwin- thread-multi-2level/XML/Parser.pm line 18. Compilation failed in require at /private/var/root/.cpan/build/XML- SAX-Expat-0.37/blib/lib/XML/SAX/Expat.pm line 13. BEGIN failed--compilation aborted at /private/var/root/.cpan/build/ XML-SAX-Expat-0.37/blib/lib/XML/SAX/Expat.pm line 13. Compilation failed in require at t/00basic.t line 3. BEGIN failed--compilation aborted at t/00basic.t line 3. t/00basicdubious Test returned status 255 (wstat 65280, 0xff00) I tried installing ActiveState Perl, but I get this: @GlenEllen Fetch % /usr/local/ActivePerl-5.8/bin/perl walk.pl install_driver(mysql) failed: Can't load '/usr/local/ActivePerl-5.8/ lib/site_perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/ mysql.bundle' for module DBD::mysql: dlopen(/usr/local/ ActivePerl-5.8/lib/site_perl/5.8.8/darwin-thread-multi-2level/auto/ DBD/mysql/mysql.bundle, 1): no suitable image found. Did find: /usr/local/ActivePerl-5.8/lib/site_perl/5.8.8/darwin-thread- multi-2level/auto/DBD/mysql/mysql.bundle: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 at /usr/local/ ActivePerl-5.8/lib/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230. at (eval 12) line 3 Compilation failed in require at (eval 12) line 3. Perhaps a required shared library or dll isn't installed where expected at walk.pl line 24 @GlenEllen Fetch % Arggh! What's the right way to get my perl environment working on OSX 10.4.5 Intel Core Duo architecture? Do I need to install a parallel version of perl from source?