building postfix with mysql problem, Please helppppppppp
807557Oct 13 2006 — edited Oct 16 2006Hi all,
I have a sun fire v880 machine running solaris 10, i need to set an email server using postfix+mysql.
I already installed myql and its working fine. but when trying to build postfix with mysql i get a compliation error, here's wts going on:
bash-3.00# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/bdb/include -I/opt/mysql/mysql/include -DUSE_SASL_AUTH' 'AUXLIBS=-L/opt/mysql/mysql/lib -R/opt/mysql/mysql/lib -lmysqlclient -lz -lm'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/global]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/dns]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tls]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/xsasl]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/milter]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/master]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postfix]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpstone]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/sendmail]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/error]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pickup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/cleanup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/local]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/trivial-rewrite]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/oqmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtp]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/bounce]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pipe]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/showq]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postalias]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postcat]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postconf]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postdrop]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postkick]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlock]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlog]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postmap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postqueue]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postsuper]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmqpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/spawn]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/flush]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/verify]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/virtual]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/proxymap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/anvil]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/scache]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/discard]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tlsmgr]
(set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
* Then when i run:
bash-3.00# /usr/local/bin/make
The compilation goes on till i get the following error
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_fetch_row ../../lib/libglobal.a(dict_mysql.o)
mysql_query ../../lib/libglobal.a(dict_mysql.o)
mysql_error ../../lib/libglobal.a(dict_mysql.o)
mysql_close ../../lib/libglobal.a(dict_mysql.o)
mysql_free_result ../../lib/libglobal.a(dict_mysql.o)
mysql_store_result ../../lib/libglobal.a(dict_mysql.o)
mysql_init ../../lib/libglobal.a(dict_mysql.o)
mysql_real_connect ../../lib/libglobal.a(dict_mysql.o)
mysql_real_escape_string ../../lib/libglobal.a(dict_mysql.o)
mysql_num_rows ../../lib/libglobal.a(dict_mysql.o)
mysql_num_fields ../../lib/libglobal.a(dict_mysql.o)
mysql_escape_string ../../lib/libglobal.a(dict_mysql.o)
ld: fatal: Symbol referencing errors. No output written to error
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1"
Please help me with this issue, i use gcc-3.3.2 and used both GNU make and the "make" shipped with solaris, both gave the same result.
I installed Mysql as a pkg and didn't compile it from source.
Thanks in advance.