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.
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
From 09893453dadca3488185142b6fef0df455fdbe69 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy abokovoy@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@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) \ @@ -1276,6 +1277,7 @@ krb5_child_test_SOURCES = \ $(SSSD_FAILOVER_OBJ) krb5_child_test_CFLAGS = \ $(AM_CFLAGS) \
- $(KRB5_CFLAGS) \ -DKRB5_CHILD_DIR="$(builddir)" \ $(CHECK_CFLAGS) \ $(SYSTEMD_LOGIN_CFLAGS)
@@ -1674,6 +1676,8 @@ libsss_krb5_common_la_SOURCES = \ src/providers/krb5/krb5_init_shared.c libsss_krb5_common_la_LDFLAGS = \ -avoid-version +libsss_krb5_common_la_CFLAGS = \
- $(KRB5_CFLAGS)
libsss_ldap_la_SOURCES = \ src/util/find_uid.c \ @@ -1734,7 +1738,8 @@ libsss_krb5_la_SOURCES = \ libsss_krb5_la_CFLAGS = \ $(AM_CFLAGS) \ $(SYSTEMD_LOGIN_CFLAGS) \
- $(DHASH_CFLAGS)
- $(DHASH_CFLAGS) \
- $(KRB5_CFLAGS)
libsss_krb5_la_LIBADD = \ $(SYSTEMD_LOGIN_LIBS) \ $(DHASH_LIBS) \ diff --git a/src/external/krb5.m4 b/src/external/krb5.m4 index 1a50bf1..861c8c9 100644 --- a/src/external/krb5.m4 +++ b/src/external/krb5.m4 @@ -67,6 +67,8 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \ krb5_cc_get_full_name]) CFLAGS=$SAVE_CFLAGS LIBS=$SAVE_LIBS +CFLAGS="$CFLAGS $KRB5_CFLAGS" +LIBS="$LIBS $KRB5_LIBS"
if test x$ac_cv_header_krb5_h != xyes -a x$ac_cv_header_krb5_krb5_h != xyes then @@ -93,3 +95,6 @@ AM_CONDITIONAL([BUILD_KRB5_LOCATOR_PLUGIN], [test x$have_locate_plugin = xyes -a x$build_locator = xyes]) AM_COND_IF([BUILD_KRB5_LOCATOR_PLUGIN], [AC_DEFINE_UNQUOTED(HAVE_KRB5_LOCATOR_PLUGIN, 1, [Build with krb5 locator plugin])])
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
1.8.4.2
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
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" 1. It would be nice to have a ticket in the SSSD trac.
another comment inline
From 09893453dadca3488185142b6fef0df455fdbe69 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy abokovoy@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@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?
Thank you your patch
LS
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
- 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 :)
- 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@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@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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed 05 Feb 2014 06:00:41 PM CET, 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
- 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 :)
To be clear, SSSD has no *requirement* to rename patches. It's certainly not forbidden.
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
We do not rename patches, after "git format-patch"
We do in FreeIPA, so this is a brain split :)
- 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@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@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@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@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
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
On (06/02/14 16:23), Jakub Hrozek wrote:
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
In my opinion, Alexander-s patch does not solve all problems. Adding Alexey Shabalin to CC.
Could you confirm attached patch solves problem on ALT Linux?
LS
2014-02-06 Lukas Slebodnik lslebodn@redhat.com:
On (06/02/14 16:23), Jakub Hrozek wrote:
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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)
Yes, true. Sorry, i did not even look such elementary mistakes.
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.
Please, try new patch.
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
In my opinion, Alexander-s patch does not solve all problems. Adding Alexey Shabalin to CC.
Could you confirm attached patch solves problem on ALT Linux?
LS
On (07/02/14 17:13), Alexey Shabalin wrote:
2014-02-06 Lukas Slebodnik lslebodn@redhat.com:
On (06/02/14 16:23), Jakub Hrozek wrote:
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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)
Yes, true. Sorry, i did not even look such elementary mistakes.
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.
Please, try new patch.
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
In my opinion, Alexander-s patch does not solve all problems. Adding Alexey Shabalin to CC.
Could you confirm attached patch solves problem on ALT Linux?
LS
-- Alexey Shabalin
From bc016f8d928e4ce08a09783a0a0a7705ccdc92da Mon Sep 17 00:00:00 2001 From: Alexey Shabalin shaba@altlinux.ru Date: Fri, 7 Feb 2014 17:02:03 +0400 Subject: [PATCH] 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.
https://fedorahosted.org/sssd/ticket/2226
Makefile.am | 12 ++++++++++-- src/external/krb5.m4 | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 9c155d68c7f452bb02a4da154992fa2fca6af273..7e6d8f1d860b947121a67eeade0577cdd01e55a5 100644 --- a/Makefile.am +++ b/Makefile.am
Did you build sssd with installed package cmocka? Because I can see some problems in cmocka unit tests.
You can squash attached patch to yours. Please, try to keep the 1st line in the commit message shorter than 80 characters.
LS
On Fri, Feb 07, 2014 at 05:44:32PM +0100, Lukas Slebodnik wrote:
On (07/02/14 17:13), Alexey Shabalin wrote:
2014-02-06 Lukas Slebodnik lslebodn@redhat.com:
On (06/02/14 16:23), Jakub Hrozek wrote:
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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)
Yes, true. Sorry, i did not even look such elementary mistakes.
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.
Please, try new patch.
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
In my opinion, Alexander-s patch does not solve all problems. Adding Alexey Shabalin to CC.
Could you confirm attached patch solves problem on ALT Linux?
LS
-- Alexey Shabalin
From bc016f8d928e4ce08a09783a0a0a7705ccdc92da Mon Sep 17 00:00:00 2001 From: Alexey Shabalin shaba@altlinux.ru Date: Fri, 7 Feb 2014 17:02:03 +0400 Subject: [PATCH] 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.
https://fedorahosted.org/sssd/ticket/2226
Makefile.am | 12 ++++++++++-- src/external/krb5.m4 | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 9c155d68c7f452bb02a4da154992fa2fca6af273..7e6d8f1d860b947121a67eeade0577cdd01e55a5 100644 --- a/Makefile.am +++ b/Makefile.am
Did you build sssd with installed package cmocka? Because I can see some problems in cmocka unit tests.
You can squash attached patch to yours.
I think you forgot to attach the patch.
On (07/02/14 17:13), Alexey Shabalin wrote:
2014-02-06 Lukas Slebodnik lslebodn@redhat.com:
On (06/02/14 16:23), Jakub Hrozek wrote:
On Thu, Feb 06, 2014 at 04:17:50PM +0100, Lukas Slebodnik wrote:
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)
Yes, true. Sorry, i did not even look such elementary mistakes.
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.
Please, try new patch.
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
I don't think we need to reproduce the failures per se. If the patch helps their distribution while not breaking ours, that's good enough for me.
In my opinion, Alexander-s patch does not solve all problems. Adding Alexey Shabalin to CC.
Could you confirm attached patch solves problem on ALT Linux?
LS
-- Alexey Shabalin
From bc016f8d928e4ce08a09783a0a0a7705ccdc92da Mon Sep 17 00:00:00 2001 From: Alexey Shabalin shaba@altlinux.ru Date: Fri, 7 Feb 2014 17:02:03 +0400 Subject: [PATCH] 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.
https://fedorahosted.org/sssd/ticket/2226
Makefile.am | 12 ++++++++++-- src/external/krb5.m4 | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-)
TL;DR I tested patch on ALT linux with the latest master and works well. All tests passed including cmocka unit tests.
ACK
long version. One difference between ALT Linux and fedora is that kerberos header files are more nested on ALT Linux.
------------------------------------------------------------------------------- [user@fedora] krb5-config --cflags
[altlinux@localhost]$ krb5-config --cflags -I/usr/include/krb5 -------------------------------------------------------------------------------
and thus krb5.h files are stored in /usr/include/kbr5/krb5.h /usr/include/kbr5/krb5/krb5.h
------------------------------------------------------------------------------- [altlinux@localhost]$ cat /usr/include/krb5/krb5.h /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* The MIT Kerberos header file krb5.h used to live here.
As of the 1.5 release, we're installing multiple Kerberos headers, so they're all moving to a krb5/ subdirectory. This file is present just to keep old software still compiling. Please update your code to use the new path for the header. */ #include <krb5/krb5/krb5.h> -------------------------------------------------------------------------------
SSSD try to detect availability of kerberos header file krb5.h or krb5/krb5.h The second version was detected and used without any problem. There was not any problem with header file krb5.h. The problem was only with including header file profile.h
src/providers/krb5/krb5_common.c:38:21: fatal error: profile.h: No such file or directory
Because its full path is /usr/include/kbr5/profile.h and directory and directory /usr/include/kbr5 was not added to the list of directories to be searched for header files. (-I/usr/include/kbr5)
The kerberos libraries are stored in default directories.
We needn't complicate this patch anymore. I fine with this version.
One more time. ACK
Alexey Shabalin, thank you very much for the patch. If you have any other with sssd or ding-libs please send patches as soon as possible :-)
LS
On Wed, Feb 12, 2014 at 08:50:13PM +0100, Lukas Slebodnik wrote:
One more time. ACK
Alexey Shabalin, thank you very much for the patch. If you have any other with sssd or ding-libs please send patches as soon as possible :-)
Pushed to master.
Alexey, if you'd like to have the patch upstreamed in the next 1.11.5 release, would you mind sending a version that applies cleanly on top of origin/sssd-1-11 ?
On Wed, Feb 19, 2014 at 04:35:25PM +0100, Jakub Hrozek wrote:
On Wed, Feb 12, 2014 at 08:50:13PM +0100, Lukas Slebodnik wrote:
One more time. ACK
Alexey Shabalin, thank you very much for the patch. If you have any other with sssd or ding-libs please send patches as soon as possible :-)
Pushed to master.
Alexey, if you'd like to have the patch upstreamed in the next 1.11.5 release, would you mind sending a version that applies cleanly on top of origin/sssd-1-11 ?
Alexey sent me the patch privately. Because the diff was the same as the patch for master, just the context was different (logind flags are not present in sssd-1-11's Makefile.am) I went ahead and pushed it.
sssd-devel@lists.fedorahosted.org