Bug #29658 wrong test for static nss checking on linux, doesn't cover all platforms
Submitted: 9 Jul 2007 19:06 Modified: 5 Nov 2007 2:18
Reporter: Arkadiusz Miskiewicz (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1.20, 5.0 OS:Linux
Assigned to: Joerg Bruehe CPU Architecture:Any
Tags: Contribution, qc

[9 Jul 2007 19:06] Arkadiusz Miskiewicz
Description:
Linux systems have different filesystem layouts depending on few things.

http://www.pathname.com/fhs/ defines three possible cases:
/usr/lib/ (typical 32 bit system)
/usr/lib64 (64 bit system)
/usr/lib32 (some 64 bit systems)

For details see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64

How to repeat:
less configure.in

Suggested fix:
--- configure.in.org    2007-07-09 21:02:00.433589939 +0200
+++ configure.in        2007-07-09 21:02:16.877766255 +0200
@@ -593,7 +593,7 @@

 if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
 then
-  tmp=`nm /usr/lib/libc.a  | grep _nss_files_getaliasent_r`
+  tmp=`nm /usr/lib*/libc.a  | grep _nss_files_getaliasent_r`
   if test -n "$tmp"
   then
      STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"

Better than current one but not perfect (since in rare ocassions there can be both - 32bit and 64bit libc.a installed at the same time).
[10 Jul 2007 10:59] Valeriy Kravchuk
Thank you for the problem report and patch suggested.
[15 Oct 2007 17:52] Joerg Bruehe
Grabbing this ...
[15 Oct 2007 17:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35590

ChangeSet@1.2537, 2007-10-15 19:59:14+02:00, joerg@trift2. +1 -0
  Allow for different directories containing the "libc",
  as it may well happen with 32- vs 64-bit Linux systems.
  
  This patch was proposed immediately with the report of
  Bug #29658  wrong test for static nss checking on linux, doesn't cover all platforms
[15 Oct 2007 18:27] Joerg Bruehe
IRC log of today, 18:00 UTC:

<joerg>   timothy: Could you please review the patch we discussed earlier:
          http://lists.mysql.com/commits/35590
<timothy> ok
...
<timothy> joerg: looks OK to push
<joerg>   timothy: Thanks !
[16 Oct 2007 10:03] Joerg Bruehe
Queued in the build team trees for 5.0, 5.1, and 5.2;
current versions are 5.0.52, 5.1.23, and 5.2.6.
[1 Nov 2007 10:14] Bugs System
Pushed into 6.0.4-alpha
[1 Nov 2007 10:16] Bugs System
Pushed into 5.1.23-rc
[1 Nov 2007 10:17] Bugs System
Pushed into 5.0.52
[5 Nov 2007 2:18] Paul DuBois
Noted in 5.0.52, 5.1.23, 6.0.4 changelogs.

configure did not find nss on some Linux platforms.