2 msg2 postfix server on the same domain in differen...
3 msgmailer-deamon sends error messages to: question
3 msgProcmail
15 msgMAIL FROM timeout with ciphers=high
2 msgmilter, broken pipe
17 msgHow to listen on 587 as well as 25?
6 msgreject_sender_login_mismatch doesnt work
2 msgsmtp auth

Postfix with MYSQL compile error
\ Lydiard (29 Nov 2007)
. \ Lydiard (30 Nov 2007)
. . \ (Wietse Venema) (30 Nov 2007)
. . . \ Lydiard (3 Dec 2007)

8 msgmynetworks=<empty> vs mynetworks=<defa...
3 msgmessage_size_limit with ldap search parameter
2 msgPipe debugging
12 msgdestination_concurrency_limit not respected ?
13 msgVirtual spam forwarding issues
2 msgcleaning up deferred queue
2 msgstatic nexthop per domain
2 msgSimple postmap question
9 msgIssues with Recipient_Canonical mapping
3 msgMail server reboot after got flood
3 msgcan't create a virtual domain
Subject:Postfix with MYSQL compile error
Group:Postfix-users
From:Lydiard
Date:29 Nov 2007


 
Hi

I'm having a devil of a job trying to reinstall Postfix (my server's
disk crashed and I have to reinstall it all from scratch).

Current server is debian (with which I'm not totally familiar - but
since my FC.x knowledge was also limited shouldn't be seen as too much
of a hinderence).

I've googled and googled and found nothing - so I figure if nothing
else it may help others.

I've installed Openssl (tried to do it from source but eventually did
it with apt-get because Apache was complaining).

I installed mysql using apt-get

I've installed Apache (with openssl and mysql and php options)
successfully from source.

I've restored my mysql databases (including the mail ones) successfully.

