Bug 291855 - net/samba423: build fail: In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46: third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
Summary: net/samba423: build fail: In file included from ../../third_party/heimdal/kdc...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Samba Team (mail alias)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-21 05:23 UTC by Ivan Rozhuk
Modified: 2026-09-24 22:01 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (samba)


Attachments
Failed build on 14.4 with gss using security/krb5 (15.24 KB, application/x-xz)
2026-06-26 01:03 UTC, Konstantin Belousov
no flags Details
Failed build on 14.4 with gss using vendored heimdal (128.86 KB, application/x-xz)
2026-06-26 01:04 UTC, Konstantin Belousov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2025-12-21 05:23:03 UTC
FreeBSD stable/15

# make showconfig
===> The following configuration options are available for samba423-4.23.4:
     ADS=off: Active Directory client
     AD_DC=off: Active Directory Domain Controller(implies PYTHON3)
     CLUSTER=off: Clustering support
     CUPS=off: CUPS printing system support
     DOCS=off: Build and/or install documentation
     FAM=on: File Alteration Monitor
     GPGME=off: GpgME support
     LDAP=off: LDAP client
     MANPAGES=off: Build and/or install manual pages
     PROFILE=off: Profiling data
     PYTHON3=off: Python 3.x bindings or support
     QUOTAS=off: Disk quota support
     SYSLOG=on: Syslog logging support
     UTMP=off: UTMP accounting
====> Bundled dependencies
     BUNDLED_CMOCKA=on: Bundle cmocka instead of depending on a standalone port
     BUNDLED_TALLOC=on: Bundle talloc instead of depending on a standalone port
     BUNDLED_TDB=on: Bundle TDB instead of depending on a standalone port
     BUNDLED_TEVENT=on: Bundle Tevent instead of depending on a standalone port
====> Testing, debugging, and development
     DEVELOPER=off: With developer framework
     MEMORY_DEBUG=off: Debug memory allocator
     TEST=off: Build and/or run tests
====> VFS modules
     FRUIT=off: MacOSX and TimeMachine support
     GLUSTERFS=off: GlusterFS support
====> GSSAPI Security API support: you have to select exactly one of them
     GSSAPI_BUILTIN=on: GSSAPI support via bundled Heimdal
     GSSAPI_MIT=off: GSSAPI support via security/krb5
====> Zero configuration networking: you have to select exactly one of them
     ZEROCONF_NONE=on: Zeroconf support is absent
     AVAHI=off: Zeroconf support via Avahi
     MDNSRESPONDER=off: Zeroconf support via mDNSResponder


