Bug #66417 Compilation warning - may help in future
Submitted: 16 Aug 2012 10:09 Modified: 29 May 2013 11:00
Reporter: Vikram J. Gurjar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5.25a , 5.5.28 OS:Linux (Centos 6.3)
Assigned to: CPU Architecture:Any

[16 Aug 2012 10:09] Vikram J. Gurjar
Description:
Dear Sirs, 

While compiling MySQL 5.5.25a on a Centos 6.3 server, one gets these warnings about depreciated functions.

CMakeFiles/perror.dir/perror.c.o: In function `main':
/home/software/mysql-5.5.25a/extra/perror.c:304: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
/home/software/mysql-5.5.25a/extra/perror.c:302: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead

If you replace the depreciated functions with the relevant functions you will have a perfect compile on a Centos 6.3 system.

Regards,

Vikram J. Gurjar

How to repeat:
Compile from source on a Centos 6.3 system. At around 70% this warning pops up.

Suggested fix:
`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

`sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
[19 Aug 2012 13:43] Valeriy Kravchuk
Please, send the output of:

gcc --version
getconf GNU_LIBC_VERSION

from your system.
[20 Aug 2012 3:19] Vikram J. Gurjar
Please, send the output of:

gcc --version
getconf GNU_LIBC_VERSION

from your system.

**** Outputs ************

gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

getconf GNU_LIBC_VERSION
glibc 2.12
[23 Aug 2012 20:08] Sveta Smirnova
Thank you for the feedback.

Verified as described with gcc 4.4.5
[29 May 2013 11:00] Jon Olav Hauglid
This was fixed in 5.6.3.
"WL#5914 remove option "--all" and BDB errors from the "perror" program.
This removes printing of BDB errors, and compiler warnings about sys_nerr*.
HAVE_SYS_ERRLIST is now unneeded."