Bug #526 too few arguments to function `gethostbyname_r'
Submitted: 28 May 2003 10:16 Modified: 29 May 2003 13:15
Reporter: Sudhir Kumar Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.13 OS:Linux (Linux - Redhat 8.x)
Assigned to: CPU Architecture:Any

[28 May 2003 10:16] Sudhir Kumar
I get the following error while compiling from the source distribution:

gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/var\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DDONT_USE_RAID -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -O3 -mcpu=pentiumpro -c libmysql.c -MT libmysql.lo -MD -MP -MF .deps/libmysql.TPlo  -fPIC -DPIC -o .libs/libmysql.lo
libmysql.c: In function `mysql_real_connect':
libmysql.c:1731: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer type
libmysql.c:1731: too few arguments to function `gethostbyname_r'
libmysql.c:1731: warning: assignment makes pointer from integer without a cast
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/home/sudhir/PythonDownloads/mysql-4.0.13/libmysql_r'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sudhir/PythonDownloads/mysql-4.0.13'
make: *** [all] Error 2

How to repeat:
I used the folloiwng to configure:

CFLAGS="-O3 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O3 -mcpu=pentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-thread-safe-client --enable-local-infile --enable-assembler
[28 May 2003 10:23] Sudhir Kumar
compiler used is gcc 3.2.2
-- sudhir
[29 May 2003 13:15] Alexander Keremidarski
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem is not the result of a bug.
For a list of more appropriate places to ask for help using MySQL
products, please visit http://www.mysql.com/support/

Thank you for your interest in MySQL.

This is known problem with RedHat. In order to build MySQL you need to have g++ installed from separate RPM

In RedHat 8.0 RPM in quesiton is gcc-c++-3.2-7.i386.rpm

rpm -Uvh gcc-c++-3.2-7.i386.rpm

I should also note that RedHat 8.0 is shipped with gcc-3.2-7.i386.rpm not 3.2.2 as you mention in your comment. If you have installed 3.2.2 from some upgrade (or from RedHat 9) you must install same version of gcc-c++ RPM