Q: how to build with system Heimdal
cs at samba.org
Tue Oct 29 23:32:16 UTC 2019
On Tue, Oct 29, 2019 at 08:06:42PM +0200, Uri Simchoni wrote:
> On 29/10/2019 19:18, Christof Schmitt wrote:
> >On Fri, Oct 25, 2019 at 12:33:33AM +0300, Uri Simchoni via samba-technical wrote:
> >>How should I build Samba with system heimdal? Should this do the trick:
> >>./configure --with-system-heimdalkrb5 --without-ad-dc
> >>(assuming I have Heimdal installed, of course)
> >>I tried this one on master, configure succeeds and the build fails
> >>like so (kind of surprising that it tries building system heimdal):
> >>waf: Entering directory `/home/vagrant/samba/bin/default'
> >> Selected system Heimdal build
> >>[190/192] Compiling source4/heimdal/lib/vers/print_version.c
> >>21:26:51 runner ['/usr/bin/gcc', '-D_SAMBA_BUILD_=4',
> >>'-DHAVE_CONFIG_H=1', '-MMD', '-D_GNU_SOURCE=1',
> >>'-D_XOPEN_SOURCE_EXTENDED=1', '-DHAVE_CONFIG_H=1', '-fPIC',
> >>'-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT',
> >>'-DSTATIC_HEIMDAL_VERS_HOSTCC_MODULES_PROTO=extern void
> >>'-Isource4/heimdal_build', '-I../../source4/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../..',
> >>'../../source4/heimdal/lib/vers/print_version.c', '-c', '-o/home/vagrant/samba/bin/default/source4/heimdal/lib/vers/print_version.c.1.o']
> >>In file included from ../../source4/heimdal_build/roken.h:156:0,
> >> from ../../source4/heimdal/lib/vers/print_version.c:39:
> >>../../source4/heimdal/lib/roken/roken.h.in:282:10: fatal error:
> >>roken-common.h: No such file or directory
> >> #include <roken-common.h>
> >> ^~~~~~~~~~~~~~~~
> >>compilation terminated.
> >This should work, but it broke back with Samba 4.10. The build works
> >with Samba 4.9. I am trying to bisect and debug this problem now.
> Oh, thanks! I didn't want to start actually debugging this before
> being sure I'm not missing some basic thing. Do note however that
> all of waf has been replaced for 4.10, so maybe it's more a matter
> of getting this back in shape than bisecting.
> I wanted to push forward another cross-compilation patch that
> involves removal of an explicit path of Heimdal headers, so I wanted
> to see if that breaks system-heimdal build and then realized it's
> broken before the patch.
So far it looks like the problem is that the heimdal include files are
in /usr/include/heimdal (at least in the Ubuntu 18.04 that i am using
Deleting source4/heimdal_build/krb5-types.h and adding this line allows
the system heimdal build to succeed:
@@ -18,6 +18,7 @@ if krb5_config:
include_path = l.strip()[len("includedir="):]
include_path + "/krb5-types.h")
I am not sure if that is the cleanest solution, maybe someone with more
knowledge about waf and the build could provide input.
I have not done further testing. Building with the internal heimdal
library and MIT would be the next steps. Ideally we would also establish
a system heimdal build in gitlab.
More information about the samba-technical