[Dovecot] Problem with dovecot 1.0 make
When trying to build dovecot with MySQL support I got the following:
/usr/local/mysql/lib/libmysqlclient.a(sha1.o)(.text+0x5c): In function
sha1_result': : multiple definition of
sha1_result'
../lib/liblib.a(sha1.o)(.text+0x880):/root/dovecot-1.0.alpha3/src/lib/sha1.c:233:
first defined here
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld:
Warning: size of symbol sha1_result' changed from 158 in ../lib/liblib.a(sha1.o) to 126 in /usr/local/mysql/lib/libmysqlclient.a(sha1.o) collect2: ld returned 1 exit status make[3]: *** [dovecot-auth] Error 1 make[3]: Leaving directory
/root/dovecot-1.0.alpha3/src/auth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /root/dovecot-1.0.alpha3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/root/dovecot-1.0.alpha3'
make: *** [all] Error 2
Any thoughts?
Regards,
Savage
On Fri, 2005-10-14 at 14:19 -0500, Bob Hope wrote:
When trying to build dovecot with MySQL support I got the following:
/usr/local/mysql/lib/libmysqlclient.a(sha1.o)(.text+0x5c): In function
sha1_result': : multiple definition of
sha1_result' ../lib/liblib.a(sha1.o)(.text+0x880):/root/dovecot-1.0.alpha3/src/lib/sha1.c:233: first defined here /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: Warning: size of symbolsha1_result' changed from 158 in ../lib/liblib.a(sha1.o) to 126 in /usr/local/mysql/lib/libmysqlclient.a(sha1.o) collect2: ld returned 1 exit status make[3]: *** [dovecot-auth] Error 1 make[3]: Leaving directory
/root/dovecot-1.0.alpha3/src/auth' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/root/dovecot-1.0.alpha3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/root/dovecot-1.0.alpha3' make: *** [all] Error 2Any thoughts?
Regards,
Savage
Quote from Timo on this:
MySQL library is being stupid and exporting symbols that can easily conflict with symbols created by the programs using the library.
I'm not sure if MySQL has fixed this already or not. Maybe upgrading the library might help. If not, I'd suggest complaining to MySQL people about this since it most likely won't be causing problems to just Dovecot.
Alternatively you can just change all Dovecot's sha1_result symbols in source code to something else.
If you need a patch to change the dovecot symbols let me know.
Regards Andrew
Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 137: "Microsoft will suck you dry, in time and knowledge."
- JONATHAN CARSON, CEO, FamilyEducation Network
Andrew Hutchings wrote:
On Fri, 2005-10-14 at 14:19 -0500, Bob Hope wrote:
When trying to build dovecot with MySQL support I got the following:
/usr/local/mysql/lib/libmysqlclient.a(sha1.o)(.text+0x5c): In function
sha1_result': : multiple definition of
sha1_result' ../lib/liblib.a(sha1.o)(.text+0x880):/root/dovecot-1.0.alpha3/src/lib/sha1.c:233: first defined here /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: Warning: size of symbolsha1_result' changed from 158 in ../lib/liblib.a(sha1.o) to 126 in /usr/local/mysql/lib/libmysqlclient.a(sha1.o) collect2: ld returned 1 exit status make[3]: *** [dovecot-auth] Error 1 make[3]: Leaving directory
/root/dovecot-1.0.alpha3/src/auth' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/root/dovecot-1.0.alpha3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory
/root/dovecot-1.0.alpha3' make: *** [all] Error 2Any thoughts?
Regards,
Savage
Quote from Timo on this:
MySQL library is being stupid and exporting symbols that can easily conflict with symbols created by the programs using the library.
I'm not sure if MySQL has fixed this already or not. Maybe upgrading the library might help. If not, I'd suggest complaining to MySQL people about this since it most likely won't be causing problems to just Dovecot.
Alternatively you can just change all Dovecot's sha1_result symbols in source code to something else.
If you need a patch to change the dovecot symbols let me know.
Regards Andrew
Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 137: "Microsoft will suck you dry, in time and knowledge."
- JONATHAN CARSON, CEO, FamilyEducation Network
A patch would be nice as I'm sure MySQL won't give two sh**s about
this. If you've got the time I'd appreciate it.
Thanks,
Savage
On Fri, 2005-10-14 at 14:43 -0500, Bob Hope wrote:
A patch would be nice as I'm sure MySQL won't give two sh**s about
this. If you've got the time I'd appreciate it.
Thanks,
Savage
Hi Savage,
Here you go, I haven't tested it but it should be fine. I think Fedora do something similar at MySQL's build as there is no library conflict when building with 4.1 in FC4, haven't really investigated this though.
Regards Andrew
Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 119: "The best system is the one with the fewest operating systems." - BILL GATES
Andrew Hutchings wrote:
On Fri, 2005-10-14 at 14:43 -0500, Bob Hope wrote:
A patch would be nice as I'm sure MySQL won't give two sh**s about this. If you've got the time I'd appreciate it.
Thanks,
Savage
Hi Savage,
Here you go, I haven't tested it but it should be fine. I think Fedora do something similar at MySQL's build as there is no library conflict when building with 4.1 in FC4, haven't really investigated this though.
Regards Andrew -- Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 119: "The best system is the one with the fewest operating systems." - BILL GATES
------------------------------------------------------------------------
diff -ur dovecot-1.0.alpha3.old/src/auth/password-scheme.c dovecot-1.0.alpha3/src/auth/password-scheme.c --- dovecot-1.0.alpha3.old/src/auth/password-scheme.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/auth/password-scheme.c 2005-10-14 21:00:38.000000000 +0100 @@ -193,7 +193,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, salt, 4); - sha1_result(&ctx, ssha_digest); + sha1_res(&ctx, ssha_digest);
str = t_str_new(MAX_BASE64_ENCODED_SIZE(sizeof(ssha_digest))+1); base64_encode(ssha_digest, sizeof(ssha_digest), str); @@ -228,7 +228,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, &data[SHA1_RESULTLEN], size-SHA1_RESULTLEN); - sha1_result(&ctx, sha1_digest); + sha1_res(&ctx, sha1_digest); return memcmp(sha1_digest, data, SHA1_RESULTLEN) == 0; }
diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.c dovecot-1.0.alpha3/src/lib/sha1.c --- dovecot-1.0.alpha3.old/src/lib/sha1.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.c 2005-10-14 20:59:57.000000000 +0100 @@ -229,7 +229,7 @@ }
void -sha1_result(struct sha1_ctxt *ctxt, void *digest0) +sha1_res(struct sha1_ctxt *ctxt, void *digest0) { uint8_t *digest;
@@ -259,5 +259,5 @@
sha1_init(&ctx); sha1_loop(&ctx, data, size); - sha1_result(&ctx, result); + sha1_res(&ctx, result); } diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.h dovecot-1.0.alpha3/src/lib/sha1.h --- dovecot-1.0.alpha3.old/src/lib/sha1.h 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.h 2005-10-14 20:59:33.000000000 +0100 @@ -57,14 +57,14 @@ extern void sha1_init(struct sha1_ctxt *); extern void sha1_pad(struct sha1_ctxt *); extern void sha1_loop(struct sha1_ctxt *, const void *, size_t); -extern void sha1_result(struct sha1_ctxt *, void *); +extern void sha1_res(struct sha1_ctxt *, void *);
/* compatibilty with other SHA1 source codes */ typedef struct sha1_ctxt SHA1_CTX; #define SHA1Init(x) sha1_init((x)) #define SHA1Update(x, y, z) sha1_loop((x), (y), (z)) -#define SHA1Final(x, y) sha1_result((y), (x)) +#define SHA1Final(x, y) sha1_res((y), (x))
#define SHA1_RESULTLEN (160/8)
Thanks alot Andrew. Everything seems to have compiled fine. I won't be able to install and test until at least tonight as my users are accessing mail until then. Keep up the great work on dovecot; I think it's a great program. Best regards, Savage
Has anyone written a patch for dovecot-1.0beta7 or 8 for the MySQL sha1 make error? I haven't been able to find one in the archives. Tom Andrew Hutchings wrote:
On Fri, 2005-10-14 at 14:43 -0500, Bob Hope wrote:
A patch would be nice as I'm sure MySQL won't give two sh**s about this. If you've got the time I'd appreciate it.
Thanks,
Savage
Hi Savage,
Here you go, I haven't tested it but it should be fine. I think Fedora do something similar at MySQL's build as there is no library conflict when building with 4.1 in FC4, haven't really investigated this though.
Regards Andrew -- Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 119: "The best system is the one with the fewest operating systems." - BILL GATES
------------------------------------------------------------------------
diff -ur dovecot-1.0.alpha3.old/src/auth/password-scheme.c dovecot-1.0.alpha3/src/auth/password-scheme.c --- dovecot-1.0.alpha3.old/src/auth/password-scheme.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/auth/password-scheme.c 2005-10-14 21:00:38.000000000 +0100 @@ -193,7 +193,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, salt, 4); - sha1_result(&ctx, ssha_digest); + sha1_res(&ctx, ssha_digest);
str = t_str_new(MAX_BASE64_ENCODED_SIZE(sizeof(ssha_digest))+1); base64_encode(ssha_digest, sizeof(ssha_digest), str); @@ -228,7 +228,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, &data[SHA1_RESULTLEN], size-SHA1_RESULTLEN); - sha1_result(&ctx, sha1_digest); + sha1_res(&ctx, sha1_digest); return memcmp(sha1_digest, data, SHA1_RESULTLEN) == 0; }
diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.c dovecot-1.0.alpha3/src/lib/sha1.c --- dovecot-1.0.alpha3.old/src/lib/sha1.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.c 2005-10-14 20:59:57.000000000 +0100 @@ -229,7 +229,7 @@ }
void -sha1_result(struct sha1_ctxt *ctxt, void *digest0) +sha1_res(struct sha1_ctxt *ctxt, void *digest0) { uint8_t *digest;
@@ -259,5 +259,5 @@
sha1_init(&ctx); sha1_loop(&ctx, data, size); - sha1_result(&ctx, result); + sha1_res(&ctx, result); } diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.h dovecot-1.0.alpha3/src/lib/sha1.h --- dovecot-1.0.alpha3.old/src/lib/sha1.h 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.h 2005-10-14 20:59:33.000000000 +0100 @@ -57,14 +57,14 @@ extern void sha1_init(struct sha1_ctxt *); extern void sha1_pad(struct sha1_ctxt *); extern void sha1_loop(struct sha1_ctxt *, const void *, size_t); -extern void sha1_result(struct sha1_ctxt *, void *); +extern void sha1_res(struct sha1_ctxt *, void *);
/* compatibilty with other SHA1 source codes */ typedef struct sha1_ctxt SHA1_CTX; #define SHA1Init(x) sha1_init((x)) #define SHA1Update(x, y, z) sha1_loop((x), (y), (z)) -#define SHA1Final(x, y) sha1_result((y), (x)) +#define SHA1Final(x, y) sha1_res((y), (x))
#define SHA1_RESULTLEN (160/8)
Quoting Bob Hope:
A patch would be nice as I'm sure MySQL won't give two sh**s about
Looking at http://bugs.mysql.com/bug.php?id=13944, it seems they do. Anyway, if you need a quick workaround, http://wiki.dovecot.org/MysqlProblems also tells you how.
btw, this link to the Wiki was posted a few times recently...
participants (5)
-
Andrew Hutchings
-
Bob Hope
-
Jakob Hirsch
-
Tom
-
Tomi Hakala