Building net-fs/samba-4.3.0 with heimdal fails, as source4/kdc/db-glue.c use HDB_ERR_WRONG_REALM error code, added to external heimdal only in this year (authored on 10, abartlet committed on 31 Jul) in tree, versioned as 1.6.99: https://github.com/heimdal/heimdal/commit/078e6f5dd2fcf50b40ed32e9178afa7c708a19fa Possible fix - to replace it by standard error code (this error code say entry is in another realm, IMHO to authentication logic similar to "NO"): has_version '<app-crypt/heimdal-1.6.99' && sed -i -e 's:HDB_ERR_WRONG_REALM:HDB_ERR_NOENTRY:' source4/kdc/db-glue.c Reproducible: Always
In case you don't want to do this kind of "hack", you can also try "system-mitkrb5" USE flag which enables compilation of samba against app-crypt/mit-krb5 instead of heimdal.
with the flag "system-mitkrb5" some binaries are not installed. Please see Bug 561052.
(In reply to Denis Kaganovich from comment #0) > Building net-fs/samba-4.3.0 with heimdal fails, as source4/kdc/db-glue.c use > HDB_ERR_WRONG_REALM error code, added to external heimdal only in this year > (authored on 10, abartlet committed on 31 Jul) in tree, versioned as 1.6.99: > https://github.com/heimdal/heimdal/commit/ > 078e6f5dd2fcf50b40ed32e9178afa7c708a19fa > > Possible fix - to replace it by standard error code (this error code say > entry is in another realm, IMHO to authentication logic similar to "NO"): > has_version '<app-crypt/heimdal-1.6.99' && sed -i -e > 's:HDB_ERR_WRONG_REALM:HDB_ERR_NOENTRY:' source4/kdc/db-glue.c I'm just a samba user, but I'm curious, did you manage to successfully build samba 4.3.0 in combination with heimdal-1.5.3 with your workaround/fix? Because I run into the following problem: [...] /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: default/source4/torture/rpc/backupkey_8.o: undefined reference to symbol 'hx509_cert_get_issuer_unique_id@@HEIMDAL_X509_1.2' /usr/lib64/libhx509.so.5: error adding symbols: DSO missing from command line [...]
*** Bug 571886 has been marked as a duplicate of this bug. ***
In Bug 572372 I have submitted a new ebuild for heimdal git , however samba spits more error when building against this new heimdal.
*** Bug 572338 has been marked as a duplicate of this bug. ***
(In reply to Víctor Ostorga from comment #5) > In Bug 572372 I have submitted a new ebuild for heimdal git , however samba > spits more error when building against this new heimdal. to get samba-4.3.4 compiled i need to delete source4/heimdal_build/krb5-types.h to force the installed types. and add some dependencies to source4/torture/wscript_build - heimdal_specific = dict(source='', deps='') + heimdal_specific = dict(source='', deps='hx509 hcrypto')
Created attachment 426178 [details, diff] forces systemwide /usr/include/krb5-types.h
Created attachment 426180 [details, diff] fix heimdal build dependencies
mkdir -p /etc/portage/patches/net-fs/samba-4.3.4 curl https://bugs.gentoo.org/attachment.cgi?id=426178 -o /etc/portage/patches/net-fs/samba-4.3.4/heimdal-types.patch curl https://bugs.gentoo.org/attachment.cgi?id=426180 -o /etc/portage/patches/net-fs/samba-4.3.4/torture-compilefix.patch