Click to See Complete Forum and Search --> : MySQL compile issue


bealers
09-13-2002, 07:59 PM
Is this OT BTW?

Seeing as I'm here, I thought I'd run this by you all to see if any of you can throw light on it....

I'm attepmting a 3.23.52 compile
this is on a Debian 3 machine with BerkeleyDB 4 in /usr/local (the Berkeley lib dir has been added to ld.so.conf and ldconfig ran)

A small bit of heavily snipped output follows, my question is at the end..............

configure flags ==========>

CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql \
--enable-assembler --with-mysqld-ldflags=-all-static \
--with-berkeley-db --with-innodb


make output =========>

gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/var\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DUNDEF_THREADS_HACK -DDONT_USE_RAID -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -O3 -c libmysql.c -fPIC -DPIC -o .libs/libmysql.lo
libmysql.c: In function `mysql_real_connect':
libmysql.c:1325: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer type
libmysql.c:1325: too few arguments to function `gethostbyname_r'
libmysql.c:1325: warning: assignment makes pointer from integer without a cast
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/home/bealers/build/mysql-3.23.52/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bealers/build/mysql-3.23.52'
make: *** [all-recursive-am] Error 2

config.log ===============>

configure:5846: $? = 0
configure:5857: result: yes
configure:5928: checking for gethostbyname_r in -lnsl_r
configure:5955: gcc -o conftest -O3 conftest.c -lnsl_r -lm >&5
/usr/bin/ld: cannot find -lnsl_r
collect2: ld returned 1 exit status
configure:5958: $? = 1
configure: failed program was:
#line 5936 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname_r ();
int
main ()
{
gethostbyname_r ();
;
return 0;
}

<======================


so reading thru all that, it looks to me as a non c coder that it can't find the lib "nsl_r", I can't find on the machine either, should I? what does it come with. The Oracle that is Google seems to draw a blank too.

?

dotwebbie
09-13-2002, 09:31 PM
Have you checked mysql.com?

bealers
09-14-2002, 03:58 AM
Of course I have

bealers
09-14-2002, 04:22 AM
I feel that I should qualify my last statement

Yes I had searched the mailing list archive on mysql.com

Whatever, as I said in the OP, it was on the offchance, I'll keep looking

dotwebbie
09-14-2002, 12:49 PM
Just checking, some people don't bother to check . . . :(
Okay, I did find this: http://www.mysql.com/doc/en/Compilation_problems.html
and this: http://www.mysql.com/doc/en/Installing_source.html

Not knowing which version or OS, I can't give you much more than that . . .

bealers
09-15-2002, 03:50 PM
Originally posted by dotwebbie
Not knowing which version or OS, I can't give you much more than that . . .

I said in my OP the MySQL version and that it was Debian 3.0 :)

thanks for the links though, I'd not seen the first one

;D

dotwebbie
09-15-2002, 04:06 PM
No problem. :)