This problem is solved by running:
export LDFLAGS="-Wl,-allow-multiple-definition"
before running makepanda.