Git and rpmbuild

  • Excellent overview of one workflow on Stack Overflow.

  • Mandriva shows how to set up rpm macros to use git during rpmbuild.

  • Software project A is kept in git. A depends on unrelated project B, so B is configured as a submodule in A. Unfortunately, A's Makefile assumes B's location in that subdirectory, with no provision for looking for its libraries and header files in the usual locations. Good or whack? @FunnelFiasco: "I concur. It's total bullshit."

Unrelated: xpdf crashes on Ubuntu 12.04. Wow.

Tags: git packagemanagement rant

Meteor shower

This weekend I took the kids out to Aldergrove Regional Park to the Perseid meteor shower party, organized by Vancouver Parks and the local chapter of the RASC. I went last year with my older son, and the younger was quite eager to go this time around. (Clara was happy we were all going this time, too; last year, the younger stayed up 'til 10pm waiting for his brother, and woke up at 5am upset he wasn't back yet.)

We packed up the tent, flashlights, sleeping bags, PB&J, water bottles, stuffies, binoculars, pillows, lounge chairs, blankets, star atlases, and drove out. We got there at 8.30pm or so and it was already packed. The kids help me set up the tent, and then we were off to the activities.

First we got glow sticks:

You need a montage!

And then we went off to get faces painted. That didn't last long, though; we'd already had a very long day with my inlaws and relations by that point, and the kids were bagged. We ducked out of the line after a few minutes, got hot chocolate, then went back to the tent to look at the sky for a while.

Sr. headed off to bed, announcing he "might put his head down for a while". Jr. went with him, but came out in time to watch the ISS fly over. Sr. poked his head out as well, then went back to sleep. Jr. stayed up a little longer, then went to bed about 10.45pm, and I was left with 800 or so of my closest friends.

It was really neat watching the shower with so many people around. There was a park-wide game of Marco Polo, which was funny. And as for the meteors, even before midnight there were a few really bright trails, and everyone would ooh, ahh, and even applaud.

I fell asleep in my lounge chair around 11.30pm, then woke up again about an hour later. There were some really cool trails, but I wouldn't say there was a huge number...I saw one maybe every 2-4 minutes. I finally called it a night at 2am and crawled into the tent.

We got up about 6.30am, ate our PB&J, and started packing up.

Grrr

