Wednesday, January 18, 2012

Rosetta 3.3 and gcc version incompatibility

I was trying to install Rosetta 3.3 on my current system but kept on getting:

``KeyError: "Unknown version number 4.6 for compiler 'gcc'"

Obviously I'm not going to roll back my gcc somehow to get it to install. The solution is pretty damned simple.
From http://www.rosettacommons.org/content/invalid-value-option-cxx#comment-3211

OK, try editing the line of tools/build/options.settings that says:
"gcc" : [ "3.3", "3.4", "4.0", "4.1", "4.2", "4.3","4.4","4.5", "*" ],
to instead have 4.6 as well:
"gcc" : [ "3.3", "3.4", "4.0", "4.1", "4.2", "4.3","4.4","4.5", "4.6", "*" ],

Success! Almost...
then there was:

collect2: ld returned 1 exit status
scons: *** [build/src/debug/linux/3.0/64/x86/gcc/libutility.so] Error 1
scons: building terminated because of errors.
which required me to install zlib1g-dev.

Thursday, January 5, 2012

Right-hand page opening for article class in LateX

So I like to use article documentclass for a variety of reasons, though mostly because I'm used to it. But what if you want your article to be formatted such that each new section opens on an odd (right-hand) page?

Looking around got me to this solution, in the preamble:

\documentclass[a4paper,12pt,twoside]{article}
twoside allows you to have different even and odd headers and margins.

\usepackage[bindingoffset=1cm,margin=2cm, includeheadfoot]{geometry}
 This sets up the margins such that there is a bigger margin to allow for binding.

\newcommand*\stdsection{}
\let\stdsection\section
\renewcommand*\section{%
\clearpage\ifodd\value{page}\else\mbox{}\clearpage\fi
\stdsection}
This does a clearpage whenever a section is on an even page. It works a treat and you can also use it for subsections etc. This does mean that your list of figures and tables also start on a new, odd, page, which is no great change, really.

hat-tip to: http://www.latex-community.org/forum/viewtopic.php?f=5&t=2813&start=0&st=0&sk=t&sd=a
UPDATE: If you don't want to have a section starting on a new page, then just put:
\begingroup
\let\clearpage\relax
[whatever you don't want on a new page]
\endgroup 

hanging at splash screen

So this morning I logged onto my computer only to find that it hung at the splash screen, particularly at the world/network icon. This was a red herring though, because if you left it long enough it said:
"No write access to /home/user/.ICEauthority" and then "could not start ksmserver". After trawling the internet, I came across this solution, which worked for me:
sudo chown group:user /home/user/.ICEauthority 
- where group is your group (for me that was the same name as my user) and user is your username.
Then run
sudo /etc/init.d/kdm restart 
and you should be back in business!

Tuesday, January 3, 2012

could not start process unable to create io-slave klauncher said unknown protocol 'file'

Started getting this error as a pop-up every 10 minutes or so after the recent update: "could not start process unable to create io-slave klauncher said unknown protocol 'file'" with the title of some of my google calendars.

At first I assumed it was a thunderbird problem because I had to delete those calendars from thunderbird because they had stopped working completely with a thunderbird upgrade. However, a quick check of my System Activity showed some akondai resources that when killed caused the same pop-up box to show up. Lo and behold, I had attempted to use akonadi to sync them once upon a time and on the recent update this had started working again. Deleted those from the resources list via Settings->Personal information->Akonadi and we are now annoying pop-up free.