Bug #966 | make fails after error in libmysql.c (incompatible cast) | ||
---|---|---|---|
Submitted: | 31 Jul 2003 8:29 | Modified: | 31 Jul 2003 11:40 |
Reporter: | Donovan Warren | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 4.0.14 | OS: | Linux (Linux (2.4.19-64GB-SMP)) |
Assigned to: | Lenz Grimmer | CPU Architecture: | Any |
[31 Jul 2003 8:29]
Donovan Warren
[31 Jul 2003 11:40]
Lenz Grimmer
This is a small problem with autoconf/automake, and it is documented in our manual: http://www.mysql.com/doc/en/Compilation_problems.html If you get a compilation error on Linux (e.g. SuSE Linux 8.1 or Red Hat Linux 7.3) similar to the following one: libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer type libmysql.c:1329: too few arguments to function `gethostbyname_r' libmysql.c:1329: warning: assignment makes pointer from integer without a cast make[2]: *** [libmysql.lo] Error 1 By default, the configure script attempts to determine the correct number of arguments by using g++ the GNU C++ compiler. This test yields wrong results, if g++ is not installed. There are two ways to work around this problem: * Make sure that the GNU C++ g++ is installed. On some Linux distributions, the required package is called gpp, on others it is named gcc-c++. * Use gcc as your C++ compiler by setting the CXX environment variable to gcc: export CXX="gcc" Please note that you need to run configure again afterwards.