Printing frustrations

I updated my workstation to a newer Solaris build last week, and over the weekend realised I need to print a few documents. My print server is running inside my non-global zone, and until this new build was working very nicely with an Epson Stylus Photo TX810FW. You might recall my post about trying to get a Canon Pixma working…. fortunately for me those days are well and truly over.

I noticed that svc:/application/cups/scheduler:default was in maintenance mode, the logfile claimed that the service was restarting too frequently. This was surprising because as far as I could tell all the scripts the service methods required were working correctly. I was also rather perturbed to see lots of cores from /usr/bin/gs, all with stacks like this:

feffcac8 gs`cmd_put_list_op+0x7c(8938a9c, 938d488, 10, c4b38e4f)
feffcb68 gs`cmd_write_unknown+0x1c4(8938a9c, 938d2e4, 3fff, ffffffff)
feffcc18 gs`clist_stroke_path+0x4d2(8938a9c, 88fa30c, 890b034, feffcc48, 8c3a35c, 8c3a1fc)
feffcc58 gs`gx_stroke_fill+0x70(890b034, 88fa30c, 8938a9c, 0)
feffcd18 gs`do_stroke+0x128(88fa30c, 83c5224, 0, c1ee)
feffcd38 gs`gs_stroke+0x77(88fa30c, 1ee, feffcda0, 8164be4)
feffd8e8 interp+0x1304(88e1c7c, feffd928, feffda58, 814aaf7)
feffd968 gs_call_interp+0xbb(88e1c7c, feffd9e8, 1, feffda54, feffda58, feffd990)
feffd9b8 gs_interpret+0x3d(88e1c7c, feffd9e8, 1, feffda54, feffda58, 85bf244)
feffd9f8 gs_main_run_string_end+0x30(88e1c28, 1, feffda54, feffda58, feffda54, feffda58)
feffda28 gs_main_run_string+0x2c(88e1c28, 85bf244, 1, feffda54, feffda58, 88e1c28)
feffda68 run_string+0x25(88e1c28, 85bf244, 2, 0)
feffe118 swproc+0xe87(88e1c28, feffec78, feffe150, 0)
feffea58 gs_main_init_with_args+0x28c(88e1c28, d, feffeac0, 80e6e8f)
feffea88 main+0x53(d, feffeac0, feffeaf8, feffea7c)
feffeab4 _start+0x7d(d, feffebf8, feffec04, feffec0c, feffec1c, feffec26)

The command line args recorded in the core appeared to be standard, too. More frustration!

Since this is CUPS, I enabled debugging in /etc/cups/cups.conf and proceeded to wade through many megabytes of logfiles. As a sanity check I also ran cupsd from the command line, with “-f” so it didn’t daemonize itself.

While letting the error_log percolate a while, I went searching for some elements of the stack trace in google, and quickly came across Launchpad bug 859630.

The response to the bug submitter in that report is woeful. Not only is there apparently no attempt to figure out what the problem is on the user’s system, there is no attempt to help the user fix the problem on their system and there is no interest shown in any recommendation apart from “upgrade to the latest release.”

Now that I’ve solved my problem, I can see that there’s a subtle hint in that bug report which might help others:

If you see the stack trace above, install Evince’s ``/usr/bin/pdftops``.

I was able to confirm this through checking the cups source for relevant text after seeing these messages in the error_log:

D [17/Sep/2012:12:37:43 -1000] [Job 4] Started filter pdftops (PID 17158)
E [17/Sep/2012:12:37:43 -1000] [Job 4] Unable to execute pdftops program: No such file or directory
D [17/Sep/2012:12:37:43 -1000] [Job 4] Set job-printer-state-message to "Unable to execute pdftops program: No such file or directory", current level=ERROR

Of course, I do have /usr/lib/cups/filter/pdftops (and I did try symlinking it to /usr/bin/pdftops – no joy) – it was the evince version which was truly required.

If you just substitute terms, you see how ridiculous it all is

