فهرست منبع

Ticket 49552 - Fix build issues on F28

Description:  The newer version of gcc on F28 is stricter with linking.  Also,
              unistd.h no longer includes the "unix crypt", so we need to revert
              to crypt.h

              Added these LDFLAGS to the spec file: -Wl,-z,defs

https://pagure.io/389-ds-base/issue/49552

Reviewed by: firstyear & lslebodn (Thanks!!)
Mark Reynolds 8 سال پیش
والد
کامیت
f95b8e7f2b
3فایلهای تغییر یافته به همراه7 افزوده شده و 8 حذف شده
  1. 4 3
      Makefile.am
  2. 2 4
      ldap/servers/plugins/pwdstorage/crypt_pwd.c
  3. 1 1
      rpm/389-ds-base.spec.in

+ 4 - 3
Makefile.am

@@ -182,7 +182,7 @@ endif #end hpux
 #    If any interfaces have been added since the last public release, then increment age.
 #    If any interfaces have been removed or changed since the last public release, then set age to 0. 
 
-SDS_LDFLAGS = $(NSPR_LINK) -version-info 0:0:0
+SDS_LDFLAGS = $(NSPR_LINK) $(NSS_LINK) -lpthread -version-info 0:0:0
 NUNCSTANS_LDFLAGS = $(NSPR_LINK) $(EVENT_LINK) -version-info 1:0:1
 SLAPD_LDFLAGS = -version-info 1:0:1
 
@@ -1100,7 +1100,8 @@ libldaputil_la_SOURCES = lib/ldaputil/cert.c \
 	lib/ldaputil/vtable.c
 
 libldaputil_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) $(DSINTERNAL_CPPFLAGS) -I$(srcdir)/lib/ldaputil
-
+libldaputil_la_LIBADD = libslapd.la  $(NSS_LINK) $(NSPR_LINK)
+libldaputil_la_LDFLAGS = $(AM_LDFLAGS)
 
 #////////////////////////////////////////////////////////////////
 #
@@ -2387,7 +2388,7 @@ if HAVE_DOXYGEN
 
 doxyfile.stamp:
 	cd $(srcdir); $(DOXYGEN) $(abs_top_builddir)/docs/slapi.doxy
-	rm $(abs_top_builddir)/man/man3/_*
+	rm -f $(abs_top_builddir)/man/man3/_*
 	touch doxyfile.stamp
 
 # Add the docs to make all.

+ 2 - 4
ldap/servers/plugins/pwdstorage/crypt_pwd.c

@@ -24,11 +24,9 @@
 #ifndef __USE_XOPEN
 #define __USE_XOPEN /* linux */
 #endif              /* __USE_XOPEN */
-#include <unistd.h>
-#else /* hpux */
-#include <crypt.h>
-#endif /* hpux */
+#endif
 
+#include <crypt.h>
 #include "pwdstorage.h"
 
 static PRLock *cryptlock = NULL; /* Some implementations of crypt are not thread safe.  ie. ours & Irix */

+ 1 - 1
rpm/389-ds-base.spec.in

@@ -302,7 +302,7 @@ autoreconf -fiv
            --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \
            --with-systemdgroupname=%{groupname} \
            $NSSARGS $TCMALLOC_FLAGS $ASAN_FLAGS $RUST_FLAGS $PERL_FLAGS \
-           --enable-cmocka
+           --enable-cmocka 'LDFLAGS=-Wl,-z,defs'
 
 %if 0%{?rhel} >= 8 || 0%{?fedora}
 make setup.py