Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Perl Programming Businesses Apple

Apple's Mac OS X Update Breaks Perl 264

mir writes "It looks like if you use CPAN to install modules, Apple's latest security update might just have broken your Perl. According to Tatsuhiko Miyagawa 'The Security Update brings (old) IO.bundle with version 1.22 but your IO.pm has been updated to the latest 1.23 on CPAN shell. (But hey, 1.23 was released in 2006...Why do you bring that ancient version back, Apple!?)'."
This discussion has been archived. No new comments can be posted.

Apple's Mac OS X Update Breaks Perl

Comments Filter:
  • by warren.oates ( 925589 ) on Wednesday February 18, 2009 @11:34AM (#26902253)

    We don't exactly have "package managers" in OS X. The BSD side of OS X is only barely "maintained" at all, and then in some truly obscure and incoherent bubble-headed Cupertino fashion. Anything you really want to actually work with, you have to maintain yourself: PHP, Apache, rsync, ffmpeg, Perl -- all the seriously useful stuff like that you put into /usr/local and set your $PATH accordingly. You _cannot_ trust Apple not to break things.

  • by Protocron ( 611778 ) on Wednesday February 18, 2009 @11:37AM (#26902301)
    My wife's Mac just recently broke her only game (Sims 2) because of an Apple update. She updated Quicktime (we think) and that completely broke Aspyr's version of the Sims 2. http://support.aspyr.com/ [aspyr.com] "We are aware of the issues arising with the latest QuickTime update in 10.4.11 and are working with Apple to get it resolved. Please bear with us as we work with Apple to find the source of and fix for this problem." Yeah, nice work there Apple. What's next?
  • by King_TJ ( 85913 ) on Wednesday February 18, 2009 @11:40AM (#26902333) Journal

    Umm, what about Fink?

    http://www.finkproject.org/ [finkproject.org]

  • by Anonymous Coward on Wednesday February 18, 2009 @11:41AM (#26902343)

    It's an XS module: They include components that are written in a language other than Perl, and have to be compiled against perl.

    Which means that if the perl binary they are pointing to changes, they break. The code itself is fine: You just need to recompile.

    Apple helpfully recompiled all the ones they shipped, so they would work. The only problem is for people who updated the modules that Apple shipped: They now have a miss-match between the Perl code that is running (that they updated) and the code that is compiled (that Apple shipped).

    Basically, you've got a library header and the library object. If the header and the object don't match exactly, you've got problems. No interface was changed, no major important pieces were changed, but now you've got 1.23 headers and a 1.22 object. Change one or the other, and everything will be fine again.

  • by 1stvamp ( 662375 ) on Wednesday February 18, 2009 @11:44AM (#26902389) Homepage

    Or MacPorts, formerly DarwinPorts: http://macports.org/ [macports.org]

  • by ekidder ( 121911 ) on Wednesday February 18, 2009 @11:45AM (#26902391) Homepage

    Well, 1.3 would be going backwards. 22 > 3 after all. Perl module versions can be a bit confusing. You'll find there are a lot of modules that break older versions.

  • Re:WTF (Score:2, Informative)

    by Goaway ( 82658 ) on Wednesday February 18, 2009 @11:47AM (#26902417) Homepage

    The person quoted is Japanese, in case you didn't notice.

  • by pegdhcp ( 1158827 ) on Wednesday February 18, 2009 @11:50AM (#26902471)

    Why are Apple's updater and Perl's CPAN shell both trying to update the same file?

    Probably this is the real point, as mentioned in the TFA:

    "This is another reason why you shouldn't use Perl that comes from vendors," Miyagawa says. "Apple isn't any different from Fedora on this!"

    I might add Mandriva, SuSe and most others. Distribution managers want it just run and be stable for users who do not want to know what is going on inside. If there is a need for messing with details, originally packaged software by developer is the best alternative...

  • by Jay Maynard ( 54798 ) on Wednesday February 18, 2009 @11:53AM (#26902509) Homepage

    CPAN is the closest thing to DLL hell on Unix systems. Modules are updated willy-nilly. No attempt is made to preserve compatibility between versions, or between modules and their dependencies. A company I used to work for had to totally abandon a large program because it was impossible to keep it working in the face of CPAN-driven upgrades, even if they did manage to get it installed the first time (by totally bypassing CPAN).

  • by geekmansworld ( 950281 ) on Wednesday February 18, 2009 @11:56AM (#26902543) Homepage

    As an XServe administrator, Apple's cryptic security updates are really starting to get on my nerves.

    You would expect that, since it is based on multiple open-source projects that are freely available, Apple would push compiled updates through Software Update to its OS X Server users. Instead, they wait so long to patch things (like Amavis or the BIND patch for Dan Kaminsky's DNS bug) that I just get frustrated and apply the patch myself. Then, when a Apple Software Update does come down the pipe, I have to consider if installing it will break my configuration and land me in hot water with my boss when he can't get his e-mail anymore.

    Apple needs to decide if they're going to regularly and consistently update the open-source software that their Server OS runs. If not, leave it alone and let the users apply and configure updates. This wishy-washy, middle-ground, Jobsy-come-lately approach is just an annoyance and an inconvenience.

  • by Anonymous Coward on Wednesday February 18, 2009 @12:00PM (#26902597)

    More importantly, 1.22 is the version of the IO module that ships with Perl 5.8.8, which is the version of Perl that ships with OS X 10.5.

    They are simply keeping the version stable with the version they shipped. (And they only updated it because - due to the update in Perl - it would have broken otherwise.)

  • Re:Apple (Score:4, Informative)

    by ThePhilips ( 752041 ) on Wednesday February 18, 2009 @12:04PM (#26902653) Homepage Journal

    This is not a first Apple's blopper. Any OS vendor might have those.

    The question is how long would it take for Apple to fix that. In the blog post linked Fedora Perl issues actually took about year to deliver fix for RHEL.

    While compiling and using your own build of Perl (or using Fink) on Mac OS X is absolutely OK, under RHEL that might easily screw up your RH support contract...

  • by Anonymous Coward on Wednesday February 18, 2009 @12:08PM (#26902707)

    Huh? The opposite is true. CPAN, if anything, is more akin to a Linux distribution's package repository.

    Would you say the same thing about, say, Debian's apt-get and friends?

    Chances are you wouldn't, but that's exactly what CPAN's like. You have to use it correctly, though, and chances are that if you had trouble with it, you weren't.

    (In particular, you should not blindly install updates all the time when there's no need, without even so much as testing them on non-production systems first. Again, consider following the trunk of any Linux distro, package-wise - would you expect things that aren't part of the distro to never break when libraries etc. are updated and new versions installed? Of course not.)

  • by DJRumpy ( 1345787 ) on Wednesday February 18, 2009 @12:17PM (#26902817)
    Did you ever consider that Sims 2 may not have implemented Quicktime to Apples standard? Since nothing else appears to have broken, then it is also possible that Sims 2 has a poor or improperly coded implementation. As a designer, I'v done this myself a few times by not following the documentation.
  • by PerlDudeXL ( 456021 ) <`moc.liamg' `ta' `ekcideul.snej'> on Wednesday February 18, 2009 @12:20PM (#26902855) Homepage

    This is a classic problem with most *nix distribution packages and CPAN usage. This is not Apple specific.

  • Re:Progress! (Score:3, Informative)

    by morgan_greywolf ( 835522 ) on Wednesday February 18, 2009 @12:32PM (#26903005) Homepage Journal

    Not to pick nits too much here, but

    1) Apple stopped using 5.25" FDDs well before the 1990s. Every Mac that came with a floppy drive from their inception in 1984 came with a 3.5" FDD.

    2) You can always buy a third-party CRT if you want a CRT on your Mac, iMac excepted (obviously). Aside from that, having used expensive color-calibrated displays and printers and so forth with high-end color management, etc., I'll let you all in on a big secret: There's no such thing as true color matching. The laws of physics don't allow for it (light vs. pigment).

    3) By the time most need to replace the battery in your notebook, it's usually time to get a new notebook. ;)

    4) Another big secret: It's perfectly possible to write clear, self-documenting code in Perl. It's only the fact that Perl programmers seem to refuse to do this that allows Python to exist ;).

  • by fl!ptop ( 902193 ) on Wednesday February 18, 2009 @12:32PM (#26903009) Journal

    shouldn't the new version have been named 1.3 or even 2.0?

    from the IO.pm changelog: [perl.org]

    IO 1.23 -- Sat Mar 25 19:28:28 CST 2006

    • Adjust the regression tests to use t/test.pl when $ENV{PERL_CORE} is defined
    • Reduce number of calls to getpeername
    • Call qualify on format name passed to format_write. Bug reported by Johan Vromans
    • Reduce calls to getprotobyname/number. Patch from Gisle Aas
    • Remove references to file TEST used in core so appropriate tests are skipped during an install from CPAN
    • Add method say to IO::Handle
    • Performance improvement for IO::File::open
    • Don't warn about a directory being closed in the DESTROY

    looks to me like it's mostly bug fixes and optimization, and not a major rewrite (which would more likely warrant a major version change).

  • by TJamieson ( 218336 ) on Wednesday February 18, 2009 @12:44PM (#26903185)

    With MacPorts you can provide a keyword before installing to see what options an install might have.

    So for instance, for apache2 you might type:
    port install apache2

    to install. Before doing this, try:
    port variants apache2

    This should produce a list. Hopefully X11 is in there (I can't verify right now). Anyway, find any options you want to enable or disable, and reform your install to look like this:
    port install apache2 +enable_option -disable_option

    This will usually let you strip away a goofy dep like X11 from programs that don't really need it.

  • by Tokerat ( 150341 ) on Wednesday February 18, 2009 @12:55PM (#26903345) Journal
    Quicktime is used on the Mac for much more than just showing a video - converting sound and image files from any format to any format (the reason my program can play AIFF, wav, MP3, AAC, etc is because Quicktime converts it to a stardard format for me). Therefore if the game is multiplatform like the Sims and all the sound effects are .wav files, Quicktime will probably be used as the standard API to convert them for playback.
  • by MisterSquid ( 231834 ) on Wednesday February 18, 2009 @01:06PM (#26903511)

    Apple seems to have a separation between its left-brain UNIX underpinnings and its right-brain Quartz GUI.

    For example, with the last several Security Updates, which contain very little information about what all's rolled in, Apple modifies /etc/postfix/main.cf

    inet_interfaces = all

    to

    inet_interfaces = localhost.

    This effectively breaks all Internet-accessible postfix installs. Now, the question is why does Apple apply this to postfix installations explicitly enabled as Internet-accessible? I can't think of any good answer for this except as part of some other bass-ackwards security measures Apple applies in a schizophrenic attitude to the server functions of its UNIX-based client OS.

    For another example, the Aiport Extreme Base Station prior to firmware 7.3.1 had a version of DMZ host (default host in Apple bizarro-world) that worked flawlessly. In April 2007 or thereabouts, Apple rolls out firmware 7.3.1, since which default host is broken for only for BIND (UDP port 53) and all mail ports (587, 110. 995, etc) but works for WoW, BitTorrent, and all other ports. WTF?! If I set my router to designate one computer as the default/universal host, why is it still blocking certain ports that have to be opened using port mapping?

    This split-mind on UNIX vs. GUI seems to pervade Apple's mentality everywhere which is especially problematic to people like me that are not full-time developers but make extensive use of UNIX-layer services.

    Really stupid stuff, Apple. I wish you'd cut it out.

  • by 99BottlesOfBeerInMyF ( 813746 ) on Wednesday February 18, 2009 @01:15PM (#26903647)

    Serious question. When they could use Debian instead, and given these problems, why does anyone use Apple servers?

    If you're a sysadmin, I imagine it is because you need one of the few bits Apple does better right now (like CalDAV) or some Apple specific technology to support Mac clients (Spotlight Server).

    If you're not a sysadmin, because you're looking for an easy to admin server that you don't need any real skills to get configured and keep running.

  • Re:Apple (Score:2, Informative)

    by emm-tee ( 23371 ) on Wednesday February 18, 2009 @02:01PM (#26904219)

    Oh, I see. I was under the impression that the phrase "It just works" was a synonym for something like "It simply works". Apparently it is a synonym for "It barely works".

    OK, that was a bit unfair. Every OS gets the occasional problem when doing updates. Assuming that there is a forthcoming fix in the near future, there is no need to obsess about it.

    That is rather unfair -

    The problem only affects certain "knowledgeable" users who changed certain operating system files.

    An operating system update can hardly be expected to work-around all the hacks people have made to the operating system's own files.

    If different versions of the files were required by the user, they should have been installed in a separate location.

  • by dodobh ( 65811 ) on Wednesday February 18, 2009 @02:48PM (#26904865) Homepage

    No, this is a compiled language problem. The module is an XS module, and it has components written in C. The Perl update causes a mismatch between the library referenced by the user's compile and the system supplied one.

    Just another form of DLL hell.

    If this was a Pure Perl module, this issue would never have mattered. Scripting languages have the same problems as any compiled language when you break libraries.

    And if you are upgrading your base code in production without any form of testing, your code deserves to crash.

  • Re:Apple (Score:3, Informative)

    by jbolden ( 176878 ) on Wednesday February 18, 2009 @03:27PM (#26905593) Homepage

    You can use the darwin ports version and get the latest perl. Apple supports a stable Perl in line with their mainstream users and an up to the minute Perl for their development community.

  • Re:Apple (Score:3, Informative)

    by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Wednesday February 18, 2009 @03:43PM (#26905865) Journal

    Who would use OS X for serious Perl work anyway?

    I suppose, people who prefer OS X to Linux. In fact, the Ruby community seems to be using OS X quite a lot, lately.

  • by chromatic ( 9471 ) on Wednesday February 18, 2009 @03:44PM (#26905873) Homepage

    The cpan command is a thin wrapper around the CPAN module.

  • by bcrowell ( 177657 ) on Wednesday February 18, 2009 @05:10PM (#26907273) Homepage

    You absolutely need to install the latest perl before you use it - because the perl (or the modules installed with it) installed with your OS is always too old for any particular module you want to install

    I've been using perl for about 8 years, and I've never encountered any such problem. For example, I stayed with perl 5.8 for quite a long time before switching to 5.10, and I never had any problem getting CPAN modules to compile.

    and even then you have a chance that the module you want is either broken, or depends on a currently broken module.

    This isn't a problem with CPAN, it's a problem with the author or maintainer of that module. For instance, I made the mistake of writing an app that depended on Audio::Play and Audio::Data. Then when I switched my desktop machine from BSD to Linux, I found out that I couldn't get it to compile on Linux. I'm a little less naive now. If you check the CPAN bug reporting system [cpan.org], you'll see that there are several important bugs in these modules that are years old, and haven't been fixed. If you look at the reviews [perl.org] on CPAN, you'll see clear signs of trouble. If you go to the parent module's page on cpan [cpan.org], and click on Perl/Platform Version Matrix, you'll see that it fails its test suite on a lot of platforms, on a lot of versions of perl. None of this is a big secret. You just have to do a little bit of homework before you hitch your wagon to a particular CPAN module.

  • by falconwolf ( 725481 ) <falconsoaring_2000 AT yahoo DOT com> on Wednesday February 18, 2009 @05:58PM (#26908045)

    That's funny... since 2000, MS has had two releases you'd have to pay to upgrade to... How many has Apple had? more than two...

    How much do those upgrades cost? The cheapest Best Buy sells is the Microsoft Windows Vista(TM) Home Premium Upgrade with Service Pack 1 - Windows [bestbuy.com] for $130, the same as an Apple upgrade. And a Leopard family pack [apple.com] which allows Leopard to be installed on 5 Macs costs $200. - Microsoft Windows Vista(TM) Ultimate with Service Pack 1 [bestbuy.com] cost $320 at Best Buy. Microsoft Windows Server 2003 Enterprise Edition w/SP1 [google.com], with 25 clients costs more than $3000. Meanwhile Mac OS X Server v10.5.4 [apple.com] with a 10 client license cost $500.

    So yes Apple upgrades come more frequently, and who doesn't want frequent upgrades, however they cost less than Microsoft upgrades.

    Falcon

The key elements in human thinking are not numbers but labels of fuzzy sets. -- L. Zadeh

Working...