I admit that I am not familiar with the release process of pre-built
binary packages; I might be writing to a wrong mailing list and I
apologize in advance.
All libtool scripts from qt5 (/usr/local/lib/qt5/*.la) contain the
following on their third line:
LIBQt5XXX_VERSION=5.9# The name that we can dlopen(3).
(XXX above stands for the name of a particular library, such as Core,
Network, etc.)
Since shell scripts (that libtool generates) source .la files, sh(1)
fails on unexpected '(' because someone, somewhere omitted a space
before the comment.
Patching /usr/local/lib/qt5/*.la files programmatically by tucking a
space before the hash character brings linking with Qt5 assisted
(encumbered?) by libtool back to life.
--Vadim