Here are the conspicuous error messages I see just before the build fails:
... ...
checking if TQt is available... no configure: WARNING: You are attempting to compile Trinity without the Trinity Qt Interface installed. Please install libtqtinterface-dev and try again! ... ... configure: creating ./config.status wrong input (flag != 4) at admin/conf.change.pl line 117, <> line 1456.
Is there a libtqtinterface-dev package somewhere?
No, that's what you are trying to build. Did you get my last message suggesting removal of the -j4 flag from your build script?