...
[2915/3632] Compiling third_party/heimdal/kuser/kgetcred.c
runner ['cc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-O2', '-pipe', '-O3', '-pipe', '-funroll-loops', '-mretpoline', '-fno-delete-null-pointer-checks', '-fno-color-diagnostics', '-DLIBICONV_PLUG', '-fstack-protector-strong', '-isystem', '/usr/local/include', '-fno-strict-aliasing', '-fno-omit-frame-pointer', '-fdebug-prefix-map=/tmp/ports/usr/ports/net/samba423/work/samba-4.23.4=.', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-fstack-clash-protection', '-Wno-error=cast-qual', '-Wno-error=old-style-definition', '-Wno-error=unused-result', '-Wno-error=unused-variable', '-Wno-strict-overflow', '-Wno-error=cast-qual', '-Wno-error=old-style-definition', '-Wno-error=unused-result', '-Wno-error=unused-variable', '-Wno-strict-overflow', '-DSTATIC_samba4kgetcred_heimdal_MODULES=NULL', '-DSTATIC_samba4kgetcred_heimdal_MODULES_PROTO=extern void __samba4kgetcred_heimdal_dummy_module_proto(void)', '-Ithird_party/heimdal_build', '-I../../third_party/heimdal_build', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-I.', '-I../..', '-Ithird_party/heimdal/lib/asn1', '-I../../third_party/heimdal/lib/asn1', '-Ithird_party/heimdal/lib/ntlm', '-I../../third_party/heimdal/lib/ntlm', '-Ithird_party/heimdal/lib/wind', '-I../../third_party/heimdal/lib/wind', '-Ithird_party/heimdal/lib/gssapi/gssapi', '-I../../third_party/heimdal/lib/gssapi/gssapi', '-Ithird_party/heimdal/lib/gssapi/spnego', '-I../../third_party/heimdal/lib/gssapi/spnego', '-Ithird_party/heimdal/lib/gssapi/krb5', '-I../../third_party/heimdal/lib/gssapi/krb5', '-Ithird_party/heimdal/lib/gssapi/mech', '-I../../third_party/heimdal/lib/gssapi/mech', '-Ithird_party/heimdal/lib/base', '-I../../third_party/heimdal/lib/base', '-Ithird_party/heimdal/include', '-I../../third_party/heimdal/include', '-Ithird_party/heimdal/lib/krb5', '-I../../third_party/heimdal/lib/krb5', '-Ithird_party/heimdal/lib/hcrypto', '-I../../third_party/heimdal/lib/hcrypto', '-Ithird_party/heimdal/lib', '-I../../third_party/heimdal/lib', '-Ithird_party/heimdal/lib/ipc', '-I../../third_party/heimdal/lib/ipc', '-Ithird_party/heimdal/lib/hcrypto/libtommath', '-I../../third_party/heimdal/lib/hcrypto/libtommath', '-Ithird_party/heimdal/lib/com_err', '-I../../third_party/heimdal/lib/com_err', '-Ithird_party/heimdal/lib/gss_preauth', '-I../../third_party/heimdal/lib/gss_preauth', '-Ithird_party/heimdal/lib/hx509', '-I../../third_party/heimdal/lib/hx509', '-Ithird_party/heimdal/lib/roken', '-I../../third_party/heimdal/lib/roken', '-Ithird_party/heimdal_build/include', '-I../../third_party/heimdal_build/include', '-Ithird_party/heimdal/lib/gssapi', '-I../../third_party/heimdal/lib/gssapi', '../../third_party/heimdal/kuser/kgetcred.c', '-c', '-o/tmp/ports/usr/ports/net/samba423/work/samba-4.23.4/bin/default/third_party/heimdal/kuser/kgetcred.c.132.o', '-DLIBICONV_PLUG', '-isystem', '/usr/local/include']
In file included from ../../third_party/heimdal/kdc/misc.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/misc.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/process.c:35:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/process.c:35:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/kx509.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/kx509.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/mssfu.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/mssfu.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/gss_preauth.c:35:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/gss_preauth.c:35:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/pkinit-ec.c:70:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/pkinit-ec.c:70:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/krb5tgs.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/krb5tgs.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/default_config.c:36:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/default_config.c:36:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/default_config.c:418:2: error: use of undeclared identifier 'OM_uint32'
  418 |         OM_uint32 minor;
      |         ^
../../third_party/heimdal/kdc/default_config.c:419:2: warning: call to undeclared function 'gss_release_oid_set'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  419 |         gss_release_oid_set(&minor, &c->gss_mechanisms_allowed);
      |         ^
../../third_party/heimdal/kdc/default_config.c:419:23: error: use of undeclared identifier 'minor'; did you mean 'mknod'?
  419 |         gss_release_oid_set(&minor, &c->gss_mechanisms_allowed);
      |                              ^~~~~
      |                              mknod
/usr/include/unistd.h:539:6: note: 'mknod' declared here
  539 | int      mknod(const char *, mode_t, dev_t);
      |          ^
1 warning and 5 errors generated.

In file included from ../../third_party/heimdal/kdc/log.c:36:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/log.c:36:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/pkinit.c:36:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/pkinit.c:36:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/kdc-plugin.c:36:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/kdc-plugin.c:36:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/kerberos5.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/kerberos5.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/digest.c:34:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/digest.c:34:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

In file included from ../../third_party/heimdal/kdc/fast.c:36:
In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
  234 |         gss_OID_set */*oidsp*/);
      |         ^
In file included from ../../third_party/heimdal/kdc/fast.c:36:
../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
  117 |     gss_OID_set gss_mechanisms_allowed;
      |     ^
../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
  118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
      |     ^
3 errors generated.

