Solaris Fail

Ovid on 2009-10-02T13:55:55

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.


Synchronize your versions

jjore on 2009-10-02T16:46:03

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.

gnu?

jsut on 2009-10-02T16:57:20

That's an example of why we install all of the gnu tools on our solaris machines at work.

Solaris

vek on 2009-10-02T22:43:18

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.

So, 'Solaris Fail' is a tautology, right?

Ron Savage on 2009-10-02T23:19:59

Hi Folks

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

Install Perl in order to install ack!

Syn

djberg96 on 2009-10-03T17:19:14

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.