[SSSD] [PATCH] Change order of libraries in linking process.

Lukas Slebodnik lslebodn at redhat.com
Wed Jun 12 11:39:35 UTC 2013


ehlo,

It seems that some linkers have problem with wrong order of libraries.
This commit only change order.

Attached patch should fix next issue:
Library libsss_crypt.so is used in linking process, but there are
undefined references.

It seems that I changed order of libraries after rewriting link_all_deplibs
patch to use automake variable SSSD_INTERNAL_LTLIBS. I only tested
new patch with patched version of libtool on fedora.

    libtool: link: gcc -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -fno-strict-aliasing -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I/usr/include/samba-4.0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -o .libs/sss_ssh_authorizedkeys src/sss_client/sss_ssh_authorizedkeys-common.o src/sss_client/ssh/sss_ssh_authorizedkeys-sss_ssh_client.o src/sss_client/ssh/sss_ssh_authorizedkeys-sss_ssh_authorizedkeys.o  -lpthread -ltalloc /usr/lib/x86_64-linux-gnu/libpopt.so ./.libs/libsss_crypt.so ./.libs/libsss_debug.so ./.libs/libsss_child.so ./.libs/libsss_util.so -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/sssd
    ./.libs/libsss_util.so: undefined reference to `sss_base64_decode'
    ./.libs/libsss_util.so: undefined reference to `s3crypt_gen_salt'
    ./.libs/libsss_util.so: undefined reference to `sss_base64_encode'
    ./.libs/libsss_util.so: undefined reference to `s3crypt_sha512'
    collect2: error: ld returned 1 exit status

LS
-------------- next part --------------
>From b28e413855f2ccda745fd854a9b84c37da98151a Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Wed, 12 Jun 2013 13:24:12 +0200
Subject: [PATCH] Change order of libraries in linking process.

It seems that some linkers have problem with wrong order of libraries.
This commit only change order.
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 93e3a6fc0ce063cb3c874bd90e0b1773fe053386..88e29fff4f6f1f3686c02ca23b5a6f4725f22797 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -577,10 +577,10 @@ endif
 libsss_util_la_LDFLAGS = -avoid-version
 
 SSSD_INTERNAL_LTLIBS = \
+    libsss_util.la \
     libsss_crypt.la \
     libsss_debug.la \
-    libsss_child.la \
-    libsss_util.la
+    libsss_child.la
 
 lib_LTLIBRARIES = libipa_hbac.la libsss_idmap.la libsss_nss_idmap.la
 dist_pkgconfig_DATA += src/providers/ipa/ipa_hbac.pc
-- 
1.8.1.4



More information about the sssd-devel mailing list