Bug 14170 - gnutls.h include not found due to wrong cflags
Summary: gnutls.h include not found due to wrong cflags
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.11.1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-22 15:13 UTC by Björn Jacke
Modified: 2020-01-27 22:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2019-10-22 15:13:24 UTC
the pkg-config file gnutls.pc was found by configure and contains the right includedir path pointing to /usr/local/include:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

but compile aborts in source4/libcli/raw/smb_signing.c because gnutls/gnutls.h is not found, which is correctly installed in /usr/local/include/gnutls/gnutls.h though.

[1234/3017] Compiling source4/libcli/composite/composite.c
"../../libcli/smb/smb2_signing.h", line 24.10: 1506-296 (S) #include file <gnutls/gnutls.h> not found.
"../../libcli/smb/smb2_signing.h", line 25.10: 1506-296 (S) #include file <gnutls/crypto.h> not found.
"../../libcli/smb/smb2_signing.h", line 30.9: 1506-046 (S) Syntax error.

Waf: Leaving directory `/home/samba/v4-11/bin/default'
Build failed
 -> task in 'cli_composite' failed with exit status 1 (run with -v to display more information)
make: 1254-004 The error code from the last command is 1.
Comment 1 Stefan Metzmacher 2019-10-23 12:32:15 UTC
I have a half finished patch that removes the includes from
libcli/smb/smb2_signing.h and there we just use void *__hmac_hnd
Comment 2 Andrew Bartlett 2019-10-24 18:09:39 UTC
The general fix for this kind of thing is to add a dependency, the smb_composite subsystem has no dependency on gnutls directly or indirectly.

However removing a header I think might fix it, so I did this:

https://gitlab.com/samba-team/samba/merge_requests/865
Comment 3 Björn Jacke 2020-01-27 22:58:09 UTC
this went to master weeks ago already