I noticed that cyrus-sasl2 fails to crossbuild from source. It uses the
wrong compiler in various places. Let me summarize:
* The makemd5 tool is executed during build, but not installed into any
binary package. Thus it needs to be built with the build arch
compiler, but the upstream source currently selects the host arch
* The upstream source adds -ldb as a Makefile prerequisite. Thereby, it
accidentally exploits an area of make where architecture awareness is
exhibited: Make searches for -ldb in using its build(!) arch search
path. Since -ldb is only requested for the host architecture, that
search fails. The proposed solution here is to remove -ldb from the
make dependencies while still linking it.
* The Debian packaging builds a sample server and client and uses the
build arch compiler. Thus linking fails, because no build arch
version of -lsasl2 can be found. The solution is to use the host arch
compiler here as those binaries are installed into binary packages.
All of these these fixes can be found in the cumulative patch attached
to this bug report. Please consider applying it. If you have questions
about the proposed fixes or identified issues, don't hesitate to ask.