Wednesday, 19 March 2008

Linking to different versions of a dynamic library

On Linux there's loads of [dynamic ".so"] libraries in places like /usr/lib. The libraries have version numbers; Major version indicates major (API) changes, whilst the minor version typically relates to bug fixes. These version numbers are firstly enshrined with the library using a special symbol (SONAME) - which is assigned on library creation (using the -soname arg to ld). Also libraries are named with their version numbers libsomething.so.2.3. You can verify this using:
objdump -p libsomething.so.2.3* | grep SONAME

So if you're developing and you want to link to specific version what do you do? Well basically there's no neat trick to get the linker (ld) to link a specific version at compile time :( so you can either:
  • Link using the full path to the specific library version
  • Create a softlink/symlink (ending in ".so" - with NO version) to the specific library version
ldconfig does do some stuff related creating links for libraries but as explained here it won't create the plain ".so" necessary for development - these are usually included as part of a "dev" (usually suffixed by "-dev") package on your system (be it Debian or Red Hat or whatever).

Wednesday, 27 February 2008

Clearing space on a Mac OSX machine

Firstly you might want to check what's using all your space using Disk Inventory X. Then there are quite a few articles (here, here, here) out there describing how to make space by deleting various wierd files. I'm just making a list here ones that I found made a difference (just run sudo rm -rf with dirs below - you can check how much they're taking using df -sk ) - though don't blame me if they bomb your system!
  • ~/Library/Caches/* - Not sure about * but these are ones I've tried:
    • ~/Library/Caches/com.apple.SoftwareUpdate/*
    • ~/Library/Caches/Desktop/*
    • ~/Library/Caches/QuickTime/*
  • /Library/Packages/*
  • /Library/Caches/* - Not sure about * but these are ones I've tried:
    • /Library/Caches/com.apple.SoftwareUpdate/
  • /System/Library/Caches/*
  • /private/var/root/Library/Caches/*
  • /cores/*
If you're running macports then there also these locations:
  • /opt/local/var/macports/build/
  • /opt/local/var/macports/distfiles
[updated 1 May 09]

Wednesday, 20 February 2008

Oyster maximum/full fare con

So the Oyster card in pre-pay can be useful but their full-fare charging is BAD news - their systems opt to charge you if you mess up at all, and even charge you when don't. The following can incur a full-fare charge:
  • Not touching in/out within a station that has multiple gates (e.g. Canary Wharf)
  • Touching in and out at the same station straight after one another - e.g. trains are messed up. (in theory you're only charged a 'platform' fee but in practice if the time between touching and out is too short, and/or you're at an open station with one Oyster reader, then you get charged a fullfare).
  • Error noise when touching out then trying again (again not always but watch out...)
In any of the above cases call the Oyster help line (0845 330 9876) and then dial 4 (for maximum/full fare inquiries) then ask for a refund - they do usually oblige.

Tuesday, 12 February 2008

Vista(32bit) drivers for AMD-8111 AC97 Sound card and I/O core

This was a pain to find and install. It doesn't seem to be supported by Microsoft (though some people report seeing the driver in their distribution). I'm running Vista Business on an (old) Sun W1100z. Basically I managed to install it by getting hold of the Windows® 2000/ME/XP AC’97 Audio Driver Version 1.8.7 or getting the X_1_8_7.zip package (and unzipping it) then going to Device Manager and right-clicking the duff audio device entry and select 'Update driver software...' - choose 'Browse my computer for driver software' and selecting the location where you unzipped the driver package to - making sure that search sub directories is clicked. It should find the driver there.

AMD also have a driver pack that contains all the drivers for the whole AMD-8000™ Series Core Logic - which provides for a variety of functions (USB, HPET, AC'97, etc) - rather like Intel's 'SouthBridge'.

Saturday, 9 February 2008

Google Sketchup install problem on OSX

A friend tried to install Google's latest Sktetchup 6 and despite the fact he's running Mac OSX 10.4.11 it failed to install and complained that "Google SketchUp requires Mac OS X 10.4 or above"?? So I thought I'd take a look...

It turns out that the installer does a check for the OS version which apparently fails - I'm not quite sure why as it looks like an ok check - anyway if you want to install it then you can tweak things to get it going. Basically you can eliminate the check:
1) Download and mount the GoogleSketchUpMEN.dmg image
2) Copy the install package (named something like: FM101326ENA.mpkg) to your desktop
3) Locate the package on your desktop and open it using the Control-click (or right-click) menu 'Show Package contents' - open the 'Contents' folder and locate the info.plist file.
4) Edit the info.plist file - using a text editor (or plist editor), or just use the command line : vi ~/Desktop/FM101326ENA.mpkg/Contents/info.plist and remove the lines starting here:
<key><IFRequirementDicts</key>
<array>
<dict>
........
And finishing here:(about 22 lines)
</array>
5) Locate the installer on your desktop and run it - and it should just work!

Wednesday, 5 December 2007

Vista (install and UAC) problems

  • On installation: Windows could not determine if this computer contains a valid system volume This can occur if you have a USB drive in your machine on installation - see here for details.
  • Turn off Windows needs your permission to continue (known as UAC) - Basically it can be done in a variety of ways (see this handy blog) - like using the user account control panel, msconfig or TweakUAC.

Wednesday, 28 November 2007

Ubuntu upgrading

Using graphical interface:
gksu "update-manager -c"

Or on the command line:

sudo apt-get upgrade
sudo apt-get dist-upgrade

On Ubuntu server:

sudo aptitude install update-manager-core
sudo do-release-upgrade

For more info see the Ubuntu Guide.

Tuesday, 27 November 2007

What Linux (Ubuntu) version am I running?

To display the version of the Ubuntu you're running - run this on the command/cmd line (Or check the contents of /etc/lsb-release):
lsb_release -a

An example response should look like:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty


In theory it should work on any LSB (Linux Standard Base) distro...