sophia: upgrade amalgamation builder script