I completely overlooked it, in you ldd output there are also motif libs in. So it is a runtime dep as well.

From your build.log I see that the buildsystem is not respecting the host CC. It should not call gcc but e.g. x86_64-pc-linux-gnu-gcc