linux-pam: backport build fix when crypt() is not part of crypt_libs
PATCH 1/1 linux-pam: backport build fix when crypt() is not part of crypt_libs
The build fails at pam_pwhistory.so linking step with the following message:
ld: cannot find -l-lintl
This happens because the configure script incorrectly adds '-l' to LIBS when the crypt function is a part of libc.
Backport fix from the linux-pam mainline. Backported from: 01e0038fa55581c4afc9d63b6180d2ea77ba2940
Fixes:
http://autobuild.buildroot.net/results/7d0/7d0b61da93551ab49ae70210d5886324398b2ab0/
http://autobuild.buildroot.net/results/6ea/6eafccaa6aefdae7544789c49699c48dd0409623/
http://autobuild.buildroot.net/results/394/394e22be0ef986463e97b3040dad8f978262732c/
http://autobuild.buildroot.net/results/62d/62d19cc368637e10d9ecb0b8a942a99e32941240/
http://autobuild.buildroot.net/results/9a7/9a7ec6b1938c03589fbff4bc54e151f058baca1c/
http://autobuild.buildroot.net/results/f00/f00073f4e13c7e48efacfa11e68af42f4d6eba51/
--- ...uild-when-crypt-is-not-part-of-crypt_libs.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/linux-pam/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch
package/linux-pam/0004-build-fix-build-when-crypt-is-not-part-of-crypt_libs.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 01e0038fa55581c4afc9d63b6180d2ea77ba2940 Mon Sep 17 00:00:00 2001 +From: Thorsten Kukuk <[email protected]> +Date: Mon, 4 Apr 2016 11:35:57 +0200 +Subject: [PATCH] build: fix build when crypt() is not part of crypt_libs + [ticket#46] + +* configure.ac: Don't set empty -l option in crypt check + +Signed-off-by: Yousong Zhou <[email protected]> +Signed-off-by: Max Filippov <[email protected]> +--- +Backported from: 01e0038fa55581c4afc9d63b6180d2ea77ba2940 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 739390e..b377e56 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -401,7 +401,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], + [crypt_libs="crypt"]) + + BACKUP_LIBS=$LIBS +-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") ++AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="") + AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) + LIBS=$BACKUP_LIBS + AC_SUBST(LIBCRYPT) +-- +2.1.4 +
Signature · 1 line
2.1.4
PATCH 1/1 linux-pam: backport build fix when crypt() is not part of crypt_libs
Hello,
Quoted 8 lines · Max Filippov
The build fails at pam_pwhistory.so linking step with the following message:
ld: cannot find -l-lintl
This happens because the configure script incorrectly adds '-l' to LIBS when the crypt function is a part of libc.Backport fix from the linux-pam mainline. Backported from:
01e0038fa55581c4afc9d63b6180d2ea77ba2940
Thanks for the patch. However I think this is already fixed, since the bump to linux-pam 1.3.0, in commit
https://git.buildroot.org/buildroot/commit/?id=4882037d631012934ace1a6fe5f19ce66c2f3b68.
And indeed, since we merged this commit, the build issue doesn't occur anymore.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com