List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:March 5 2001 12:08pm
Subject:Compilation Help?
View as plain text  

Sorry for the delayed reply; I have been on a vacation for a week and
I am now slowly catching up with all old emails.

>>>>> "Carl" == Carl M Petersen IV <petersen@stripped> writes:

Carl> Hello!
Carl>   I've been trying to compile MySQL 3.23.33 with BDB3 support on Redhat
Carl> 7.0.  I downloaded the source tarball rather then the RPM source as I was
Carl> unsure how to compile the RPM Source with the BDB3 libraries.  The same is
Carl> true of the Binary RPM;  I did not think I'd have BDB3 support.

Carl>   I've made several runs of configure, and consistantly seem to get a
Carl> problem linking the client when I do a 'make', though not with any of the
Carl> link errors documented in the manual.  Nor have I found anything looking
Carl> for MySQL compile problems on Redhat 7.  So here I am.  I think I'm
Carl> missing a library, but I don't know which one I need to add:

Carl> gcc -DUNDEF_THREADS_HACK -I./../include
Carl> -I../include -I./.. -I..                                -I..    -O3
Carl> -DDBUG_OFF   -fno-implicit-templates -c
Carl> /bin/sh ../libtool --mode=link gcc  -O3 -DDBUG_OFF
Carl> -fno-implicit-templates -rdynamic -o mysql  mysql.o readline.o
Carl> sql_string.o completion_hash.o ../readline/libreadline.a -lncurses
Carl> ../libmysql/  -lz -lcrypt -lnsl -lm 
Carl> mkdir .libs
Carl> gcc -O3 -DDBUG_OFF -fno-implicit-templates -rdynamic -o .libs/mysql
Carl> mysql.o readline.o sql_string.o completion_hash.o
Carl> ../readline/libreadline.a -lncurses ../libmysql/.libs/
Carl> -lz -lcrypt -lnsl -lm -lz -lcrypt -lnsl -lm -Wl,--rpath
Carl> -Wl,/usr/local/lib/mysql
Carl> ../libmysql/.libs/ undefined reference to `mkstemp64'
Carl> collect2: ld returned 1 exit status
Carl> make[2]: *** [mysql] Error 

Carl> I apologize if this is not the appropriate forum for this question, and
Carl> would appreciate a pointer to said correct forum.

I haven't seen this particular error before.  I also did a search on
my machine (SuSe 7.0) but didn't find anything referring to mkstemp64.

Try to do:

nm /usr/lib/*.a | grep mkstemp64 

If you find the symbol, try using 'less' instead of grep and use this
to find out which library you have to add to your link line.

One way to avoid this may to be to link everthing stataicly, with the
configure options:  --with-client-ldflags=-all-static --disable-shared

Compilation Help?Carl M Petersen IV26 Feb
  • Compilation Help?Michael Widenius5 Mar
    • Re: Compilation Help?(Trond Eivind Glomsrød)5 Mar