We picked up some godawful sweet snacks at a gas station (we did it last year, had to do it this year, next year I'm putting my foot down) and drove home. The kids fell asleep in the back, and then again for two hours in the afternoon...and that never happens.

All in all, a fun time. Recommended if you're in the Vancouver area.

Tags: astronomy geekdad

Reading, August 2012

  • "The Mirage" by Matt Ruff. WOW. An excellent, gripping backwords-world novel with the premise that, in November 2001, Christian fundamentalist terrorists crashed hijacked planes into twin towers in Baghdad. I need to track down "Fatherland" by Robert Harris now.

  • "Bad Monkeys" by Matt Ruff. Meh. I finished it, but more out of determined curiosity than anything else. It twisted, it turned, but I just couldn't get into it.

  • "Planetary Astronomy: From Ancient Times to the Third Millenium", by Ronald A. Schorn. Absolutely fascinating overview of the growth of our knowledge of planets, from someone who was involved in planetary astronomy's rebirth in the 60s. Published in 1998; I'd pay good money to see an update that would go over the Mars rovers, Cassini, and the explosion of exoplanet research.

Tags: reading

Nagios: check_mysql_query returns \"(null)\"

Ran into a problem at $WORK today when trying to use the Nagios plugin checkmysqlplugin. I wanted to verify that the table had > 0 rows. The configuration looked like this:

define command{
command_name check_table_size
command_line $USER1$/check_mysql_query -q "select count(*) from example;"  -H $HOSTADDRESS$ $ARG1$
}
define service{
host_name                       foo
service_description             Table size
check_command                   check_table_size!-u nagios -p password -d database -w 1:1000000000 -c 1:1000000000
}

I could run it find from the command line, but Nagios kept getting CRITICAL, and the only output it had was "(null)". I turned on debugging, and kept seeing this:

Done.  Final output: '/usr/lib64/nagios/plugins/check_mysql_query -q 'select count(*) from example'

I finally figured out that the semicolon in the -q argument was messing things up. Removing it and restarting Nagios fixed the problem.

Tags: nagios

Rerunning Bacula jobs from Mutt

I've got Nagios set to alert me if Bacula jobs go too long without running. Then I re-run them. This is a pain, so I made a better way to do this. I've got a Mutt macro that looks like this:

macro index ,b "|rerun_from_nagios_or_bacula.sh\n\n" "Rerun bacula job."

And in turn, the shell script looks like this:

#!/bin/bash

awk '/PROBLEM.*backup is/ {print "run job=" $6 " level=" $7 " yes"}' |
    sed -e's/level=backup//; s#=.*/#=#' |
    ssh backup-server -t bconsole

Of course, a better way of having all this work would be an actually-working scheduler in Bacula. But this makes the pain bearable for one more day.

Tags: bacula

Now those are some badass sysadmins

So one of the first things NASA's gonna do now that Curiosity has landed is upgrade the software:

Sols 5-8: Flight software upgrade. They need to move from version 9 of the flight software, which operates Curiosity as a spacecraft, to version 10, which is designed to operate Curiosity as a landed, roving vehicle. The software was already uploaded to Curiosity while it was on its way to Mars, but it'll still take four days to install and check out the operating system upgrade on both of its redundant main computers.

Tags: nasa curiosity mars

A Newish Beginning

It's been nearly ten years since I started blogging. I counted up my entries earlier this year and realized that a thousand entries were within reach, in time for that anniversary, if only I applied myself. And here we are, last entry dated June 8th -- nearly two months ago. (Perhaps longer by the time I post this...)

I started writing about computers, and that's still what I write most about. I'm a sysadmin by trade, and there's a lot that I want to pass on to other people (or to myself, at a later date): problems to avoid, fixes I've found, war stories to brag about. But I'm becoming...somewhat disenchanted with system administration. I remember being ten years younger and shaking my head with disbelief when a coworker -- old then as I am now -- explained that he did not run a server at home; that was work, and he didn't want to spend his time at home doing work. I couldn't believe I'd ever think that myself.

But I do. My wife's laptop is not backed up regularly; the music server sometimes craps out; I've been meaning to move my website off Linode (who have been great) to my own machine for a month now. But I keep putting it off, and I spend my time on other things: family; other hobbies; reading; watching TV. (There's an awful lot of good stuff on Netflix.)

I've been wanting to write about some of this stuff here, but I don't. Partly that's laziness, or time constraints, or simple reluctance to make public what I think of as private. But partly -- and this is surprising to me, foreign -- I think this isn't the place to put those things. Which is bullshit.

This is my blog. It's got a tech focus, sure, but it's where I write. When I read other people's blogs, I realize that -- shock, horror -- they don't always write about the same things. I like those details -- and if I don't, I know where PgDn is on my keyboard. Yet I've read entries by people, conscious that their blogs are being aggregated on subject-specific sites, apologizing for writing about "unrelated" subjects...or responding to complaints about "unrelated" subjects. Which is also bullshit. It's their place. We're welcome to look, and that's great; their generosity makes our day better. But to quote an admonishment someone's mother gave them, you get what you get and you don't get upset.

I'm not being aggregated anymore, so I don't have to worry about that. (No, you're bitter.) But I still find myself thinking about starting up an "astronomy blog", or a "beer blog". Of course, in a couple years it'll be different: a "coding blog", or a "geology blog", or a "dendrology blog", or a "geneology blog". Which, third time's the charm, is bullshit. I've never understood the nervousness some have about keeping writing about different subjects separated. I hop about, when it comes to hobbies; I hop about, when it comes to life. I'm able to organize subjects without having stupid borders around them. Read, or don't read: that's your job.

So I'm becoming less inclined to write about system administration, just as I'm becoming less focused on system administration. I'm going to be writing more (maybe) on the other things I'm interested in. Fair warning.

TODO:

Tags: meta

Observing report - Friday, August 3rd

(Written up on August 8th, backdated to the 4th to confuse.)

I went out to the neighbourhood park near my house where I usually go. It was only a day after full moon, but I didn't care; it's been a long time since I've gone out by myself with a list of stuff to see, and had a fair chance of doing it.

Speaking o' which, I decided to start being a bit more organized when heading out observing, and to see if I could get a good routine going. There are times when I feel like I flail about, and don't get the most out of my time with the scope. There still has to be time for fun, of course, and there are times when I will just pan around to see what I can see. But I want to avoid both having too many things to look at (and getting frustrated as a result; what fun is taking out six of Sue French's columns when I can't get through more than half of one in a night?), and running out of things entirely and thinking "Now what?"

So I'm going to try organizing things into different sections/purposes:

  • Housekeeping: record seeing/transparency (something I'm still not very familiar with), answering particular questions (like tonight's sky map)

  • Easy/Nice: targets I know and love, or are easy to find (M13, Double Cluster, etc)

  • Medium/Project: tracking down and sketching a new Messier, or finding an easy NGC

  • Challenge: almost put "hard" but I decided to be like Andy and call them "challenges". Dim objects, difficult to track down...galaxies often fall into this category (at least I think so, given that I'm in a bright suburban location). Not too many, or I'm liable to just get frustrated

While observing, I'll hop between categories to keep it interesting.

So, tonight's target list

Housekeeping:

  • Mapping the horizon at the park; there are lots of trees around the south, and I want to be able to predict if/when a target will be obscured.

  • Check if Beta Lyrae is in eclipse; compare it to R and Kappa. Yeah, I could look up the time, but I thought this'd be more fun.

  • Track down NGC 6823 for an eventual try at determining my limiting magnitude

Easy:

  • Double-double (Epsilon Lyrae)

  • M11 - Wild Duck Cluster

  • M13 - Glob in Hercules

  • The gorgeous, wonderful moon

Medium/Project:

  • M16 - Eagle nebula. Any nebulosity, or just the OC? (Yeah, big moon, but let's check anyway.)

  • M15 - Glob in Pegasus

  • M5 - Glob in Ophiucus

  • M27 - Dumbbell nebula

  • Mu Cephei -- Herschel's Garnet, a carbon star

Challenge:

  • IC 4576 and NGC 6633 -- OCs in Serpen Caudens/Ophiucus (pg 191, "Deep Sky Wonders" (DSW))

Observing

Collimated my scope before going out; I guess I'm getting good at this, because it wasn't that hard. Headed out about 9:30pm to wait for dark. Warm night; I didn't use the jacket that I took. Oh, and I greased up the altitude motion with Chapstick, and man is that nicer now.

Horizon map: I had a star map for 10pm printed out, and at the right time started sketching what was obscured. I still need to make a better version of it, but I think I've got enough for a good estimate.

Albireo: Lovely as ever, particularly against the not-yet-dark sky. Definite green tinge to the one, and gold or orange to the other...almost too bright to tell.

Double-Double: split barely at 100x, definitely at 160x. One pair wider; northern pair? Need to get my directions straight one of these days.

M11: Man, this is nice with averted vision; stars winking in and out. Viewed at twilight. Now that I know the sort of hook shape that points to it, it's pretty easy to track down. The V really was evident. Came back to it later at night and was able to resolve it, barely, at 30x; had not been able to do that earlier. At 100x, it almost looks like a starfish, or a Satanic goat head...really.

M13: Again, viewed at twilight; the twinkling is just gorgeous. Came back to it later in the night, and I think I might have left it too long; not sure if it's being lower in the sky, or the moon being up further, or me being tired, but it wasn't as twinkly as before.

M5 was hidden behind a tree, so I didn't view it; came out later, but I was too tired at that point. Star map!

M10: I tracked down this one instead. It took a while to starhop, but I started remembering my way around here from the last time I tried looking at it: last winter, which impresses me no end. A faint blob in 10x50 binos, and at 30x/100x in the scope, but I started to resolve stars at 160x. It was still twilight by this point (10.45pm), and my dark adaptation was nothing to write home about, but it was still quite lovely. I put on the Barlow and went to 200x, and was surprised to find it was not too much; in fact, this helped bring out the twinkling with direct vision. Yes, fainter than M13, but still lovely in its own right.

(My usual technique for tracking down an object, btw, is to figure out where it is with 10x50 binoculars and a star map, then switch to the finder. It's a bit confusing switching between reversed and upright views, but I manage.)

M16: I think I found where this is; I could see a blob in the bino, but very loose in the eyepiece. I did a quick sketch, and compared it later with this one from Jeremy Perez; turns out I got the NW corner of the cluster. Could not see any nebulosity; must try again on a darker night.

M27: Found it! Just visible in binos, and visible at 30x in scope; could not see in the finder though. (I've noticed that things are generally fainter in the 9x50 finder than they are in my 10x50 binos, and I'm assuming it's 'cos I'm viewing with a single eye.) Slight lobe shape at 100x; a little more at 160x, but still faint. I didn't spend a lot of time on this, as I figured this is definitely one for a darker night.

NGC 6823: Tracked down after some effort. It's a loose cluster of stars, with what looks to me like a tobacco pipe in the middle. I compared this with Sue French's description, and yep -- got the right object. Woohoo! Did a quick sketch.

Beta Lyrae: Not in eclipse, as far as I could tell.

M51: For an additional challenge, tried tracking this down to see how it compared to viewing it at my parent's place (very dark skies). Pretty sure I was looking in the right place, but no sign of it.

Luna: Bright, bright, bright, but gorgeous. Found Langrenus, Vendelinus and Petavius along the edge. Wavy viewing at 100x but still found central peak and crack in Petavius. 160x was pretty ridiculous, but found central peak in Langrenus, and some interesting v-shaped bits along the terminator. Sketched Mare Crisium badly, and later identified various bits in it.

Packed up at 1am and came home.

Postmortem

It felt good to be this organized; there was enough to keep the evening filled, but not so much I was crammed. I didn't get everything done I set out to do, but that's fine.

I neglected the challenge objects. I think NGC 6633 was obscured when I went out, so okay. But part of it was leaving them so long. By the time a few hours go by, I'm really quite bagged, and I need to remember that.

I'm quite proud to have found NGC 6823 on my own; it's not that challenging, but it is an NGC object. I'm also quite happy I found M27, M10 and M16; I felt like I was on quite a roll. I think half the trick with these things is to know what to expect in the binos (faint fuzzy, barely visible, better w/averted vision).

I did three sketches (Mare Crisium, M16 and NGC 6823). This was by accidtn; I was just trying out a plastic lid as a template for sketches, and drew three...then I decided to fill them. I think this is a good number for me, and I may roll this into into the challenge/project category.

Overall, a good and fun night, and a good template for the future.

Tags: astronomy

Koan/KVM on CentOS: \"at most 2047 MB can be simulated\"

I had a new VM host at $WORK I was trying to set up, and I kept running into problems when installing a VM with koan/cobbler: it would complain that "at most 2047 MB can be simulated" for a VM. This was on a 64-bit machine, with a 64-bit kernel (CentOS 5.8), with 128 GB of memory installed (and detected), with a 64-bit guest being installed.

In the end, I had neglected to install the kvm package from CentOS, which among other things includes the kvm-kmod module. Once I got that installed and rebooted, everything went fine.

Tags: virtualization kvm centos koan

Torque/Maui jobs failing suddenly and without output? Check disk space

Quick note: I just tracked down a problem with our Rocks cluster (which uses Torque and Maui) where suddenly submitted jobs were nearly always failing instantly and without any output -- even a simple echo hello world failed with zero output. Turned out one of the nodes had filled up / (which, in a default Rocks install, includes /opt/torque and /tmp) completely with the output from a month-old job that ran amok. This node happened to be allocated to most (but not all...) jobs, and so caused a lot of disruption.

I don't know how best to monitor this...

Tags: rocks

Catching up on podcasts

Two of my favourite podcasts collide: Adam Davidson from Planet Money was interviewed by Russ Roberts from Econtalk back in February. Now that I've got a music player again, I'm catching up on those two, plus Basic Brewing and The Jodcast.

Tags: economics

And now it's May

Prompted by fierce internecine rivalry with Tampa Bay Breakfasts, I'm finally putting in an update. My supervisor is my four year-old son, who's busy reading "You are the first kid on Mars" beside me while holding on to Power Ranger and Terl action figures.

Work: I've got a summer student. She was at one of the labs I work with for the last 8 months, and showed a real aptitude for computers. My boss agreed to pick up the bill for her salary, so here we are.

It's working out really, really well. She's got a lot to learn (basic networking, for example) but it is SUCH A WONDERFUL THING to have someone to send off on jobs. "Hey, have you got a minute to..." "She'll take care of it." She can help with what she knows, and what she doesn't she takes careful notes on. I've even had a chance to work on other, larger projects for, like, an hour or two at a time. It's great.

I'm going away for three weeks in June/July, and there's a lot to teach her before then. Fortunately, there are a couple other sysadmins who can help out, and a couple of other technical folk in the lab who can take on some duties. But it's been a real wake-up for me, realizing how could be made easier for someone else. It'd be nice, for example, to have something that'd let people reboot machines easily when they get stuck. Right now, I SSH to the ILOM and reset it there; what about a web page? It'd be its own set of problems, of course, and I'm not going to code something up between now and June, but it's something to think about. Or at least coming up with some handy wrapper around the ipmipower/console commands.

Home: The weather is at last, AT LAST becoming sunny and springlike. I took the telescope out on Saturday -- full moon, so I spent most of my time looking at Saturn. And holy crap, was it amazing! I saw the Cassini division for the first time, the C ring (!) and five moons. I'm starting to regret (a little) having sold the 4.3mm eyepiece; the 7.5mm is nice but does badly in the Barlow, which I suspect says more about the Barlow than anything else. (Also that night: tried looking for M65 and M66, just to see if I could find them in the suburbs under a full moon. Negative.)

I'm trying to port an astronomical utility to Rockbox; it will show altitude and azimuth for planets, Messier and NGC objects. My intention is to use it with manual setting circles on my Dob. The interesting part is that Rockbox has no floating point arithmetic, so it's not a straightforward port at all. Thus I've had to learn about fixed point arithmetic, lookup tables and the like. My trig and bitwise arithmetic are, how do you say, weak from underuse, so this is a bit of a slog. But I'm hopeful.

And now my other supervisor is coming for a status report. Time to go!

Tags: astronomy programming work

The Fried Rice Manifesto

Pretty awesome:

http://www.busydadblog.com/entries/the-fried-rice-manifesto.html

Tags: cooking

Debugging Bacula FileSet exclusions -- an example

A user at $WORK was running a series of jobs on the cluster -- dozens at any moment. Other users have their quota set to 60 GB, but this user was not (long story). His home directory is at 400GB, but it was closer to a terabyte not so long ago....right when we had a hard drive and a tape drive fail at the same time on our backup server.

We do backups every night to tape using Bacula. Most backups are incremental (whatever changed since the last backup, usually the day before) and are small...maybe tens of GB per day. But backups for this user, because of the proliferation of logs from his jobs, were closer to the size of his home directory every day -- simply because all these log files were being updated as each job progressed.

Ordinarily this wouldn't be a problem, but the cluster of hardware failures have really fucked things up; they're better now, but I'm very slowly playing catchup backups. Eating a tape or more every day is not in my budget right this moment.

I asked him if any of the log files could be excluded from backups without any great loss. After talking it over with him, we came to this agreement:

  • His home directory would be backed up (obvs)
  • but within "projects/output", only files that contained "rep0" somewhere in the filename would be backed up.

This would exclude lots of other files like "1rep2.foo", "8rep9.log", etc, and would cut out about 200 GB of useless churn every day.

Bacula has the ability to do this sort of thing...but I found its methods somewhat counterintuitive, so I want to set down what I did and how I tested it.

First off, the original, let's-include-everything FileSet looked like this:

FileSet {
  Name = "example"
  Include {
    File = /home/example
    Options {
      signature = SHA1
    }
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /.zfs
  }
}

We back up everything under /home/example, we keep SHA1 signatures, and we exclude a handful of directories (most of which are boilerplate, applied to every FileSet by default).

In order to get Bacula to change the FileSet definition, you have to get the director to reload its configuration file. But some errors -- not all -- cause a running bacula-dir process to die. So before I started fiddling around, I added a Makefile to the /opt/bacula/etc directory that looked like this:

test:
        @/opt/bacula/sbin/bacula-dir -t && echo "bacula-dir.conf looks good" || echo "problem with bacula-dir.conf"

reload: test
        echo "reload" | /opt/bacula/sbin/bconsole

Whenever I made a change, I'd run "make reload", which would test the configuration first; if it failed, bacula would not be reloaded. (The "@" symbol, in a Makefile, discards standard output.)

Next, I needed a listing of what we were backing up now, before I started fiddling with things:

    echo "estimate job=fileserver-example listing" | bconsole > /tmp/listing-before

The "estimate" command gets Bacula to estimate how big the job is; the "listing" argument tells it to list the files it'd back up. By default it gives you the info for a full backup. (You can also append a joblevel, so you can see how big a Differential or Incremental; I didn't need that here, but it's worth remembering for next time.)

After that, I made another Makefile that looked like this:

test: estimate shouldwork shouldfail

estimate:
        @echo "estimate job=fileserver-example listing" | bconsole > /tmp/listing-after ; wc -l /tmp/listing*

shouldwork: estimate
        grep rep0 /tmp/listing-before | grep projects/output | while read i ; do grep -q $$i /tmp/listing-after || exit 1 ; done

shouldfail:
        grep rep2 /tmp/listing-before |grep projects/output | while read i ; do grep -q $$i /tmp/listing-after && exit 1 ; done ; true

This is a little hackish, so in detail:

  • The estimate target gets an updated listing of what Bacula will back up; the line count lets me eyeball how it compares to the old, all-inclusive listing.

  • The shoudwork target gives me a quick way to make sure that all the files with "rep0" in the name and "projects/output" in the path are still in that updated listing. We grep for these files in the new listing; it either works or exits with error code 1, which make will catch and declare an error.

  • The shouldfail target is similar, except I'm making sure that files with "rep2" in the name are excluded from the new listing and we're short-circuiting the loop if any line is found. The "true" at the end is there to give make a final success; we only make it to that command if the entire loop has not found anything, which is what we want. It's there to make this test a "MUST NOT". (That's probably not explained very well.)

Anyhow: after each change, I'd run "make reload" as root to make sure that the syntax worked. After that, I'd run "make test" as an ordinary user (no need for root privileges) to make sure that I was on the right track. After a while, I got this:

FileSet {
  Name = "example"
  Include {
      File = /home/example
      Include {
        Options {
          signature = SHA1
          Wilddir = /home/example/projects/output
          Exclude = yes
        }
      }
  }
  Include {
    File = /home/example/projects/output
    Options {
      WildFile = "*rep0*"
      Signature = SHA1
    }
    Options {
      Exclude = yes
      RegexFile = ".*"
    }
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /.zfs
  }
}

Again, this is a little counterintuitive to me, so here's how it works out.

  • The first "Include" stanza is the same, except that in the "Options" section we're excluding "/home/example/projects/output". That's what the "Wilddir" and "Exclude = yes" directives are for.

  • The second "Include" stanza puts the "/home/example/projects/output" back in, but modified with two "Options" sections: the first to include "rep0" (a simple fileglob) and the second to exclude everything. What ends up being included by this stanza is the union of those two options: only files named "rep0" in the directory "/home/example/projects/output".

  • Last, the third stanza is our standard "Exclude" boilerplate.

After I was confident that I had the right set of files excluded, I sent the user a list of files to confirm that all was well:

cat /tmp/listing_before | while read i ; do grep -q $i /tmp/listing_after || echo $i ; done > /tmp/excluded

Now, I'm the first to admit that that is ugly. Diff, useless use of cat...lots of objections to raise. But it's been a long day and I got what I wanted. I pointed the user at it, made sure it was okay, and committed the changes.

All in all, this gave me a good loop for testing: it caught fatal errors before they happened, it let me be sure I was excluding the right things, and I was able to work in a stepwise fashion to get where I wanted.

Tags: backups bacula

In case this doesn't make it to Slashdot

Ordinarily, I wouldn't do this...but it's funny because sob.

(EDIT: Accepted!)

Tags:

Fixing BeautifulSoup/Venus errors in Debian

I use Venus to aggregate a number of blogs I read. It works well, but I kept getting lots of complaints about errors in different feeds; it led to some blogs being kept off the page entirely.

Turns out this is a known problem with older versions of BeautifulSoup, the parser used by Venus. Today I was finally motivated to fix it, and I think it's a sign of the sad, sad decline that happens to you after you're 40 that, rather than try something from Debian's experimental branch, or running dpkg-rebuild --no-beautiful-soup errors (sadly undocumented)...I simply followed the suggestions here and copied newer versions of the files into place.

The good: now I can read Matt's blog again. The bad: Matt will be so disappointed in me that he may not even let me buy him beer at LISA this year.

(Alternately -- and this is something that only occurred to me more than a year later -- you can look in Debian Backports. But then, Wheezy's coming out in about six hours or so as I write this...)

Tags:

Downloading MBSA from Microsoft with IE Enhanced Security

This took a while to figure out...While trying to download MBSA from Microsoft, using IE 9 on a freshly patched install of MS Server 2008, I kept getting the error message "Your current security settings do not allow this file to be downloaded." The solution turned out to be to (temporarily!) add "http://download.microsoft.com" to the list of trusted sites (Internet Options -> Security -> Trusted Sites -> Sites).

Tags:

Detailed setup for OrgMode

http://doc.norang.ca/org-mode.html is an excellent tutorial on customizing Org Mode to the nth degree. I keep trying to remember the link, so I'm writing it here to remember...but I highly recommend checking it out.

Tags: emacs org

Brewday!

Got to brew yesterday, and my oldest son helped out:

Decanting

Decanting

Gonna be an amazingly bitter, session hefeweizen.

Tags: beer

Linker error: cannot find -lg2c

I ran into a problem today trying to compile an old Fortran program. Everything was working until the final link:

gcc -o ./DAlphaBall.f77 -O DAlphaBall.o sos_minor_gmp.o alf_tools_gmp.o adjust.o alfcx.o alfcx_tools.o delcx.o truncate_real.o measure_dvol.o dsurfvol_tools.o vector.o write_simplices.o  -lgmp -lg2c -lm
/usr/bin/ld: cannot find -lg2c
collect2: ld returned 1 exit status

The strange thing is that libg2c.so.0 was installed:

$ ls -l /usr/lib64/libg2c*
lrwxrwxrwx 1 root root     15 2010-12-30 12:43 /usr/lib64/libg2c.so.0 -> libg2c.so.0.0.0
-rwxr-xr-x 1 root root 127368 2010-07-05 04:57 /usr/lib64/libg2c.so.0.0.0

After some searching, it seems that libg2c is part of an older version of gfortran, back in the day when it was actually called g77. My problem was that I was using gfortran to compile it (which, therefore, was part of the gcc-4 series) and not g77. On this system, the old version was installed as gcc33-*, and changing the Fortran compiler and CC/LD variables to the appropriate version worked a treat.

Oh, and here's some good technical background on linkers and names.

Tags: programming