I believe I have successfully build from the latest Debian source aegisub_3.2.2+dfsg.orig the application Aegisub.
This build follows the Debian guidelines and use the latest available system libraries e.g. luajit_2.1.0~beta3+dfsg-5.1 To achieve the result I did use the patch mentioned here by Paul and coming from openSUSE taking care of luajit 2.1. https://build.opensuse.org/package/view_file/multimedia:apps/aegisub/luabins.patch?expand=1 I did as well add a add-unicode-international-include-unistr.h.patch I am using this list of patches in order to build properly (from debian/patches/series): fix-pthread.patch only-add-timestamp-in-build-credit.patch change-aegisub-command.patch openal-workaround.patch change-default-dictionary-search-path.patch #link-against-system-luajit.patch escape-sequence-lua-5.2.patch link-against-system-luajit-and-remove-vendor-luajit-dependency.patch add-libatomic-dependency.patch add-unicode-international-include-unistr.h.patch add-luabins-support-for-lua5.2-luajit-2.1.patch The aegisub Debian packages are build and available for the last 4 maintained Ubuntu releases in my Launchpad PPA Photo Video Applications. https://launchpad.net/~anton+/+archive/ubuntu/photo-video-apps Unfortunately the upstream source currently hosted at GitHub<https://github.com/Aegisub/Aegisub/> and previously mentioned here, is poorly maintained to say the least since 2014 / 2015, as it looks like there isn't any active developer to speak of, taking care of it. I did just verify in the GitHub git how they did manage to solve the luajit 2.1 FTBFS as Paul commented earlier: 'The upstream IRC channel mentioned that this bug is fixed in git master ... I wasn't able to find the patch in upstream, likely fixed another way.' For sure, they just ditched the system luajit 2.1 libraries and forced use of the older luajit bundled in their vendor sources. Here is the commit describing the action in their 'master' git: commit bc157d9bbc00860fb7019b9c869317809a350ef7 Author: Thomas Goyne <plorkye...@aegisub.org> Date: Sat Mar 3 12:44:31 2018 -0800 Also stub out the `system` lua module that newer versions of busted use I believe their master git maintained at GitHub is utterly not properly maintained at all and unreliable period. If properly patched, the Debian source aegisub_3.2.2+dfsg can still be build properly. I believe as well that aegisub should be back soon in debian testing. https://tracker.debian.org/news/874946/aegisub-removed-from-testing/