You are not logged in.

#1 2013-08-10 20:11:55

Bueno
Member
Registered: 2009-06-21
Posts: 10

[SLOVED] Problem with Exim 4.80.1+Mysql

Hello!

I have problem, when I build exim 4.80.1 with MYSQL I have error:

make[2]: Entering directory `/var/abs/community/exim/src/exim-4.80.1/build-Linux-x86_64/lookups'
gcc mysql.c
mysql.c:15:49: fatal error: mysql.h: No such file or directory
 #include <mysql.h>       /* The system header */
                                                 ^
compilation terminated.
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/var/abs/community/exim/src/exim-4.80.1/build-Linux-x86_64/lookups'
make[1]: *** [buildlookups] Error 2
make[1]: Leaving directory `/var/abs/community/exim/src/exim-4.80.1/build-Linux-x86_64'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I uncommented in exim.makefile: LOOKUP_MYSQL=yes
mariaDB installed.

how to solve the problem?

Thanks.

Last edited by Bueno (2013-08-14 06:42:55)

Offline

#2 2013-08-11 07:36:30

Barthalion
Forum Fellow
From: Poland
Registered: 2010-02-26
Posts: 111

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

Headers are provided by libmariadbclient, but additionally you need to modify mysql.c, as mysql.h is stored in /usr/include/mysql/.

Offline

#3 2013-08-12 10:50:44

Bueno
Member
Registered: 2009-06-21
Posts: 10

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

ok, thanks for answer. But I can not find EXIM in ABS /community after "abs -t"

Offline

#4 2013-08-12 21:35:16

Bueno
Member
Registered: 2009-06-21
Posts: 10

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

I found Exim smile But I can't modify this file, if I modify mysql.c after makepkg it reestablishes to original state.

How to change it?

Last edited by Bueno (2013-08-13 20:44:18)

Offline

#5 2013-08-13 22:59:43

Bueno
Member
Registered: 2009-06-21
Posts: 10

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

ok, I created symlinks for this files:

ln -s /usr/include/mysql/mysql.h /usr/include/mysql.h
ln -s /usr/include/mysql/mysql_version.h /usr/include/mysql_version.h
ln -s /usr/include/mysql/mysql_com.h /usr/include/mysql_com.h
ln -s /usr/include/mysql/mysql_time.h /usr/include/mysql_time.h
ln -s /usr/include/mysql/my_list.h /usr/include/my_list.h
ln -s /usr/include/mysql/typelib.h /usr/include/typelib.h
ln -s /usr/include/mysql/my_alloc.h /usr/include/my_alloc.h

But gives second error:

lookups/lookups.a(mysql.o): In function `mysql_version_report':
mysql.c:(.text+0xb): undefined reference to `mysql_get_client_info'
lookups/lookups.a(mysql.o): In function `mysql_tidy':
mysql.c:(.text+0x176): undefined reference to `mysql_close'
lookups/lookups.a(mysql.o): In function `perform_mysql_search':
mysql.c:(.text+0x3cb): undefined reference to `mysql_init'
mysql.c:(.text+0x3f5): undefined reference to `mysql_real_connect'
mysql.c:(.text+0x404): undefined reference to `mysql_error'
mysql.c:(.text+0x491): undefined reference to `mysql_query'
mysql.c:(.text+0x49f): undefined reference to `mysql_error'
mysql.c:(.text+0x4d8): undefined reference to `mysql_use_result'
mysql.c:(.text+0x4f0): undefined reference to `mysql_field_count'
mysql.c:(.text+0x511): undefined reference to `mysql_affected_rows'
mysql.c:(.text+0x540): undefined reference to `mysql_error'
mysql.c:(.text+0x57c): undefined reference to `mysql_num_fields'
mysql.c:(.text+0x58b): undefined reference to `mysql_fetch_fields'
mysql.c:(.text+0x5a2): undefined reference to `mysql_fetch_lengths'
mysql.c:(.text+0x640): undefined reference to `mysql_fetch_row'
mysql.c:(.text+0x674): undefined reference to `mysql_error'
mysql.c:(.text+0x6a2): undefined reference to `mysql_next_result'
mysql.c:(.text+0x72b): undefined reference to `mysql_free_result'
collect2: error: ld returned 1 exit status
make[1]: *** [exim] Error 1
make[1]: Leaving directory `/var/abs/community/exim/src/exim-4.80.1/build-Linux-x86_64'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Please help ...

Offline

#6 2013-08-13 23:10:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,469

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

How about adding the CFLAGS/CXXFLAGS manually?

export CFLAGS="$CFLAGS -I/usr/include/mysql"
export CXXFLAGS="$CXXFLAGS -I/usr/include/mysql"

Get rid of those symlinks.

Last edited by Scimmia (2013-08-13 23:11:30)

Online

#7 2013-08-13 23:38:44

Bueno
Member
Registered: 2009-06-21
Posts: 10

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

I found in exim.Makefile two commented lines:

# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3

I wrote ...

LOOKUP_INCLUDE=-I /usr/include/mysql
LOOKUP_LIBS=-L/usr/lib/mysql -lmysqlclient <- Is that right?

and removed symlinks. But I get the last(second) error sad

Last edited by Bueno (2013-08-13 23:48:58)

Offline

#8 2013-08-14 01:02:06

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,469

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

After playing around with it a bit, you need to specify INCLUDE=-I/usr/include/mysql and EXTRALIBS=-lmysqlclient

Rather um, interesting build system.

Online

#9 2013-08-14 06:44:52

Bueno
Member
Registered: 2009-06-21
Posts: 10

Re: [SLOVED] Problem with Exim 4.80.1+Mysql

Thank you very much! Now it works smile

Offline

Board footer

Powered by FluxBB