This looks like it's caused by the change to the default behaviour of ld a couple of years ago. See for example http://ubuntuforums.org/showthread.php?t=1859400
Libraries need to be listed after...