This is likely a syntax problem with one or more of your wscripts. It
seems from your message that you are mixing versions between ns-3.16 and
ns-3.21 (possibly the GPSR is from ns-3.16 and you are trying to build
it within ns-3.21).
You may need to upgrade the wscript syntax in the GPSR modules. Where
it says this in ns-3.16:
headers = bld.new_task_gen(features=['ns3header'])
it should say this in ns-3.21:
headers = bld(features='ns3header')
and where it says this in ns-3.16:
bld.add_subdirs('examples')
it should say this in ns-3.21:
bld.recurse('examples')