Skip to content

Include heimdal into GDK

Igor Drozdov requested to merge id-include-heimdal-into-gdk into main

What does this merge request do and why?

This library is necessary to compile krb5 related changes in Gitlab Shell.

Related issue: gitlab-shell!682 (merged)

Related comment: gitlab-shell!682 (comment 1184275500)

How to set up and validate locally

  1. Install brew dependencies
  2. Go to Gitlab Shell folder cd gitlab-shell
  3. Checkout the main branch git checkout main
  4. Run make

For some users, installing heimdal is enough, some users receive a compilation error as a result:

GOBIN="/Users/igordrozdov/Documents/Projects/gitlab-development-kit/gitlab-shell/bin" go install -ldflags "-X main.Version=v14.13.0-21-g27e5268 -X main.BuildTime=20221124.113306" -tags "tracer_static tracer_static_jaeger continuous_profiler_stackdriver" -mod=mod ./cmd/...
# github.com/openshift/gssapi
../../../../.asdf/installs/golang/1.18.7/packages/pkg/mod/github.com/openshift/gssapi@v0.0.0-20161010215902-5fb4217df13b/name.go:213:9: could not determine kind of name for C.wrap_gss_canonicalize_name
cgo:
clang errors for preamble:
../../../../.asdf/installs/golang/1.18.7/packages/pkg/mod/github.com/openshift/gssapi@v0.0.0-20161010215902-5fb4217df13b/name.go:90:2: error: unknown type name 'gss_const_name_t'
        gss_const_name_t input_name,
        ^
1 error generated.

The error is fixed when CGO_CFLAGS are specified:

CGO_CFLAGS="-I/opt/homebrew/opt/heimdal/include" make

CGO_CFLAGS are related to OS here, so I wonder if they could be specified by GDK

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.

Merge request reports