On (05/02/14 19:00), Alexander Bokovoy wrote:
On Wed, 05 Feb 2014, Lukas Slebodnik wrote:
>On (05/02/14 15:31), Alexander Bokovoy wrote:
>>Hi,
>>
>>thanks to Alexey Shabalin (ALT Linux Team), following patch makes sure
>>SSSD will compile against MIT Kerberos with headers installed in a
>>subdirectory of /usr/include (/usr/include/krb5 in ALT Linux).
>>
>>Please apply.
>>
>>--
>>/ Alexander Bokovoy
>Few comments
>
>0. Please follow
https://fedorahosted.org/sssd/wiki/DevelTutorials#Submittingapatchupstream
> We do not rename patches, after "git format-patch"
We do in FreeIPA, so this is a brain split :)
>1. It would be nice to have a ticket in the SSSD trac.
https://fedorahosted.org/sssd/ticket/2226
>another comment inline
>
>>From 09893453dadca3488185142b6fef0df455fdbe69 Mon Sep 17 00:00:00 2001
>>From: Alexander Bokovoy <abokovoy(a)redhat.com>
>>Date: Wed, 5 Feb 2014 15:27:37 +0200
>>Subject: [PATCH] Make sure KRB5_CFLAGS is used properly
>>
>>There are cases when MIT Kerberos is installed with includes
>>in a subdirectory of /usr/include (or /usr/local/include).
>>
>>In such case we have to properly use KRB5_CFLAGS to reach them.
>>
>>Thanks to Alexey Shabalin (a.shabalin(a)gmail.com)
>>---
>>Makefile.am | 7 ++++++-
>>src/external/krb5.m4 | 5 +++++
>>2 files changed, 11 insertions(+), 1 deletion(-)
>>
>>diff --git a/Makefile.am b/Makefile.am
>>index 9c155d6..3d8f689 100644
>>--- a/Makefile.am
>>+++ b/Makefile.am
>>@@ -981,6 +981,7 @@ strtonum_tests_SOURCES = \
>> src/util/strtonum.c
>>strtonum_tests_CFLAGS = \
>> $(AM_CFLAGS) \
>>+ $(KRB5_CFLAGS) \
>> $(CHECK_CFLAGS)
>>strtonum_tests_LDADD = \
>> $(SSSD_LIBS) \
>
>It is a joke?
>Do you really that mean strtonum_tests need kerberos header file?
This is not needed, went in as overly greedy paste.
New patch attached.
--
/ Alexander Bokovoy
From 1c777be7783eb46b3c849489c3f80fae1b1a203e Mon Sep 17 00:00:00
2001
From: Alexander Bokovoy <abokovoy(a)redhat.com>
Date: Wed, 5 Feb 2014 18:56:09 +0200
Subject: [PATCH] Make sure KRB5_CFLAGS is used properly
There are cases when MIT Kerberos is installed with includes
in a subdirectory of /usr/include (or /usr/local/include).
In such case we have to properly use KRB5_CFLAGS to reach them.
Thanks to Alexey Shabalin (a.shabalin(a)gmail.com)
https://fedorahosted.org/sssd/ticket/2226
---
I was not able reproduce compilation failures with custom build of MIT Kerberos
installed in /usr/local/. It could not be influenced by libraries installed
from rpm, because I remove packages krb5-workstation, krb5-devel, krb5-libs
(rpm -e --nodeps). I also tried build sssd on ubuntu (with custom build of MIT
Kerberos) and there was not any problem.
I had to install MIT Kerberos into different directory
(prefix /usr/local/extra/), but your patch did not solve all problem.
user@user-virtual-machine:/tmp/sssd$ krb5-config --libs
-L/usr/local/extra/lib -Wl,--enable-new-dtags -Wl,-rpath
-Wl,/usr/local/extra/lib -lkrb5 -lk5crypto -lcom_err
user@user-virtual-machine:/tmp/sssd$ krb5-config --cflags
-I/usr/local/extra/include
user@user-virtual-machine:/tmp/sssd$ krb5-config --version
Kerberos 5 release 1.12.1
CCLD sssd_pac_plugin.la
/usr/bin/ld: cannot find -lkrb5
collect2: error: ld returned 1 exit status
make[2]: *** [sssd_pac_plugin.la] Error 1
make[2]: Leaving directory `/tmp/sssd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/sssd'
make: *** [all] Error 2
There was hardcoded "-lkrb5" in Makefile, so I changed it into $(KRB5_LIBS)
But there was another problem.
CC src/providers/ldap/ldap_id.lo
In file included from ./src/providers/krb5/krb5_common.h:34:0,
from ./src/providers/ldap/ldap_common.h:29,
from src/providers/ldap/ldap_id.c:32:
./src/util/sss_krb5.h:30:23: fatal error: krb5/krb5.h: No such file or directory
compilation terminated.
So I gave up to fix all problems.
Do you want to fix them?
Thank you very much for your effort in improving sssd build system.
LS