Can not get mysql recognized by ./configure

Everything related with getting rsyslog up and running (but not beyond that point ;))

Moderator: rgerhards

Can not get mysql recognized by ./configure

Postby rjohnson on Tue Nov 13, 2007 7:56 am

Hi Everyone,

I have missed something... I am unable to even get rsyslog to configure before compiling. I am running a fresh install of FreeBSD 6.2 and Mysql 4.1.21.

Rsyslog 1.19.10


When I run ./configure here is what I see:

checking mysql/mysql.h usability... no
checking mysql/mysql.h presence... no
checking for mysql/mysql.h... no
configure: error: MySQL is missing
See `config.log' for more details.


What have I missed?
Thanks in advance everyone.
rjohnson
New
 
Posts: 1
Joined: Tue Nov 13, 2007 7:52 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

RE: Can not get mysql recognized by ./configure

Postby mrc668 on Thu Mar 06, 2008 11:25 pm

In a similar thread, I cannot get my mysqlclient libraries recongnized.
their are in ldconfig and LDFLAGS

I'm running Centos 5.

[root@harry rsyslog-2.0.2]# ./configure --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --sbindir=/sbin --disable-static --enable-mysql
.
.
.
checking for mysql/mysql.h... yes
checking for mysql_config... yes
checking for mysql_init in -lmysqlclient... no
configure: error: MySQL library is missing
See `config.log' for more details.
[root@harry rsyslog-2.0.2]# rpm -ql mysql-devel-5.0.22-2.2.el5_1.1 | grep mysqlclient
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient_r.a
/usr/lib/mysql/libmysqlclient_r.so
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient.so
/usr/lib64/mysql/libmysqlclient_r.a
/usr/lib64/mysql/libmysqlclient_r.so
[root@harry rsyslog-2.0.2]# echo $LDFLAGS
-L/usr/lib/mysql -L/usr/lib64/mysql
[root@harry rsyslog-2.0.2]# ldconfig -v | grep -E "^/|mysql"
/usr/lib/mysql:
libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
/usr/lib64/mysql:
libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
libmysqlclient.so.15 -> libmysqlclient.so.15.0.0
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby mbiebl on Fri Mar 07, 2008 9:11 am

That's weird, why are they at /usr/lib/mysql and not /usr/lib/ ?
libmysqlclient.so should really be in /usr/lib.
Anyways, what does mysql_config --libs say?

Also, please check config.log, as ./configure said.
mbiebl
Avarage
 
Posts: 17
Joined: Wed Dec 05, 2007 12:46 am

Postby mrc668 on Fri Mar 07, 2008 3:26 pm

Redhat likes to put stuff in it's own section.
It's a lot easier to have a directory containing config files than 1 large config
file that you have to edit when a package is removed.

I guess they are starting to apply it to the libraries.

What difference does it make, either LDFLAGS is used or not.
Either ld.so is used, or it's not.

What am I looking for in config.log?

I found several lines like:
configure:23458: gcc -o conftest -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -L/usr/lib/mysql -L/usr/lib64/mysql conftest.c >&5

Which tells me that my LDFLAGS are being used.
I should try again without the LDFLAGS.

The end of the file is:
#define STDC_HEADERS 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_ARPA_INET_H 1
#define HAVE_FCNTL_H 1
#define HAVE_LOCALE_H 1
#define HAVE_NETDB_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_PATHS_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_FILE_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYSLOG_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTMP_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_UNISTD_H 1
#define HAVE_CHOWN 1
#define HAVE_FORK 1
#define HAVE_VFORK 1
#define HAVE_WORKING_VFORK 1
#define HAVE_WORKING_FORK 1
#define HAVE_STDLIB_H 1
#define HAVE_MALLOC 1
#define HAVE_STDLIB_H 1
#define HAVE_REALLOC 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SOCKET_H 1
#define SELECT_TYPE_ARG1 int
#define SELECT_TYPE_ARG234 (fd_set *)
#define SELECT_TYPE_ARG5 (struct timeval *)
#define RETSIGTYPE void
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
#define HAVE_DECL_STRERROR_R 1
#define HAVE_STRERROR_R 1
#define STRERROR_R_CHAR_P 1
#define HAVE_VPRINTF 1
#define HAVE_WAIT3 1
#define HAVE_ALARM 1
#define HAVE_GETHOSTBYNAME 1
#define HAVE_GETHOSTNAME 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_LOCALTIME_R 1
#define HAVE_MEMSET 1
#define HAVE_MKDIR 1
#define HAVE_REGCOMP 1
#define HAVE_SELECT 1
#define HAVE_SOCKET 1
#define HAVE_STRCASECMP 1
#define HAVE_STRCHR 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRNDUP 1
#define HAVE_STRNLEN 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_UNAME 1
#define HAVE_TTYNAME_R 1
#define FEATURE_REGEXP 1
#define HAVE_PTHREAD_H 1
#define USE_PTHREADS 1
#define FEATURE_KLOGD 1
#define SYSLOG_UNIXAF 1
#define SYSLOG_INET 1
#define FSSTND 1
#define NDEBUG 1
#define HAVE_MYSQL_MYSQL_H 1

configure: exit 1

And other than configure failed, it doesn't tell me much.
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby mrc668 on Fri Mar 07, 2008 3:34 pm

How about this?
This is from config.log where it is looking for mysql_init.
What is -lz? Or what is this z library?

configure:24649: gcc -o conftest -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g conftest.c -lmysqlclient -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto
>&5
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby mrc668 on Fri Mar 07, 2008 3:41 pm

-lz is from zlib.
Is there a specific version of zlib that is required?
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby rgerhards on Fri Mar 07, 2008 3:44 pm

I do not know that we require a specific version, its pretty plain stuff that is used. Any fairly recent version should do.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1667
Joined: Thu Feb 13, 2003 11:57 am

Postby mrc668 on Fri Mar 07, 2008 6:02 pm

hmmm... I'm already using 1.2.3.
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby mrc668 on Fri Mar 07, 2008 6:49 pm

FWIW, I took it to a 32bit machine, and it compiled nicely.
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Postby rgerhards on Fri Mar 07, 2008 6:50 pm

This lets me suspect the original machine has a problem. I am developing under Fedora 8 / 64 bit and everything runs smoothly... Mabye a problem with mysql-dev?

In any case, I am glad it works.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1667
Joined: Thu Feb 13, 2003 11:57 am

Postby mrc668 on Fri Mar 07, 2008 7:14 pm

It appears that I had 32/64 bit issues.
I replaced my zlib and openssl packages and things started working.
mrc668
New
 
Posts: 9
Joined: Thu Mar 06, 2008 10:17 pm

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron