Better script to get libraries, adjustments to compile for the Q6