Today in a channel I frequent there was a discussion about anti-gay marriage. The channel is, in general, pro marriage equality. After learning that a new cow-orker (not in channel) of a channel denizen was a Christian (the term used was “obnoxious god botherer”) who wrote an anti gay marriage post, things got interesting:

bn: anti-gay marriage?
bn: where are your parentheses
f: I'm anti cereal for breakfast
S: (anti (gay marriage)) I think
f doesn't affect me in any way
f: but F.YOU if you dare to eat cereal
S: I'll offer a compromise
S: we won't call it breakfast
S: we'll call it 'morning meal'
f: you're DEVALUING my traditional bacon and eggs on which this country has been built
S: so you see no one will eat cereal for breakfast
f: your cereal lifestyle will cause death
S: I think I'll have some cereal for my morning meal
f: everybody born in 1856 who ate cereal is *dead* now
s: and it encourages bacon & egg eaters to try cereal!
f: s: won't somebody think of the pig farmers!
S: f: is it true that those who eat cereal for morning meal live 20 year less than the bacon & eggs eaters?
S: now I look at it - that seems unlikely
f: waitresses in cafes will be forced to serve up cereal even if they find it nauseating
f: S: I can fund a study to that effect
z: but imagine how miserable those 20 years would be, without bacon!
f: and toast where you cut out a hole with a drinking glass and fry an egg in the gap
z: if you don't eat bacon you're messing with $deity's plan for your life expectancy?

Call For Papers – MultiCore World 2013

Greetings!Earlier this year I attended a very exciting conference in Wellington called MultiCore World 2012. It brought together software and hardware engineers, researchers and business people who are all making multicore computing the norm.

I was really impressed with the breadth and depth of the presentations as well as the networking opportunities, and I’m really pleased to be able to forward MultiCore World 2013 – Call For Papers for the 2013 event.

For those of you who remember Kernel Conference Australia, I regard MultiCore World as the logical successor to that conference.

The homepage for this year’s event is, with both video) and slideware available.

Next year’s event already has some invited speakers lined up ( and I’m going to make sure that I’ve got something submitted too.

An annoyance with jpeglib.h and RawStudio

In the last few days I’ve caught up with building Darktable‘s git master, and was being driven slightly crazy by an error that showed up in the link stage.

The error is as follows:

Undefined                       first referenced
 symbol                             in file
jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned int)
jpeg_resync_to_restart(jpeg_decompress_struct*, int)
jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned int)
jpeg_read_header(jpeg_decompress_struct*, int)
ld: fatal: symbol referencing errors. No output written to darktable
collect2: ld returned 1 exit status
gmake[2]: *** [src/darktable] Error 1
gmake[1]: *** [src/CMakeFiles/darktable.dir/all] Error 2
gmake: *** [all] Error 2

What made this all the more infuriating is a quick elfdump -d on showed that appeared to be linked in correctly.

As a brute-force way of seeing what jpeg_* symbols were being referred to, I ran nm over each object file, dumped that output to a file and then had a look at the output. Lo and behold, one smoking gun!:

[9494]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z14jpeg_std_errorP14jpeg_error_mgr
[9074]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z16jpeg_read_headerP22jpeg_decompress_structi
[7599]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z19jpeg_read_scanlinesP22jpeg_decompress_structPPhj
[8567]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z21jpeg_CreateDecompressP22jpeg_decompress_structij
[7492]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z21jpeg_start_decompressP22jpeg_decompress_struct
[7387]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z22jpeg_finish_decompressP22jpeg_decompress_struct
[9332]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z22jpeg_resync_to_restartP22jpeg_decompress_structi
[9327]      |         0|         0|NOTY |GLOB |0    |UNDEF  |_Z23jpeg_destroy_decompressP22jpeg_decompress_struct
[9053]      |    508832|       254|FUNC |GLOB |0    |13     |dt_imageio_jpeg_read_header
[8554]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_CreateDecompress
[9115]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_destroy_decompress
[8027]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_read_header
[7509]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_read_scanlines
[8449]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_resync_to_restart
[8763]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_start_decompress
[9206]      |         0|         0|FUNC |GLOB |0    |UNDEF  |jpeg_std_error

