Hi Sam, On Tue, Mar 02, 2021 at 11:44:47AM -0500, Sam Hartman wrote: > First, some of the headers in krb5-multidev aregenerated and are not > guaranteed to be the same between the host and build. > So, the official interface is that you had better use the right > krb5-multidev or you might be very sad. > In practice, I think it will generlaly work okay on the Debian > architectures if you mix and match, but no guarantees.
This suggests that I could not fully transmit what I was trying to say. A "Build-Depends: krb5-multidev" will of course result in the host architecture krb5-multidev package. However, running krb5-config.mit --libs will then produce a build architecture -L flag. You can easily try this in an essential chroot: # dpkg --print-architecture amd64 # dpkg --add-architecture ppc64el # apt-get update ... # apt-get install -y krb5-multidev:ppc64el ... # krb5-config.mit --libs -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err # The thing I was proposing to change here was making it produce the host architecture -L flag without exporting CC at the cost of sacrificing "Multi-Arch: same" (i.e. coinstallability of krb5-multidev with itself). > Secondly, upstream's position is people should use pkgconfig and that > krb5-config is a legacy interface that is semi-deprecated. Great. Using pkg-config will fully resolve the issue this bug is about. Indeed making dovecot use pkg-config was my second suggestion and this convinces me that it is the better solution for this case: Using a non-deprecated interface that actually works. > So, I understand your options now, and think that exporting CC is a fine > solution for this case, but preferring pkgconfig to changing krb5-config > is what upstream and I would recommend. I think you rate exporting CC before using pkg-config before changing krb5-config. Given your previous paragraph, I'd sort using pkg-config before exporting CC though even though it is slightly more work to do so. But we both sort changing krb5-config last now. I suggest that we wait for input from the dovecot maintainers now. Thank you for your help n understanding this at a deeper level. Helmut