Well that’s not going to work then

A short while ago I posted about the problems when combining Xcode’s -Wall and -Werror flags with pkg-config to get include directory flags.

I’ve just been through my configure script doing the necessary work to replace the -I flags with -isystem. In the end it turned out to be fairly straightforward to do it in just for OSX. But there are unintended consequences…

The application uses Qt to build the user interface and as part of the build uses Qt’s moc to generate some intermediate sources. moc needs to be passed the C/C++ preprocessor flags, but it only recognises -I, not -isystem and therefore throws an error.

It looks as though what I’ll need to do is maintain two separate copies of the flags, one for compiling code and one for moc. Fairly hideous, but at the moment I see no other choice.

Posted in Computing, Projects | Tagged , , | Leave a comment

Swimming, 24th April 2017

As I don’t swim at the weekend I thought I’d give the latest Swimfit session another crack first thing this week:

12 lengths front crawl
8 lengths breaststroke
4 lengths backstroke
1 minute rest
2 x ( 2 lengths each of front crawl, backstroke, breaststroke ) 15 sec rest after each length
8 x ( 1 length each of front crawl, backstroke, breaststroke, 30 sec rest )
10 lengths fast front crawl, 30 seconds rest every 2 lengths
8 lengths easy front crawl

I still can’t do it in the expected 55 minutes. I think my breaststroke and backstroke just aren’t fast enough. By my reckoning in the above set there are ten and a half minutes rest, leaving forty-four and a half minutes swimming for seventy-eight lengths which is just over 34 seconds per length. I can’t do that in breaststroke and backstroke. In fact, covering 1950m at 34 seconds per length is a pretty reasonable pace (for me, at least) just sticking to front crawl.

For the previous session the timing was sixty minutes for three quarters the distance, mostly in front crawl and the session before that allowed seventy minutes for seventy-four lengths, again mostly front crawl though there were four lengths of kick. On the other hand the next session asks for about sixty lengths in twenty-seven minutes (with rest time on top). I just can’t see that happening in the near future. Perhaps I need some other guide as to when to move on to the next session.

Anyhow, having done the session I made the distance up to 2,700m with front crawl, until I was kicked out of the lane to make room for a swimming lesson 🙂

Total distance for the month: 30,300m
Total distance for this year: 137,300m
Distance compared to annual target: 24,700m under

Posted in Swimming | Tagged | Leave a comment

A different sort of MOAB

Over the winter we had a few trees in our hedges decide that they couldn’t stand life any longer and fell into part of the orchard. Over the last week or so I’ve been out there with the chainsaw, removing what would be suitable for the log-burner this winter (or even in the chiminea over the summer) and stacking what was left (including some savage bits of blackthorn) around a large old sycamore stump. Eventually I ended up with a heap about three to four metres across and perhaps five metres tall.

Very little effort was required to get a fire started and I was amazed how fast it got going. At one point we had flames that were getting close to ten metres high. Of course I forgot to take pictures, but my daughter appears to be permanently attached to her phone these days and she has some videos. I shall try to get a copy of them from her. Once it had died back a bit both my son and daughter toasted marsh mallows on the end of some sticks of green willow. I remember when we had bonfires in my own childhood my parents used to wrap up potatoes in baking foil and put them in the hot ashes to cook once the fire had died back. I really must try that again one day.

Posted in Smallholding | Leave a comment

Taunton & Exeter Level 1 Meet at Millfield

My Easter weekend was spent coaching swimmers (including, to be fair, my own offspring) at the Taunton and Exeter Level 1 meet at Millfield pool. I do enjoy this sort of stuff, but as one nears the end of a couple of 7:30am to 6pm days in an environment designed to be comfortable for people wearing, well, not a whole lot, it does feel exceptionally draining.

For our club it was mostly a chance to get in a bit of practice at swimming in a long course (50m) pool and a last-ditch attempt to get qualification times for the Regional Championships. It looks as though we weren’t the only ones either. For me it’s about an hour drive, but it’s our nearest 50m pool so we have to live with it. There were other swimmers there from as far afield as Birmingham, London and even Edinburgh though.

Highlights of the meet included…

  • One of our swimmers absolutely smashing his personal best times in a couple of events, with no prior indication that he would be even remotely close to the times he achieved
  • My daughter achieving adding another regional qualifying time, giving her five events in total at her first regionals
  • The MC, who made an excellent effort at trying to liven up the tedious job of announcing all the heats and swimmers names, often whilst wearing a pair of armless sunglasses. I assume he must be a Matrix fan
  • A swimmer (from Street Swimming Club, I believe) who I’d guess was in his mid-teens turning up for the warm-up wearing a pair of trunks with a girl’s costume over the top, and carrying the entire thing off with some aplomb. I assume he either lost a bet, or was in the process of winning one