When compiling postfix (hopefully with SASL, LDAP, MySQL, and all the
bells and whistles that will come later (i.e. courier, spam-assassin,
amvisd, etc...) I am using this on the command line:

make -f Makefile.init makefiles 'CCARGS="-DHAS_MYSQL
-I/usr/include/mysql" "-DUSE_TLS -I/usr/local/include" "-DHAS_PCRE
-I/usr/include" "-I/usr/local/include -DHAS_LDAP" "-DHAS_DB
-I/usr/local/BerkeleyDB.4.6/include" "-DUSE_SASL_AUTH -DUSE_CYRUS_SASL
-I/usr/local/include/sasl"' 'AUXLIBS="-L/usr/local/lib -lssl -lcrypto"
"-L/usr/lib -lpcre" "-L/usr/local/lib -lldap -L/usr/local/lib -llber"
"-L/usr/local/lib -lsasl2" "-L/usr/local/BerkeleyDB.4.6/lib -ldb"
"-L/usr/lib -lmysqlclient -lz -lm"'


No errors are given.

make halts with this:

dict_mysql.c: At top level:
dict_mysql.c:490: error: expected "=", ",", ";", "asm" or
"__attribute__" before "*" token
dict_mysql.c: In function "plmysql_connect_single":
dict_mysql.c:542: error: "HOST" has no member named "db"
dict_mysql.c:544: error: "HOST" has no member named "db"
dict_mysql.c:545: error: "HOST" has no member named "type"
dict_mysql.c:545: error: "HOST" has no member named "name"
dict_mysql.c:549: error: "HOST" has no member named "port"
dict_mysql.c:550: error: "HOST" has no member named "type"
dict_mysql.c:550: error: "HOST" has no member named "name"
dict_mysql.c:554: error: "HOST" has no member named "hostname"
dict_mysql.c:555: error: "HOST" has no member named "stat"
dict_mysql.c:558: error: "HOST" has no member named "hostname"
dict_mysql.c:558: error: "HOST" has no member named "db"
dict_mysql.c: In function "plmysql_close_host":
dict_mysql.c:566: error: "HOST" has no member named "db"
dict_mysql.c:567: error: "HOST" has no member named "db"
dict_mysql.c:568: error: "HOST" has no member named "stat"
dict_mysql.c: In function "plmysql_down_host":
dict_mysql.c:577: error: "HOST" has no member named "db"
dict_mysql.c:578: error: "HOST" has no member named "db"
dict_mysql.c:579: error: "HOST" has no member named "ts"
dict_mysql.c:580: error: "HOST" has no member named "stat"
dict_mysql.c: In function "host_init":
dict_mysql.c:707: error: "HOST" has no member named "db"
dict_mysql.c:708: error: "HOST" has no member named "hostname"
dict_mysql.c:709: error: "HOST" has no member named "port"
dict_mysql.c:710: error: "HOST" has no member named "stat"
dict_mysql.c:711: error: "HOST" has no member named "ts"
dict_mysql.c:719: error: "HOST" has no member named "type"
dict_mysql.c:723: error: "HOST" has no member named "type"
dict_mysql.c:725: error: "HOST" has no member named "name"
dict_mysql.c:726: error: "HOST" has no member named "name"
dict_mysql.c:727: error: "HOST" has no member named "port"
dict_mysql.c:728: error: "HOST" has no member named "name"
dict_mysql.c:730: error: "HOST" has no member named "name"
dict_mysql.c:731: error: "HOST" has no member named "name"
dict_mysql.c:732: error: "HOST" has no member named "type"
dict_mysql.c:737: error: "HOST" has no member named "name"
dict_mysql.c:737: error: "HOST" has no member named "name"
dict_mysql.c:738: error: "HOST" has no member named "port"
dict_mysql.c:738: error: "HOST" has no member named "type"
dict_mysql.c: In function "plmysql_dealloc":
dict_mysql.c:772: error: "HOST" has no member named "db"
dict_mysql.c:773: error: "HOST" has no member named "db"
dict_mysql.c:774: error: "HOST" has no member named "hostname"
dict_mysql.c:775: error: "HOST" has no member named "name"
dict_mysql.c:776: error: "HOST" has no member named "name"
make: *** [dict_mysql.o] Error 1
make: *** [update] Error 1

at which point, I found that the only copy of dict_mysql.o on my
system was in the backed-up directory I did a few weeks before the
server crashed - i.e. in the old ..src/postfix-2.1.5/src/global/
directory.

When I copied that (please tell me that was Ok!?) into the current
src/global make was much happier but is now halting at:

../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_compile':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:554: undefined
reference to `pcre_compile'
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:561: undefined
reference to `pcre_study'
../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_open':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:817: undefined
reference to `pcre_malloc'
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:818: undefined
reference to `pcre_free'
../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_parse_rule':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:668: undefined
reference to `pcre_fullinfo'
../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_lookup':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:288: undefined
reference to `pcre_exec'
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:339: undefined
reference to `pcre_exec'
../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_expand':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:177: undefined
reference to `pcre_get_substring'
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1
make: *** [update] Error 1

but this time, the file does exist! :(

donald:# slocate dict_pcre.c
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c


Google showed this:
http://archives.neohapsis.com/archives/postfix/2004-10/thread.html#94

Which points to http://www.postfix.org/DB_README.html and says I
should install from source although dpkg -l already says I have the
library.. and also that it seems to be the file in the
postfix-2.4.6/src directory that seems to be missing, NOT a berkley
file.

So, then I got clever and actually read the PCRE_README and installed
that from source too (which worked flawlessly), but I'm still stopping
at the same point even though the . I.e.

../../lib/libutil.a(dict_pcre.o): In function `dict_pcre_expand':
/usr/local/src/postfix-2.4.6/src/util/dict_pcre.c:177: undefined
reference to `pcre_get_substring'
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1
make: *** [update] Error 1

so then I looked for dict.pcre.o - not there (in
postfix-2.4.6/src/util where it should be according to the old file
sturcture I had. So I copied that over too (and I'm really not sure
that's a good idea).

Now, I'm failing at:

../../lib/libutil.a(dict_open.o):(.data+0x2c): undefined reference to
`dict_pcre_open'
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1
make: *** [update] Error 1

Again, dict_open.o doesn't exist (except in my old back-edup server
structure). So, now I've removed the directory and rerun

tar - zxvf postfix-2.4.6.tar.gz

but the file is still not there. There no dict_*.o in the current
/usr/local/src/postfix-2.4.6/src/ directly. So this (and no stupidly
linked files as I first thought) would seem to be the issue.

Am I okay to continue copying them over? Should I be doing something else?

Thanks.

Lydiard



© 2004-2008 readlist.com