Waf: Leaving directory `/tmp/ports/usr/ports/net/samba423/work/samba-4.23.4/bin/default'
Build failed
...
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2025-12-21 14:13:11 UTC
Gut feeling: It loads the wrong headers due to heimdal being in base.
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2025-12-21 23:40:44 UTC
Hmm, I cannot reproduce it if I build it with the provided options in an unclean environment on my system straight from ports. It seems like this will need to be debugged from within poudriere.
Comment 3 Mateusz Piotrowski freebsd_committer freebsd_triage 2025-12-22 08:38:32 UTC
I built net/samba423 in a poudriere jail running 15.0-RELEASE no amd64 with the following settings in make.conf:

    net_samba423_SET=   FAM SYSLOG BUNDLED_CMOCKA BUNDLED_TALLOC BUNDLED_TDB BUNDLED_TEVENT GSSAPI_BUILTIN ZEROCONF_NONE
    net_samba423_UNSET= ADS AD_DC CLUSTER CUPS DOCS GPGME LDAP MANPAGES PROFILE PYTHON3 QUOTAS UTMP DEVELOPER MEMORY_DEBUG TEST FRUIT GLUSTERFS GSSAPI_MIT AVAHI MDNSRESPONDER

Samba built just fine. 

Could you post more details about your build environment? How do you set it up to reproduce the issue?
Comment 4 Igor Pavlov 2025-12-27 18:20:11 UTC
Having the same issue.
Comment 5 Igor Pavlov 2025-12-27 18:33:33 UTC
I'm on FreeBSD 14.3-RELEASE. My guess is it's related to the dependency header inclusion order.
Comment 6 Igor Pavlov 2025-12-27 18:38:56 UTC
net/samba422 build has the same issue.
Comment 7 Igor Pavlov 2025-12-27 18:58:29 UTC
The same issue is observed in the net/samba420 and net/samba419 builds.
net/samba419 used to build successfully.
Comment 8 Igor Pavlov 2025-12-27 19:31:20 UTC
There are too many different gssapi.h headers in the ports working directories. I think the issue lies in the include path order, which causes the wrong header to be included instead of the correct one.
Comment 9 Igor Pavlov 2025-12-27 20:37:48 UTC
This is a workaround rather than a permanent fix, but I have successfully built net/samba423 by modifying the "/usr/ports/net/samba423/work/samba-4.23.4/third_party/heimdal/lib/gssapi/gssapi.h" header during the build process.
I changed the include directive from:
#include <gssapi/gssapi.h>
to:
#include "gssapi/gssapi.h"
This ensures that the local header is included instead of picking up a random one from the cluttered directory environment.
Comment 10 Stephan Muhs 2026-04-04 16:32:22 UTC
I have the issue on a newly installed FreeBSD 14.4 system. I guess you can call it "unclean" in that other ports are installed.

Igor Pavlov's workaround worked for me - thank you!
Comment 11 Konstantin Belousov freebsd_committer freebsd_triage 2026-06-26 01:02:41 UTC
So for me the samba 423 does not build with whatever gss option I select.
I use 14.4 jail, and after the python312 bump samba stopped behaving.

I am attaching two logs demonstrating the issue. For krb5 case, it is weird that
samba tried to use /usr/bin/krb5-config instead of /usr/local....  Perhaps this
is why it builds on 15, but then it links to base kerberos instead of declared
security/krb5.
Comment 12 Konstantin Belousov freebsd_committer freebsd_triage 2026-06-26 01:03:19 UTC
Created attachment 272138 [details]
Failed build on 14.4 with gss using security/krb5
Comment 13 Konstantin Belousov freebsd_committer freebsd_triage 2026-06-26 01:04:10 UTC
Created attachment 272139 [details]
Failed build on 14.4 with gss using vendored heimdal
Comment 14 Ivo Karabojkov 2026-07-02 20:46:02 UTC
The error occurs when I try building by poudriere on FreeBSD 15.1-RELEASE-p1. On 15.1-RELEASE the port builds OK.

Here is part of the log:

[00:02:39] runner ['cc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-O2', '-pipe', '-fno-color-diagnostics', '-DLIBICONV_PLUG', '-DLDAP_DEPRECATED', '-fstack-protector-strong', '-isystem', '/usr/local/include', '-fno-strict-aliasing', '-fno-omit-frame-pointer', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3', '-fstack-clash-protection', '-Wno-error=cast-qual', '-Wno-error=old-style-definition', '-Wno-error=unused-result', '-Wno-error=unused-variable', '-Wno-strict-overflow', '-DSTATIC_kdc_MODULES=NULL', '-DSTATIC_kdc_MODULES_PROTO=extern void __kdc_dummy_module_proto(void)', '-Ithird_party/heimdal_build', '-I../../third_party/heimdal_build', '-Ithird_party/heimdal/kdc', '-I../../third_party/heimdal/kdc', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-I.', '-I../..', '-Ithird_party/heimdal/lib/asn1', '-I../../third_party/heimdal/lib/asn1', '-Ithird_party/heimdal/lib/ntlm', '-I../../third_party/heimdal/lib/ntlm', '-Ithird_party/heimdal/lib/wind', '-I../../third_party/heimdal/lib/wind', '-Ithird_party/heimdal/lib/gssapi/gssapi', '-I../../third_party/heimdal/lib/gssapi/gssapi', '-Ithird_party/heimdal/lib/gssapi/spnego', '-I../../third_party/heimdal/lib/gssapi/spnego', '-Ithird_party/heimdal/lib/gssapi/krb5', '-I../../third_party/heimdal/lib/gssapi/krb5', '-Ithird_party/heimdal/lib/gssapi/mech', '-I../../third_party/heimdal/lib/gssapi/mech', '-Ithird_party/heimdal/lib/hdb', '-I../../third_party/heimdal/lib/hdb', '-Ithird_party/heimdal/lib/base', '-I../../third_party/heimdal/lib/base', '-Ithird_party/heimdal/include', '-I../../third_party/heimdal/include', '-Ithird_party/heimdal/lib/krb5', '-I../../third_party/heimdal/lib/krb5', '-Ithird_party/heimdal/lib/hcrypto', '-I../../third_party/heimdal/lib/hcrypto', '-Ithird_party/heimdal/lib', '-I../../third_party/heimdal/lib', '-Ithird_party/heimdal/lib/hcrypto/libtommath', '-I../../third_party/heimdal/lib/hcrypto/libtommath', '-Ithird_party/heimdal/lib/ipc', '-I../../third_party/heimdal/lib/ipc', '-Ithird_party/heimdal/lib/com_err', '-I../../third_party/heimdal/lib/com_err', '-Ithird_party/heimdal/lib/gss_preauth', '-I../../third_party/heimdal/lib/gss_preauth', '-Ithird_party/heimdal/lib/hx509', '-I../../third_party/heimdal/lib/hx509', '-Ithird_party/heimdal/lib/roken', '-I../../third_party/heimdal/lib/roken', '-Ithird_party/heimdal_build/include', '-I../../third_party/heimdal_build/include', '-Ithird_party/heimdal/lib/gssapi', '-I../../third_party/heimdal/lib/gssapi', '../../third_party/heimdal/kdc/gss_preauth.c', '-c', '-o/wrkdirs/usr/ports/net/samba423/work/samba-4.23.8/bin/default/third_party/heimdal/kdc/gss_preauth.c.14.o', '-DLIBICONV_PLUG', '-isystem', '/usr/local/include']
[00:02:39] In file included from ../../third_party/heimdal/kdc/gss_preauth.c:35:
[00:02:39] In file included from ../../third_party/heimdal/kdc/kdc_locl.h:46:
[00:02:39] third_party/heimdal/kdc/kdc-private.h:234:2: error: unknown type name 'gss_OID_set'
[00:02:39]   234 |         gss_OID_set */*oidsp*/);
[00:02:39]       |         ^
[00:02:39] In file included from ../../third_party/heimdal/kdc/gss_preauth.c:35:
[00:02:39] ../../third_party/heimdal/kdc/kdc_locl.h:117:5: error: unknown type name 'gss_OID_set'
[00:02:39]   117 |     gss_OID_set gss_mechanisms_allowed;
[00:02:39]       |     ^
[00:02:39] ../../third_party/heimdal/kdc/kdc_locl.h:118:5: error: unknown type name 'gss_OID_set'
[00:02:39]   118 |     gss_OID_set gss_cross_realm_mechanisms_allowed;
[00:02:39]       |     ^
[00:02:39] 3 errors generated.
[00:02:39] 
[00:02:39] Waf: Leaving directory `/wrkdirs/usr/ports/net/samba423/work/samba-4.23.8/bin/default'
[00:02:39] Build failed
[00:02:39]  -> task in 'kdc.objlist' failed with exit status 1: 
[00:02:39] 	{task 1135022356000: c gss_preauth.c -> gss_preauth.c.14.o}
[00:02:39] ['cc', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-O2', '-pipe', '-fno-color-diagnostics', '-DLIBICONV_PLUG', '-DLDAP_DEPRECATED', '-fstack-protector-strong', '-isystem', '/usr/local/include', '-fno-strict-aliasing', '-fno-omit-frame-pointer', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3', '-fstack-clash-protection', '-Wno-error=cast-qual', '-Wno-error=old-style-definition', '-Wno-error=unused-result', '-Wno-error=unused-variable', '-Wno-strict-overflow', '-DSTATIC_kdc_MODULES=NULL', '-DSTATIC_kdc_MODULES_PROTO=extern void __kdc_dummy_module_proto(void)', '-Ithird_party/heimdal_build', '-I../../third_party/heimdal_build', '-Ithird_party/heimdal/kdc', '-I../../third_party/heimdal/kdc', '-Iinclude/public', '-I../../include/public', '-Isource4', '-I../../source4', '-Ilib', '-I../../lib', '-Isource4/lib', '-I../../source4/lib', '-Isource4/include', '-I../../source4/include', '-Iinclude', '-I../../include', '-Ilib/replace', '-I../../lib/replace', '-I.', '-I../..', '-Ithird_party/heimdal/lib/asn1', '-I../../third_party/heimdal/lib/asn1', '-Ithird_party/heimdal/lib/ntlm', '-I../../third_party/heimdal/lib/ntlm', '-Ithird_party/heimdal/lib/wind', '-I../../third_party/heimdal/lib/wind', '-Ithird_party/heimdal/lib/gssapi/gssapi', '-I../../third_party/heimdal/lib/gssapi/gssapi', '-Ithird_party/heimdal/lib/gssapi/spnego', '-I../../third_party/heimdal/lib/gssapi/spnego', '-Ithird_party/heimdal/lib/gssapi/krb5', '-I../../third_party/heimdal/lib/gssapi/krb5', '-Ithird_party/heimdal/lib/gssapi/mech', '-I../../third_party/heimdal/lib/gssapi/mech', '-Ithird_party/heimdal/lib/hdb', '-I../../third_party/heimdal/lib/hdb', '-Ithird_party/heimdal/lib/base', '-I../../third_party/heimdal/lib/base', '-Ithird_party/heimdal/include', '-I../../third_party/heimdal/include', '-Ithird_party/heimdal/lib/krb5', '-I../../third_party/heimdal/lib/krb5', '-Ithird_party/heimdal/lib/hcrypto', '-I../../third_party/heimdal/lib/hcrypto', '-Ithird_party/heimdal/lib', '-I../../third_party/heimdal/lib', '-Ithird_party/heimdal/lib/hcrypto/libtommath', '-I../../third_party/heimdal/lib/hcrypto/libtommath', '-Ithird_party/heimdal/lib/ipc', '-I../../third_party/heimdal/lib/ipc', '-Ithird_party/heimdal/lib/com_err', '-I../../third_party/heimdal/lib/com_err', '-Ithird_party/heimdal/lib/gss_preauth', '-I../../third_party/heimdal/lib/gss_preauth', '-Ithird_party/heimdal/lib/hx509', '-I../../third_party/heimdal/lib/hx509', '-Ithird_party/heimdal/lib/roken', '-I../../third_party/heimdal/lib/roken', '-Ithird_party/heimdal_build/include', '-I../../third_party/heimdal_build/include', '-Ithird_party/heimdal/lib/gssapi', '-I../../third_party/heimdal/lib/gssapi', '../../third_party/heimdal/kdc/gss_preauth.c', '-c', '-o/wrkdirs/usr/ports/net/samba423/work/samba-4.23.8/bin/default/third_party/heimdal/kdc/gss_preauth.c.14.o', '-DLIBICONV_PLUG', '-isystem', '/usr/local/include']
[00:02:39] *** Error code 1
[00:02:39] 
[00:02:39] Stop.
[00:02:39] make: stopped making "build" in /usr/ports/net/samba423
[00:04:32] =>> Cleaning up wrkdir
[00:04:32] ===>  Cleaning for samba423-4.23.8
[00:04:32] build of net/samba423 | samba423-4.23.8 ended at Thu Jul  2 23:28:31 EEST 2026
[00:04:32] build time: 00:04:32
[00:04:32] !!! build failure encountered !!!
Comment 15 Ivo Karabojkov 2026-07-07 09:13:34 UTC
The build failure occurs only with GSSAPI_BUILTIN option selected. Building woth GSSAPI_MIT is successful.
Tested on:
FreeBSD 15.1-RELEASE-p.1
net/samba423 4.23.8 and 4.23.8_1
Comment 16 Stephan Muhs 2026-09-24 22:01:36 UTC
Same issue still present for Samba 4.23.11_2 in FreeBSD 14.5-STABLE for option "GSSAPI_BUILTIN", with the workaround in comment 9 resolving this. 

"GSSAPI_MIT" also not building successfully.