All in all it was a very well-run meet. I shouldn’t be in the least surprised if we’re back there next year.

Posted in Swimming | Tagged | Leave a comment

OSX fun with pkg-config and Xcode

In the configure script for the release of oacapture that I’m currently working on I’ve made fairly heavy use of pkg-config to determine compiler and linker flags for installed packages and to check installed versions to see if they provide the necessary functionality. Other than the slight niggle that when adding, say, include directory locations for multiple packages can cause duplication of the flags it works very nicely.

When doing development work I prefer to pass the flags -Wall -Werror to the compiler when building my own code and if any warnings cause the build to fail I tidy up the code to fix the problem.

I’ve run into an awkward situation with recent versions of Xcode however. The libusb-1.0 package makes fairly heavy use of static inline functions in its header files and for reasons I’m currently unable to justify to myself Xcode flags a warning if these functions are not used. Of course with the above flags set this halts the build, and I do make fairly heavy use of libusb 🙁

I have discovered that there is a “workaround” whereby replacing the -I compiler flag with -isystem prevents the compiler throwing warnings for files in the specified directory. Seems fairly ugly to me, but there you go. Replacing the flag manually does indeed appear to fix compilation. Of course there’s a problem once you start using flags generated by pkg-config because it still uses -I. There is the temptation to fudge something up to convert -I to -isystem, but it’s really not pretty. I can’t see as I have much choice though, unless Apple care to fix their compiler implementation to work the way a sane person might expect it to.

Posted in Computing, Projects | Tagged , , | 1 Comment

Swimming, 21st April 2017

Another front-crawl only day as we’re back to the normal swimming timetable at the pool now and there’s not much time available that works for me on Fridays. 2.2km front crawl today.

Total distance for the month: 27,600m
Total distance for this year: 134,600m
Distance compared to annual target: 25,400m under

Posted in Swimming | Tagged | Leave a comment

Swimming, 20th April 2017

Another repeat of the current Swimfit session and I’m still struggling with the backstroke. I’m really not sure how much I’m progressing with this, but I’m going to keep pressing on with it.

12 lengths front crawl
8 lengths breaststroke
4 lengths backstroke
1 minute rest
2 x ( 2 lengths each of front crawl, backstroke, breaststroke ) 15 sec rest after each length
8 x ( 1 length each of front crawl, backstroke, breaststroke, 30 sec rest )
10 lengths fast front crawl, 30 seconds rest every 2 lengths
8 lengths easy front crawl

After this I made the distance up to 2,200m with front crawl.

Total distance for the month: 25,400m
Total distance for this year: 132,400m
Distance compared to annual target: 25,600m under

Posted in Swimming | Tagged | Leave a comment

Swimming, 19th April 2017

A longer break than I’d planned, thanks to work getting in the way on Tuesday and preventing me getting to the pool. I was feeling tired despite five days off even so and as a result I just ploughed through some 2.9km of crawl to get myself back into things.

Total distance for the month: 23,200m
Total distance for this year: 130,200m
Distance compared to annual target: 25,800m under

Posted in Swimming | Tagged | Leave a comment

Swimming, 13th April 2017

Tough session today. I could still feel the tiredness in my arms (and a certain amount of stiffness in my legs) from yesterday’s session, so it was pretty much a cause of getting my head down and pushing through what I wanted to get done. I can’t deny that towards the end of my 2,500m of front crawl I was probably getting a bit ragged.

Total distance for the month: 20,300m
Total distance for this year: 127,300m
Distance compared to annual target: 20,700m under

Posted in Swimming | Tagged | Leave a comment

Swimming, 12th April 2017

Another repeat of the last Swimfit session:

12 lengths front crawl
8 lengths breaststroke
4 lengths backstroke
1 minute rest
2 x ( 2 lengths each of front crawl, backstroke, breaststroke ) 15 sec rest after each length
8 x ( 1 length each of front crawl, backstroke, breaststroke, 30 sec rest )
10 lengths fast front crawl, 30 seconds rest every 2 lengths
8 lengths easy front crawl

then made the distance up to 2,500m with front crawl.

It was unexpectedly quiet in the pool today and I had a lane to myself which made doing backstroke safer. Didn’t quite manage to complete the set in the suggested time so I’ll be trying it again next week.

Total distance for the month: 17,800m
Total distance for this year: 124,800m
Distance compared to annual target: 21,200m under

Posted in Swimming | Tagged | Leave a comment