Notice that there are two entries for each of those functions, one a function with global scope, the other a globally-scoped element with no type (NOTY) specified. The NOTY form is mangled, which indicates the presence of C++ somewhere.

Now wait a second... is a C library, not C++... so what’s going on?

It turns out that with the recent update of RawSpeed, DngDecoderSlices.cpp now calls jpeglib.h functions directly. This is a problem on Solaris because Solaris’ version of jpeglib.h does not have the appropriate C++ guards around the contents of the header file.

While I’ve filed a bug against jpeglib.h requesting that those guards be added, in the meantime I’ve taken a copy of the system version, dumped it into /opt/darktable/include and ensured that my CFLAGS and CXXFLAGS variables have -I/opt/darktable/include.

The diffs are as follows:

$ diff -U2 /usr/include/jpeglib.h jpeglib.h
--- /usr/include/jpeglib.h      Fri Oct 21 09:35:15 2011
+++ jpeglib.h   Mon Aug 20 23:51:35 2012@@ -14,4 +14,8 @@ #define JPEGLIB_H

+#ifdef __cplusplus
+extern "C" {
+ /*  * First we include the configuration files that record how this
@@ -1094,3 +1098,7 @@

+#ifdef __cplusplus
+ #endif /* JPEGLIB_H */

Australia’s TPP involvement (an update on my meeting with DFAT)

I had a very fruitful discussion on Tuesday with three of DFAT’s Trans-Pacific Partnership negotiating team.

Most of my concerns were addressed directly, one (software patents) was not – but not as a result of negotiation secrecy, and I was greatly relieved to hear the negotiators tell me their ground rules for the negotiations. I have an opportunity to provide input on software patents, and I will do that within the next few days.

The first concern that the Deputy (Secretary?) for negotiations addressed was the complaint about secrecy. Sadly, it appears that this level of secrecy is standard operating procedure for a free trade agreement – something that the negotiating parties agreed to at the very start of the process. It is my opinion that this approach must change. The world saw with ACTA, SOPA, PIPA (PROTECT IP Act) and CISPA what the trickle-down effect of such secrecy is, and that secrecy was rejected. I appreciate that there is craft to negotiating international agreements, and that there are times when being conservative with the information a party makes available is a valid negotiating tactic. HOWEVER I think our societies would benefit from opening up this process. When information spreads around the world in a matter of minutes via social media, A lie can run round the world before the truth has got its boots on (Terry Pratchett, *The Truth*). When special interests (whether they’re well funded or not) skew negotiations, I believe people who will be affected by the outcome have a right to know, and that their voices must be heard. This is one of the features we’re supposed to have in a democracy.

We then moved on to intellectual property in general. I expressed my concern that Australia’s position on intellectual property chapter appears (via leaks) to be following exactly what the copyright-maximalist USTR proposed, and expressed the view that I did not believe this was in the best interests of Australia’s content creators or consumers. I get a lot of information on software legalities from organisations such as the Electronic Freedom Foundation, Electronic Frontiers Australia, publishers such as Techdirt and Ars Technica, and people who generally move in those spheres. I read the recently leaked text and opinion pieces related to TPP such as New Leaked TPP Text Puts Fair Use at Risk and Trans-Pacific Partnership Agreement could radically alter intellectual property law. One thing which really troubles me about the leaks is that they are just that, leaks, and we have no idea what the real text is, nor what the negotiating notes are. This colours the opinion pieces and what little we see about TPP that appears in so-called “mainstream” media.

The negotiators expressed frustration with the leaks – they’re not allowed to respond or to put their side (-100 for secrecy again). It was then expressed to me that not only is what was leaked not the current text (no great surprise), but that the negotiating notes also do not match DFAT’s position. The lead for the intellectual property chapter emphasized that my concern about attempts to legislate the maximum that is permissible with a work (or other piece of intellectual property), rather than setting out the minimum protections while well-founded was not reflected in the text.

On the matter of software patents, these have apparently not been covered much so far, which I’m surprised by. I was asked for my thoughts on software patents, and after I’ve collected my thoughts (and references!) I will send those in. I hope to have a separate fruitful discussion on this area.

Generally, we then moved on to the topic of pharmaceutical patents and generic medicines. Easy access to generic medicines is something which I believe is of vital importance for every country, not just Australia. Having read the MSF’s blog post expressing significant concerns about the USTR’s proposal to specifically extend the life of pharmaceutical patents I had two concerns in this area. Firstly, that this would drag the Pharmaceutical Benefits Scheme (PBS) into a significant budget shortfall (and blow out the Health budget in general). Secondly, developing nations would be unable to afford life-saving medications which they currently afford via generics. I look at this as much as a social justice issue as anything else: why should Australia, a rather rich nation, deny (through not really caring about costs) the benefits of cheap and easy access to medication to those nations less fortunate than us? I don’t believe that is a supportable position to have.

The flow-on effect of health crises (whether that’s merely a budgetary problem, or something more serious) in developing nations is that we spend more on medical care-related foreign aid that we could and should be spending on other foreign aid areas. I think Australia should be spending more on foreign aid in general, but I don’t think we should have to spend that foreign aid money on propping up pharmaceutical corporations’ profits.

The negotiators assured me that not only do they get advice from PBS/Medicare/Health and AusAID staff on these areas, but that these domain experts attend the negotiating rounds as well. It was a great relief to find this out, as was the fact that DFAT has been advised by the government that TPP text which adversely affects the PBS and AusAID is a “very clear red line” that they must not cross. I was also pleased to hear that DFAT had expressed Australia’s strong concerns on the USTR’s proposal for pharmaceutical patents. [I think that could be negotiator-language for "no damned way", but I am unskilled in the art



I asked when they expect the negotiations to be finalised, another 12-18 months is the estimate. However, that is still expected to leave some big political items to be done. I didn’t push on what those items might be.

Process-wise, once the negotiations are concluded, Joint Standing Committee On Treaties (JSCOT) receives the text of the treaty, and holds an inquiry. Following the inquiry, a report is made to Parliament and then it is up to the government of the day whether to ratify the treaty. I asked whether changes could be made to the text as a result of the inquiry’s report…. mostly no, is the answer. With the Australia-USA FTA signed during the Howard government, there were apparently some minor wording changes post-negotiation, but it’s generally not the case that changes get made. “You’d start to unravel the whole document” is how it was expressed.

The Deputy expressed an interest in any suggestions I might have on how to improve DFAT’s communication to the public regarding the TPP. I was a little surprised by this since I thought that there would have been sufficient PR people involved already. On reflection, however, I do have some suggestions on what they might consider doing in order to not only make DFAT’s point of view known by the wider public, but to also take some of the heat out of the twitter storms.

The next round of negotiations occurs in the second half of September, after which I will be in touch with the IP lead. The Deputy assured me that they do post-round briefings with stakeholders and interested parties where they’re quite willing to get into the weeds on matters discussed.

I appreciate the opportunity to talk with members of DFAT’s TPP negotiating team, and their offers of continued interaction on this treaty. I will definitely be staying in touch with them on the Trans-Pacific Partnership.

Finally, a sincere thankyou to Dr Craig Emerson, Minister for Trade, for creating the link.

Australia’s Cybercrime Legislation Amendment Bill 2011

Alerted by @JLLLOW, I read the bill text and explanatory memoranda at ParlInfo relating to the government’s Cybercrime Legislation Amendment Bill 2011.

Having made a submission to the #NatSecInquiry, I was rather annoyed to see that this Bill would significantly weaken our existing protections from data harvesting by ASIO, and enable fishing expeditions from other Signatory Nations to the Convention on Cybercrime.

I have just sent the following email to the Senators for Queensland:

I’m writing to urge you to vote against the CybercrimeLegislation Amendment Bill 2011, which is scheduled for debate in the Senate tomorrow.

As crafted, the bill would

  • undermine our international efforts to remove the threat of the death penalty,

  • significantly weaken the protections we currently enjoy from intrusion by ASIO, ASIS or the AFP in our private lives by lowering the barrier of a qualifying Serious Offence from 7 to 3 years,

  • allow provision of data to another Convention signatory for minor civil matters which are not an offence in Australia,

  • create a FISA-like court, but without safeguards,

  • enable “what if” investigations from Convention signatories which do not have an Australian/UK-style independent judiciary system, significantly lowering the barriers

  • removes existing Mutual Assistance safeguards.

The proposed restrictions on how a receiving Signatory may useprovided data are unenforceable and rely on the honesty of thereceiving Signatory’s agency or agencies.

Finally, there is plenty of “intends to seek”-style language, which will enable ASIO and the AFP (whether on their own say-so, for a domestic warrant, or on behalf of a Signatory’s agency) to demand the capture and storage of data in a manner which is intrusive and unjustified.

Yours sincerely,

James C. McPherson

Australia’s involvement in the Trans-Pacific Partnership

Earlier today I had a conversation on twitter with Dr Craig Emerson, Australia’s Minister for Trade, regarding Australia’s involvement in the Trans-Pacific Partnership (TPP). After cogitating on the matter for an hour or two, I sent him the following email:

Dear Dr Emerson,

during our conversation on twitter this evening regarding the Trans-Pacific Partnership, I asserted that secret law is bad law, and that because the TPP is being kept secret, it is therefore bad law. I stand by that assertion.

There have been numerous articles published in the last two years about TPP and its intellectual property proposals. These are based on leaks which so far are the only publicly available source of information about TPP since all negotiating parties (especially, the US Trade Representative) insist that no public comment is allowed until after the document is ratified. It is infuriating to see that DFAT is taking the same approach as the USTR, per Senator Ludlam’s transcript of recent Senate Estimates.[1]

Given the aggressively anti-fair use text which has been leaked([2] and [3]) along with the USTR’s history in pushing intellectual property-maximalism (ACTA and CISPA), as well as the USTR’s insistence that members of the US Congress not be allowed to see the text of the agreement while allowing lobbyists to do so[4], it should not be at all surprising that many people around the world are very concerned about what real effects TPP will have on their rights under the Berne Convention.

Additionally, the prospect of access to generic drugs being restricted through extended patent life at the behest of pharmaceutical companies is a one which will have a massive effect on public health in this nation and any other which trades with the nations making up the TPP. I am very concerned that restricting the availability of generic drugs will massively drive up the price of PBS-covered medications here in Australia.

One of your responses was (

[begin] We brief whomever wants to be briefed. No conspiracy.[end]

I therefore request a briefing from DFAT and your office on Australia’s role in the TPP negotiations and the text which DFAT is negotiating on our behalf. I would also like to know why Australia’s representatives appear to have given away the position which the Howard government’s FTA maintained, and what DFAT expects Australian content producers, rightsholders and inventors (whether pharmaceutical or otherwise) stand to gainin exchange for significantly limiting the rights of Australian citizens.

One final item – during the twitter conversation I insinuated ( that you had sold Australia out when it came to the PBS and Medicare due to the effects of the TPP. I apologise for that remark.





I look forward to hearing from you in the near future.

I had been intending to send a letter to Dr Emerson within the next few days on TPP anyway, because I think it is vital that both he and DFAT know that the interests of the citizens of every nation involved in TPP are being slashed and burned in order to maximise the profits of what some term “old media” and “big pharma”.

While I am more than happy to talk about ways in which we can remove counterfeit products from the marketplace (medications especially, since they can cause significant harm), restricting Fair Use rights can have no good outcome. By placing Fair Use under the proposed “3-step test, rights holders get to arbitrarily restrict analysis, discussion, criticism and commentary on any work which they publish. This would kill off parody and satire. This would prevent our schools, universities and other public institutions (including thinktanks such as the Institute of Public Affairs or Menzies House) from educating people. Another section would prevent discussion of flaws in proposals or existing laws, remove the right to record broadcast TV for later viewing, remove the opportunity to investigate whether a supposedly-secure protocol or device was in fact as secure as claimed.

Dr Emerson asserted that I did not have all the facts on the Trans-Pacific Partnership, and that my mind is made up about it. Absent any details on the text of the agreement as it currently stands (and as it is updated), I see nothing good in it. If, however, the minister and DFAT would care to remove public doubt by providing that text (as I mention in my letter to him), then I might change my mind.

Secret law is BAD LAW.

Oh Can’t Do, what will you screw over next?

I read M1 Transit lanes may hit dead end yesterday, and was struck by the comment from the LNP’s Minister for Transport, Mr Craig Emerson:

"We will always review to make sure that we are getting the best outcome for Queenslanders year in and year out rather than some sort of ideologically driven policy by Labor that is divorced from the reality for motorists," he said.

Having driven in California, coped with the madness which is Beijing’s ring roads, travelled on the expressways in Singapore and made use of Britain’s M25, all of which have transit lanes, I would really love to know how the Minister would describe those roads’ transit lanes. Were they all created by politicians just because they had a strong leftwing bias, or, perhaps, are they a sensible modification to enable the actual flow of traffic? Some of the commenters to that article suggested that the minister who promulgated the T2 lanes was, in fact, a National Party bloke. If Mr Emerson is claiming that he was “ideologically driven” then perhaps he should (a) go and talk to the man, and (b) explain why that Minister is to the left of the current mob.

Not only is there nothing in the Contract With Queensland, I wonder how he’ll cope with the angry talkback radio comments from people who will be forced to spend more commuting time stuck on the M1 as a result.

“Lowering the cost of living for Queenslanders”…. NOT!

I read Speaker to preemptively ban parliament protesters as well.

Ms Simpson said she had signed a directive, which signals her intention to exercise her discretion to refuse access to the public gallery to the Legislative Assembly to anyone not accompanied by parliamentary security pass holders.

She would only exercise her right when there was credible intelligence that protest activity was intended or occurring outside the parliamentary precinct or when individuals or groups were intending to disrupt proceedings of the Assembly

Yeah, right.

I’d dearly love to know how suppressing visibility of parliament’s proceedings (she’s got form, having blocked TV cameras as punishment for coverage of the same-sex marriage supporters heckling her) is supposed to enhance democracy in this state.

Would it be too cynical of me to think that the Singapore-esque majority the LNP has in Queensland will be pretty bloody awful for democracy, for rights, for heritage, for the environment? When you have close to 90% of the seats… you fear nothing.

Harvested some more coffee

I’ve left the coffee trees for a while, they didn’t appear to be ripening much and I was starting to worry that the unripened cherries were going to wither on the tree. Fortunately for me, that hasn’t happened. I credit a few brisk applications of Seasol (as suggested by J’s parents, thankyou!) over the last few weeks, so it’s clear to me that I really wasn’t taking proper care of the plants’ ongoing nutritional requirements. These coffee trees and the vanilla orchid are about the only fruiting plants which I seem to be able to keep going


Here’s what the larger plant looked like yesterday before C and I harvested the most ripe cherries:


The gross weight was about 1.3kg, and mostly filled this bucket:


After extracting the beans I was left with 725g, and after letting the beans soak overnight and removing the floaters this morning, I’m down to 700g.


I reckon there’s still another 500g of beans to harvest, so with any luck I’ll wind up with a bit over 1kg of homegrown coffee by the end of the month. I’m not sure how much that will cook down to in the roasting process, but it will be fun to see.