Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Friday October 02, 2009
08:55 AM

Solaris Fail

[ #39704 ]

Recently we found another bug with xmllint (which uses libxml) whereby it tells me that valid XML documents fail to validate against our RelaxNG schema. I locally upgraded libxml and the documents validate just fine, so we put in a support ticket to have libxml upgraded.

After receiving confirmation of the upgrade, I tried again and the document still failed to validate. A quick check of my $PATH environment variable indicated that I was using the wrong xmllint, so I used the full path to the correct one. The document still failed to validate. Hmm ... maybe I misunderstood which xmllint I needed.

$ which -a xmllint
no -a in ...

What? A quick check of man which (gotta feel odd typing that) reveals that the Solaris which implementation doesn't include the -a option. This is as useful as shipping a grep program which doesn't allow the -r switch (of course, many Solaris utilities are so crippled as to be useless). Why on earth would Sun do this? Do they just not care about how useful their operating system is?

A quick Perl script dropped in my $HOME/bin/ directory gets around this limitation, but honestly, I hate having to worry about whether the system I develop on is useful. Some unix-beards might not see an issue because they've no problem with typing something like:

grep -l somestring $(find somedir -type f |grep -v svn)

Or you could say "screw it" and type ack -l somestring somedir.

That's one of the reasons I love ack. It does what I really want without me having to worry about the exact syntax of a long string of commands.

I honestly wish more programmers would focus on making easy-to-use tools. It's great having the flexibility to combine a bunch of commands together to perform a complicated task, but honestly, why would I want that to be the default? Most of the time I really just want to get things done. Don't make it hard for me.

End result: it turns out the admins did install a new version of libxml. They just didn't install it on the box we originally requested it for. That was rectified, but they only upgraded to 2.6.26. That still fails to validate a valid document. libxml 2.7.2 also fails to validate the document, but 2.7.5 succeeds. Too bad 2.7.5 won't compile on our Solaris.

It's going to be a long day.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Be careful while upgrading libxml or libxslt to keep your XML::LibXML or XML::LibXSLT libraries within compatible range. $work has used these for awhile and we've learned that it is not ok to upgrade the perl or C library independently without checking that the two consider each other compatible.

  • That's an example of why we install all of the gnu tools on our solaris machines at work.
  • I've developed on Solaris for years and actually think it's quite a nice platform. When we bring a new host online I always ask the nice sysadmins to do two things

    1) Install gnu tools.
    2) Build a stock Perl from scratch.

    Once done, I'm quite the happy developer. But yeah, I've felt your pain in the past. Just that now I know how to make things a little less painful.

  • Hi Folks

    Sounds like all us Slowlaris suffers are coming to the same conclusion:

    Install Perl in order to install ack!

  • I gave up on grep -r a while ago, even on platforms that supported that option, because it just didn't work the way I wanted it to or, in some cases, at all.

    Ack is definitely the way to go.